ota脚本增加 删除文件和路径的例子
authorSnickerSun <snickersun@163.com>
Fri, 12 Apr 2024 10:23:25 +0000 (18:23 +0800)
committerSnickerSun <snickersun@163.com>
Fri, 12 Apr 2024 10:23:25 +0000 (18:23 +0800)
code/sdk/build/config/target_config/brandy/build_brandy_update.py
code/sdk/tools/bin/platform_tool/mkyaffs2image/mkyaffs2image
code/sdk/tools/bin/platform_tool/mkyaffs2image/mkyaffs2image.c

index 2c72c5c..46a1b1a 100755 (executable)
@@ -86,10 +86,16 @@ def get_new_image(info):
     # image_list.append("=".join([info.nv_bin,           "nv"]))
 
     # 资源文件
-
+    info.res_delfile = []
+    # 多个文件删除例子
+    # info.res_delfile = ["/user/userdata/ConfigModel.json","/user/res/APPLIST_COMPASS_IMAGE.bin"]   
+
+    info.res_rmdir = []
+    # 删除路径例子
+    # info.res_rmdir = ["/user/res/dials"]
+    
     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)
+        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"]))
index 086d8c5..f953a69 100755 (executable)
Binary files a/code/sdk/tools/bin/platform_tool/mkyaffs2image/mkyaffs2image and b/code/sdk/tools/bin/platform_tool/mkyaffs2image/mkyaffs2image differ
index 0ef54bf..66e2a0f 100755 (executable)
@@ -942,6 +942,7 @@ int main(int argc, char *argv[])
 
     chunkSize = get_pagesize(g_pagetype);
     spareSize = sel_oob_info->oobsize;
+    printf("chunkSize %d spareSize %d\n",chunkSize,spareSize);
 
     printf("Processing directory %s into image file %s\n",argv[1],argv[2]);