SPI NOR 存储配置
SPI NOR 采用 squashfs 文件系统,以 per2_spinor 工程为例, 编译出来的固件为 d211_per2_spinor_v1.0.0.img
SPINOR 的分区信息在 target/d211/per2_spinor/image_cfg.json
中
"spi-nor": { // Media type "size": "16m", // Size of NOR "partitions": { "spl": { "size": "256k" }, "uboot": { "size": "640k" }, "userid": { "size": "64k" }, "env": { "size": "64k" }, "env_r": { "size": "64k" }, "falcon": { "size": "64k" }, "logo": { "size": "512k" }, "kernel": { "size": "5m" }, "rootfs": { "size": "9m" }, // "user": { "size": "-" }, } }
SPI NOR 存储一般比较小,在 Linux 系统上进行分区调整比较麻烦,本文档不详细描述
SPI NOR 存储配置步骤如下:
- EMMC
EMMC 采用 squashfs,以 demo 工程为例, 编译出来的固件为 d211_demo_v1.0.0.img
EMMC 的接口协议固定,因此不需要进行新器件型号的移植
注:调整分区大小时,也需要同时调整固件的大小来和分区匹配
- 分区分区信息在 target/d211/demo/image_cfg.json 中
"mmc": { // Media type "size": "4G", // Size of SD/eMMC "partitions": { // Partition table apply to device "spl": { "offset": "0x4400", "size": "495k" }, "uboot": { "size": "1m" }, "env": { "size": "256k" }, "falcon": { "size": "256k" }, "logo": { "size": "512k" }, "kernel": { "size": "16m" }, "rootfs": { "size": "72m" }, //分区大小为 72M "user": { "size": "-" }, }, },
- 固件
固件的大小调整通过 make menuconfig –> Filesystem images –> RootFS images 调整。
[*] ext2/3/4 root filesystem ext2/3/4 variant (ext4) ---> (rootfs) filesystem label (72M) exact size //固件大小为 72M (0) exact number of inodes (leave at 0 for auto calculation) (5) reserved blocks percentage (-O ^64bit) additional mke2fs options Compression method (no compression) ---> [ ] cpio the root filesystem (for use as an initial RAM filesystem) [ ] initial RAM filesystem linked into linux kernel
正确的存储配置应该能够成功支持固件烧录。