以MA35D1 256M SOM板为例: 1、MA35D1_Buildroot/board/nuvoton/ma35d1/uboot-env.txt 修改nand的环境变量为:setenv bootargs root=/dev/ram0 console=ttyS0,115200n8 rdinit=/sbin/init mem=${kernelmem};
2、MA35D1_Buildroot/board/nuvoton/ma35d1/nuwriter/pack-nand.json 修改rootfs起始地址及文件: { "offset": "0x6800000", "file": "rootfs.ext4", "type": 1 } 3、A35D1_Buildroot/output/build/linux-custom/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi 修改kenel大小: kernel@400000 { label = "nand-kernel"; reg = <0x400000 0x6400000>; }; rootfs@6800000 { label = "nand-rootfs"; reg = <0x6800000 0x6400000>; }; 4、make uboot-menuconfig 修改comandline参数: Command line interface > Filesystem commands mtdparts=nand0:3m(uboot),768k(uboot-env),256k(device-tree),100m(kernel),100m(rootfs)
5、make menuconfig Filesystem images 选择:initial RAM filesystem linked into linux kernel 去除UBI相关配置
System configuration > Run a getty 将ttyS0改为console
System configuration 选择下面 Dynamic using devtmpfs + mdev
MA35D1_Buildroot/package/initscripts/init.d/rcS添加命令:mdev -s ,这个需要干净编译生效 或者在output/target/etc/init.d/rcS下修改,然后再make打包
|