1. /uboot/ 下
make HOSTCC=arm-unknown-linux-uclibcgnueabi-gcc HOSTSTRIP=arm-unknown-linux-uclibcgnueabi-strip env
2./uboot/tools/env/ 下
cp fw_printenv => /mnt/mtd
cp fw_printenv => /mnt/mtd/fw_setenv
cp fw_env.config => /mnt/mtd/
fw_env.h 定義
#define CONFIG_FILE "/mnt/mtd/fw_env.config"
3.fw_env.config 內容
#define
CONFIG_ENV_OFFSET
0x220000
#define
CONFIG_ENV_SIZE
0x20000
cat /proc/mtd => erase size = 0x20000
uboot 燒錄 offset 0x140000 size 0x100000
fw_env.config
/dev/mtd0 A
0x20000
0x20000
1
A = 220000-140000
4./mnt/mtd 下
./fw_printenv
./fw_setenv aaa 1
5.開機至 uboot 與 linux user space 下查看 => OK
沒有留言:
張貼留言