我想把GM8135s项目的 u-boot, 开机画面, 动画, zImage, rootfs 五个文件用dd等命令生成一个烧写文件,可以吗?
烧录到指定地址Address
0 u-boot.bin
0x100000 logo.tar.gz
0x180000 animation.tar.gz
0x300000 arch/arm/boot/zImage
0x500000 rootfs.jffs2
离线
我是这样做的:
1. 第一步先建立 32M的 image.bin 文件, 全部填充 0xFF:
参考: https://superuser.com/questions/274972/how-to-pad-a-file-with-ff-using-dd
dd if=/dev/zero ibs=1M count=32 | tr "\000" "\377" >image.bin
2. 写文件:
参考: https://unix.stackexchange.com/questions/146922/is-dd-able-to-overwrite-parts-of-a-file
dd if=/dev/zero ibs=1M count=32 | tr "\000" "\377" >image1.bin
dd conv=notrunc if=u-boot/u-boot-sunxi-with-spl.bin of=image1.bin seek=0
dd conv=notrunc if=linux/arch/arm/boot/zImage of=image1.bin bs=$((0x300000)) seek=1
dd conv=notrunc if=linux/arch/arm/boot/dts/sun8i-v3s-sya.dtb of=image1.bin bs=$((0x0F0000)) seek=1
dd conv=notrunc if=/mnt/hgfs/F/r/main.bmp.gz of=image1.bin bs=$((0x100000)) seek=1
dd conv=notrunc if=/mnt/hgfs/F/r/r6.tar.gz of=image1.bin bs=$((0x180000)) seek=1
生成image1.bin 直接用烧录器烧录即可!
离线
多谢楼主分享
离线