This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于U-Boot 2016.05-g6c5519b6fc 使用setenv命令的问题



现在我有需求更改uboot.env中的netboot的环境变量

使用setenv命令去掉dhcp功能

运行结果如下:

=> setenv netboot echo Booting from network ...;setenv autoload no;run netloadimage;run netloadfdt;run netargs;bootz ${loadaddr} - ${fdtaddr}
link up on port 0, speed 100, full duplex
Using ethernet@4a100000 device
TFTP from server 192.168.1.192; our IP address is 192.168.1.150
Filename 'zImage'.
Load address: 0x82000000
Loading: *
Abort
link up on port 0, speed 100, full duplex
Using ethernet@4a100000 device
TFTP from server 192.168.1.192; our IP address is 192.168.1.150
Filename 'undefined'.
Load address: 0x88000000
Loading: *
Abort
Bad Linux ARM zImage magic!

然后用printenv netboot看一下结果

=> printenv netboot
netboot=echo Booting from network ...

也就是说setenv是生效了 不过分号之后的直接执行了

这个不是我需要的结果,请教这样的需求我应该怎么设置

  • emmmmm

    发完帖子之后在另外一个帖子里找到了~~~

     setenv netboot ‘echo Booting from network ...;setenv autoload no;run netloadimage;run netloadfdt;run netargs;bootz ${loadaddr} - ${fdtaddr} ’

    加上单引号就好了