手动替换A20 镜像中的文件

本文介绍如何使用GNUParted查看EMMC映像文件的分区情况,并通过特定命令将两个主要分区挂载到文件系统中。此外,还详细说明了需要替换的关键文件,包括uEnv.txt、script.bin、uImage以及rootfs.tar.gz。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

parted picked.img
GNU Parted 2.3
(parted) p
Model: (file)
Disk /opt/kaifaban/A20_SDK2015/20160907_emmc_flash.img: 1615MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 14.7MB 13.6MB primary ext2
2 14.7MB 766MB 751MB primary ext4

(parted) unit
Unit? [compact]? B
(parted) p
Model: (file)
Disk /opt/kaifaban/A20_SDK2015/20160907_emmc_flash.img:
1614807040B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1048576B 14680063B 13631488B primary ext2
2 14680064B 765854719B 751174656B primary ext4

(第一分区) mount -o loop,offset=1048576  20160907_emmc_flash.img img_dump/
(第二分区) mount -o loop,offset=14680064 20160907_emmc_flash.img img_dump/

替换里面的相关文件,
注意:第一分区里的几个文件uEnv.txt,script.bin,uImage 和
第二分区里的/bootfs目录下的uEnv.txt,script.bin,uImage都需要替换
第二分区里的rootfs.tar.gz为真正的文件系统,来自${CB_OUTPUT_DIR}/rootfs.tar.gz
具体见脚本boardenvsetup.sh

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值