u-boot中配置選項(xiàng)眾多,有些配置選擇提供了很好的功能,CONFIG_SYS_HUSH_PARSER
選項(xiàng)就提供了比較實(shí)用的功能,
看看一個(gè)例子:
在CONFIG_SYS_HUSH_PARSER 選項(xiàng)沒有打開之前的運(yùn)行結(jié)果:
環(huán)境變量配置如下:
"setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath " \
...
bootfile=uImage
loadaddr=0x01000000
...
EVM440:/#boot
Setting the MAC address 0:11:3c:6e:f3:5f
TFTP from server 10.159.201.10; our IP address is 10.141.179.215
Filename '$bootfile'.
Load address: 0x0
Loading: ## Warning: gatewayip needed but not set
T
TFTP error: 'File not found' (1)
Not retrying...
Setting the MAC address 0:11:3c:6e:f3:5f
TFTP from server 10.159.201.10; our IP address is 10.141.179.215
Filename '$fdtfile'.
Load address: 0x0
Loading: ## Warning: gatewayip needed but not set
TFTP error: 'File not found' (1)
Not retrying...
配置CONFIG_SYS_HUSH_PARSER選項(xiàng)后,結(jié)果是:
EVM440:/#boot
Setting
the MAC address 0:11:3c:6e:f3:5f
TFTP
from server 10.159.201.10; our IP address is 10.141.179.215
Filename
'uImage'.
Load
address:
Loading:
## Warning: gatewayip needed but not set
T
TFTP
error: 'File not found' (1)
Not
retrying...
Setting
the MAC address 0:11:3c:6e:f3:5f
TFTP
from server 10.159.201.10; our IP address is 10.141.179.215
Filename
'EVM440.dtb'.
Load
address:
Loading:
## Warning: gatewayip needed but not set
TFTP
error: 'File not found' (1)
Not
retrying... 也就是說沒有配置CONFIG_SYS_HUSH_PARSER選項(xiàng)則不會解析,直接使用$loadaddr,而CONFIG_SYS_HUSH_PARSER選項(xiàng)配置后,$loadaddr被解析成0x1000000,CONFIG_SYS_HUSH_PARSER選項(xiàng)為u-boot環(huán)境變量配置提供了更靈活的機(jī)制.
|
|