rv1126 image update 打包

RK SDK中的img镜像都是gpt格式的,分区又很多,为了看起来直观,方便管理,只用三个分区就够了,uboot、kernel、rootfs。这里记录下linux和windows下两种打包img方式。

linux打包

1.修改分区

修改sdk/device/rockchip/rv1126_rv1109/parameter-ubuntu.txt文件,删除misc、recovery等分区

--- a/device/rockchip/rv1126_rv1109/parameter-ubuntu.txt
+++ b/device/rockchip/rv1126_rv1109/parameter-ubuntu.txt
@@ -8,5 +8,5 @@ MACHINE: 0xffffffff
 CHECK_MASK: 0x80
 PWR_HLD: 0,0,A,0,1
 TYPE: GPT
-CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(misc),0x00010000@0x00008000(boot),0x00010000@0x00018000(recovery),-@0x00028000(rootfs:grow)
+CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00010000@0x00006000(boot),-@0x00016000(rootfs:grow)
 uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9
2.修改打包脚本

文件系统用的是自己构建出来的,没有用sdk中的rootfs.img,

修改sdk/tools/linux/Linux_Pack_Firmware/rockdev/rv1126_rv1109-package-file文件

--- a/tools/linux/Linux_Pack_Firmware/rockdev/rv1126_rv1109-package-file
+++ b/tools/linux/Linux_Pack_Firmware/rockdev/rv1126_rv1109-package-file
@@ -13,14 +13,15 @@ parameter   Image/parameter.txt
 # trust                Image/trust.img
 #
 uboot          Image/uboot.img
-misc           Image/misc.img
+#misc          Image/misc.img
 #resource      Image/resource.img
 #kernel                Image/kernel.img
 boot           Image/boot.img
-recovery       Image/recovery.img
-rootfs         Image/rootfs.img
-oem            Image/oem.img
-userdata       Image/userdata.img
+#recovery      Image/recovery.img
+#rootfs                Image/rootfs.img
+rootfs         ../../../../ubuntu/debian-rootfs.img
+#oem           Image/oem.img
+#userdata      Image/userdata.img
3.实现

在SDK目录下执行./build.sh firmware && ./build.sh updateimg后就按照自定义分区格式生成了升级固件update.img

版权属于:咖啡走糖

原文链接:https://cloud.tencent.com/developer/article/2152399

posted @ 2024-04-01 16:14  _promise  阅读(73)  评论(0编辑  收藏  举报