# image_list.append("=".join([info.nv_bin, "nv"]))
# 资源文件
- result = res_pack(info.res_dir, info.res_index, info.res_data)
- #result = res_pack(info.res_dir, info.res_index, info.res_data,info.res_delfile,info.res_rmdir)
- if not result:
- sys.exit("[ERROR] resource file pack failed!!!")
- image_list.append("=".join([info.res_index, "res_index"]))
- image_list.append("=".join([info.res_data, "res_data"]))
+
+ if os.path.exists(info.res_dir) :
+ result = res_pack(info.res_dir, info.res_index, info.res_data)
+ #result = res_pack(info.res_dir, info.res_index, info.res_data,info.res_delfile,info.res_rmdir)
+ if not result:
+ sys.exit("[ERROR] resource file pack failed!!!")
+ image_list.append("=".join([info.res_index, "res_index"]))
+ image_list.append("=".join([info.res_data, "res_data"]))
# 镜像签名
# image_list.append("=".join([info.ssb_sign, "ssb_sign"]))
["0x21", "0x00090000", "0x00070000"],
["0x22", "0x00100000", "0x00070000"],
["0x23", "0x00170000", "0x00140000"],
- ["0x24", "0x002B0000", "0x00549000"],
- ["0x30", "0x007F9000", "0x00004000"],
- ["0x31", "0x007FD000", "0x00003000"]
+ ["0x24", "0x002B0000", "0x00D49000"],
+ ["0x30", "0x00FF9000", "0x00004000"],
+ ["0x31", "0x00FFD000", "0x00003000"]
]
},
"Output_file_prefix":"AIoT"
*/
#define FLASH_START 0x70000000
-#define FLASH_LENGTH 0x800000
+#define FLASH_LENGTH 0x1000000
#define FLASH_MAX_END (FLASH_START + FLASH_LENGTH)
#define FLASH_PAGE_SIZE 4096
#define BT_IMAGE_PAGES 112
#define HIFI0_IMAGE_PAGES 112
#define HIFI0_CODEC_PAGES 320
-#define APP_IMAGE_PAGES 1353
+#define APP_IMAGE_PAGES 3401
#define NV_IMAGE_PAGES 4
#define FOTA_IMAGE_PAGES 3
-#define FOTA_IMAGE_START 0x770000
+#define FOTA_IMAGE_START 0xFFD000
#define SSB_FOTA_OFFSET 0x0
#define XO_CTRIM_VALUR_DEFAULT 0x56
#define DSP1_IPC_ENABLE NO
g_cywee_service_timer = osTimerNew((osTimerFunc_t)cywee_service_check_timer_callback, osTimerPeriodic, NULL, NULL);
-
+ do_cywee_service_check_msg(CYWEE_SERVICE_CMD_START_CHECK);
+
return ERRCODE_SUCC;
}
#define KV_PAGE_SIZE FLASH_PAGE_SIZE
/* NV运行区默认起始地址(物理地址) */
-#define KV_STORE_START_ADDR (FLASH_PHYSICAL_ADDR_START + 0x7F9000)
+#define KV_STORE_START_ADDR (FLASH_PHYSICAL_ADDR_START + 0xFF9000)
/* NV运行区page数 */
#define KV_STORE_DATA_PAGE_NUM 4
/* NV运行区默认长度(不包含备份区) */
#endif
#define NO 0
-#define UPG_CFG_DEBUG_ENABLED NO
+#define UPG_CFG_DEBUG_ENABLED YES
#ifndef UPG_CFG_DEBUG_PRINT_ENABLED
-#define UPG_CFG_DEBUG_PRINT_ENABLED NO
+#define UPG_CFG_DEBUG_PRINT_ENABLED YES
#endif
#define UPG_CFG_DIRECT_FLASH_ACCESS NO
#define UPG_CFG_PROCESS_NOTIFY_SUPPORT YES
partition = os.path.join(SDK_DIR, "output", "brandy", "partition_table.bin")
partition_bx = partition + "|0x7004F000|0x1000|100"
nv = os.path.join(SDK_DIR, "output", "brandy", "nv_bin", "brandy_all_nv.bin")
- nv_bx = nv + "|0x707F9000|0x4000|100"
-
+ # nv_bx = nv + "|0x707F9000|0x4000|100"
+ nv_bx = nv + "|0x70FF9000|0x4000|100"
+
app = os.path.join(application_dir, "application.bin")
- app_bx = app + "|0x702B0000|0x549000|18"
+ # app_bx = app + "|0x702B0000|0x549000|18" #origin
+ # define APP_IMAGE_PAGES (1353+2560)
+ # 2560*4*1024= 0xA00000
+ app_bx = app + "|0x702B0000|0xD49000|18"
bt = os.path.join(bin_dir, "bt.bin")
bt_bx = bt + "|0x70090000|0x70000|20"
--- /dev/null
+#!/bin/bash
+
+if [ "$#" == "2" ] ; then
+SOURCE_DIR=$1
+SOURCE_VERSION=`basename $SOURCE_DIR`
+TARGET_DIR=$2
+TARGET_VERSION=`basename $TARGET_DIR`
+if [ ! -d "$SOURCE_DIR" ] ; then
+echo "$SOURCE_DIR not exist , skip create ota package"
+echo ""
+exit 0
+fi
+if [ ! -d "$TARGET_DIR" ] ; then
+echo "$TARGET_DIR not exist , skip create ota package"
+echo ""
+exit 0
+fi
+
+mkdir code/sdk/output/brandy/TestOTA/ -p
+rm -rf code/sdk/output/brandy/TestOTA/*
+
+cp -r $SOURCE_DIR code/sdk/output/brandy/TestOTA/oldsoftware
+cp -r $TARGET_DIR code/sdk/output/brandy/TestOTA/newsoftware
+
+cd code/sdk/
+./build/config/target_config/brandy/build_brandy_update.py
+cd -
+
+mkdir release/ota -p
+cp code/sdk/output/brandy/TestOTA/upgrade/update.fwpkg release/ota/${SOURCE_VERSION}_2_${TARGET_VERSION}_ota.fwpkg
+echo create ota file release/ota/${SOURCE_VERSION}_2_${TARGET_VERSION}_ota.fwpkg done
+else
+
+echo ""
+echo "usage: $0 source_release target_release "
+echo ""
+
+fi
+