赞
踩
因为一些需求做一点分区修改尝试
因为rv1126分区很难受
就是由parameter-buildroot-fit.txt生成最后parameter.txt
于是我手动修改了parameter.txt
发现这个是分区列表,可以在uboot里看到
修改如下
- FIRMWARE_VER: 8.1
- MACHINE_MODEL: RV1126
- MACHINE_ID: 007
- MANUFACTURER: RV1126
- MAGIC: 0x5041524B
- ATAG: 0x00200800
- MACHINE: 0xffffffff
- CHECK_MASK: 0x80
- PWR_HLD: 0,0,A,0,1
- TYPE: GPT
- CMDLINE: mtdparts=rk29xxnand:
- 0x00002000@0x00004000(misc),
- 0x00010000@0x00006000(boot),
- 0x00002000@0x00016000(uboot),
- 0x00014000@0x00018000(recovery),
- 0x00200000@0x0002C000(rootfs),
- 0x00010000@0x0022C000(backup),
- 0x00060000@0x0023C000(oem),
- 0x00200000@0x0029C000(userdata),
- -@0x0049C000(media:grow)
- uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9
开机也能正常运行,就说明改这里是可行的,
为什么呢?
因为之前有修改过,读分区的时候是通过分区的名字来获取分区里面的内容
=====================================================================
rv1126_rv1109\u-boot\drivers\mtd\mtd_uboot.c
========================================================================
添加分区:(添加了一个newfs分区)
- --- 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),0x00014000@0x00018000(recovery),0x00010000@0x0002C000(backup),0x00200000@0x0003C000(rootfs),0x00060000@0x0023C000(oem),0x00200000@0x0029C000(userdata),-@0x0049C000(media:grow)
- +CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(misc),0x00010000@0x00008000(boot),0x00014000@0x00018000(recovery),0x00010000@0x0002C000(backup),0x00200000@0x0003C000(rootfs),0x00060000@0x0023C000(oem),0x00200000@0x0029C000(userdata),0x00100000@0x0049C000(newfs),-@0x004AC000(media:grow)
- uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9
修改打包脚本:
- --- a/tools/linux/Linux_Pack_Firmware/rockdev/rv1126_rv1109-package-file
- +++ b/tools/linux/Linux_Pack_Firmware/rockdev/rv1126_rv1109-package-file
- # NAME Relative path
- #
- #HWDEF HWDEF
- package-file package-file
- bootloader Image/MiniLoaderAll.bin
- parameter Image/parameter.txt
- #
- # if uboot.img is fit, uboot.img had include uboot and trust,
- # so ignore trust.img
- # file Image/uboot.img
- # Image/uboot.img: Device Tree Blob version 17
- #
- # trust Image/trust.img
- #
- uboot Image/uboot.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
- + newfs Image/newfs.img
- # 要写入backup分区的文件就是自身(update.img)
- # SELF 是关键字,表示升级文件(update.img)自身
- # 在生成升级文件时,不加入SELF文件的内容,但在头部信息中有记录
- # 在解包升级文件时,不解包SELF文件的内容。
- backup RESERVED
- #update-script update-script
- #recover-script recover-script
可参考博客:
RV1126调试(4)-升级镜像img打包分区修改 - 码农教程
============================================================================
仅供参考
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。