韩后的护肤品好用吗:CONFIG_SYS_HUSH_PARSER

来源:百度文库 编辑:九乡新闻网 时间:2024/04/29 07:28:46

u-boot CONFIG_SYS_HUSH_PARSER 作用

(2011-08-12 14:47:09)转载标签:

杂谈

u-boot中配置选项众多,有些配置选择提供了很好的功能,CONFIG_SYS_HUSH_PARSER 选项就提供了比较实用的功能,
看看一个例子:在CONFIG_SYS_HUSH_PARSER 选项没有打开之前的运行结果:环境变量配置如下: bootcmd:"setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath " \        "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \        "console=$consoledev,$baudrate $othbootargs;" \        "tftp $loadaddr $bootfile;" \        "tftp $fdtaddr $fdtfile;" \        "bootm $loadaddr - $fdtaddr"...bootfile=uImageloadaddr=0x01000000        fdtaddr=0x00c00000        fdtfile=EVM440.dtb...

EVM440:/#bootSetting the MAC address 0:11:3c:6e:f3:5fTFTP from server 10.159.201.10; our IP address is 10.141.179.215Filename '$bootfile'.Load address: 0x0Loading: ## Warning: gatewayip needed but not setTTFTP error: 'File not found' (1)Not retrying...Setting the MAC address 0:11:3c:6e:f3:5fTFTP from server 10.159.201.10; our IP address is 10.141.179.215Filename '$fdtfile'.Load address: 0x0Loading: ## Warning: gatewayip needed but not set
TFTP error: 'File not found' (1)Not retrying...

配置CONFIG_SYS_HUSH_PARSER选项后,结果是:
EVM440:/#bootSetting the MAC address 0:11:3c:6e:f3:5fTFTP from server 10.159.201.10; our IP address is 10.141.179.215Filename 'uImage'.Load address: 0x1000000Loading: ## Warning: gatewayip needed but not setTTFTP error: 'File not found' (1)Not retrying...Setting the MAC address 0:11:3c:6e:f3:5fTFTP from server 10.159.201.10; our IP address is 10.141.179.215Filename 'EVM440.dtb'.Load address: 0xc00000Loading: ## Warning: gatewayip needed but not set
TFTP error: 'File not found' (1)Not retrying...
也就是说没有配置CONFIG_SYS_HUSH_PARSER选项则不会解析,直接使用$loadaddr,而CONFIG_SYS_HUSH_PARSER选项配置后,$loadaddr被解析成0x1000000,CONFIG_SYS_HUSH_PARSER选项为u-boot环境变量配置提供了更灵活的机制.