优化flash 4分区 1254/1 1254/head 1255/target/1 1256/target/1
authorSnickerSun <snickersun@163.com>
Thu, 24 Oct 2024 08:49:42 +0000 (16:49 +0800)
committerSnickerSun <snickersun@163.com>
Thu, 24 Oct 2024 08:49:42 +0000 (16:49 +0800)
code/sdk/build/config/target_config/brandy/build_brandy_update.py
code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash_config.c

index ed29f2d..b74bde4 100755 (executable)
@@ -141,16 +141,15 @@ def get_new_image(info):
         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!!!")
-        if os.path.exists(info.res_data):
-            image_list.append("=".join([info.res_index,        "res_index"]))
-            image_list.append("=".join([info.res_data,         "res_data"]))
     else:
         print("res dir not exist " + info.res_dir)
         info.res_dir          = None #仅删除
         result = res_pack(info.res_dir, info.res_index, info.res_data,info.res_delfile,info.res_rmdir)
-        if os.path.exists(info.res_data):
-            image_list.append("=".join([info.res_index,        "res_index"]))
-            image_list.append("=".join([info.res_data,         "res_data"]))
+        if not result:
+            sys.exit("[ERROR] resource file pack failed!!!")                    
+    if os.path.exists(info.res_data):
+        image_list.append("=".join([info.res_index,        "res_index"]))
+        image_list.append("=".join([info.res_data,         "res_data"]))
 
 
     # 镜像签名
@@ -162,6 +161,7 @@ def get_new_image(info):
     # image_list.append("=".join([info.dsp_overlay_sign, "dsp_overlay_sign"]))
 
     new_image = "|".join(image_list)
+    print("get_new_image done")
     return new_image
 
 
index d44636c..81f38b8 100755 (executable)
@@ -47,7 +47,7 @@ int has_nandflash_init = 0;
 uint32_t yf_volume_percent[YF_VOLUMES_NUM] = {100};
 #else
 #define YF_VOLUMES_NUM 4
-#define YF_NAME_STRS "/user/system/", "/user/update/", "/user/music/", "/user/"
+#define YF_NAME_STRS "/system/", "/update/", "/music/", "/user/"
 uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 10, 10, 10, 70 };
 // uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 1, 1, 1, 97 };
 #endif