制作母片镜像

首先从 tools 目录下载 SpinandPackBinTool.rar 到 Linux 系统下并解压:

将我们编译得到的images目录拷贝到SpinandPackBinTool/目录下:

# cd SpinandPackBinTool_for_core_board
# cp ../images/* ./ -rf

拷贝 PARTINFO.pni 和 PINANDINFO.sni:

# cp images/boot/PARTINFO.pni  images/boot/SPINANDINFO.sni images/

接着修改 SPINAND.INI,设置 images 目录和 nandid,并将 env_part 修改为 ENV0:

# vi SPINAND.INI

修改 set_partition.es,屏蔽setenvmtdparts命令,并确保ubi分区大小不超过(A00000+A00000+5000000+500000):

# vi images/scripts/[[set_partition.es
# vi images/scripts_bin/[[set_partition.es

# <- this is for comment / total file size must be less than 4KB
mtdparts del CIS
#setenv mtdparts $(mtdparts),0x20000(KEY_CUST),0x60000(LOGO),0x500000(KERNEL),0x500000(RECOVERY),-(UBI)
#saveenv
nand erase.part UBI
ubi part UBI
ubi create rootfs 0xA00000
ubi create miservice 0xA00000
ubi create customer 0x5100000
ubi create appconfigs 0x500000

% <- this is end of file symbol

配置分区和image路径的脚本auto_update_spinand.txt

auto_update_spinand.txt下dynpart这行的分区信息必须跟uboot下的mtdparts保持一致:

执行 ./SstarMakeBin_dual_env,成功生成 nand.bin,这个便是我们的母片镜像:

# ./SstarMakeBin_dual_env -n SPINAND.INI


文档更新时间: 2024-01-03 18:19   作者:Aeeditor