我有以下的U-Boot环境变量:
nas220> printenv
autoload=no
autostart=no
baudrate=115200
bootargs=console=ttyS0,115200
bootargs_base=console=ttyS0,115200
bootcmd=run bootcmd_nand
bootcmd_nand=setenv bootargs console=ttyS0,115200 cmdlinepart.mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a40000@0x5c0000(rootfs)
bootcmd_rescue=setenv bootargs_extra rescue/enable=true; run bootcmd_usb
bootcmd_usb=setenv bootargs ${bootargs_base} ${mtdparts} ${bootargs_extra}; usb start; fatload usb 0:1 0x40000 uImage-dtb; fatload usb 0:1 0x800000 uInitrd; bootm 0x40000 0x800000
bootdelay=3
ethact=egiga0
ethaddr=00:10:75:07:0D:8D
ethadr=00:10:75:07:0D:8D
mtdids=nand0=orion_nand
mtdparts=cmdlinepart.mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a40000@0x5c0000(rootfs)
stderr=serial
stdin=serial
stdout=serial
Environment size: 876/65532 bytes
我需要修改bootcmd_nand
变量,从以下内容开始:
setenv bootargs console=ttyS0,115200 cmdlinepart.mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a40000@0x5c0000(rootfs)
to
setenv bootargs console=ttyS0,115200 cmdlinepart.mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a30000@0x5c0000(rootfs)
然而,当我尝试运行时:
setenv bootcmd_nand setenv bootargs console=ttyS0,115200 cmdlinepart.mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a30000@0x5c0000(rootfs)
系统从nand读取并引导启动,因此我无法运行saveenv
命令以使更改持久化。
我如何在系统引导之前进行更改?