U-Boot 2013.07 - Command Line Length Limit?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

U-Boot 2013.07 - Command Line Length Limit?

3,954 次查看
jackblather
Senior Contributor I

I'm using U-Boot 2013.07. It seems to work except.....there seems to be a command line length limit of maybe 80 characters.

I cannot set long environment variable names. For instance, the default bootcmd env that comes out of the box (Vybrid Tower) is:

bootcmd=mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi

This is entered into the U-Boot environment by entering:

setenv bootcmd mmc dev ${mmcdev}\; if mmc rescan\; then if run loadbootscript\; then run bootscript\; else if run loaduimage\; then run mmcboot\; else run netboot\; fi\; fi\; else run netboot\; fi

However, this is ABSOLUTELY NO WAY to enter this on the command line. Beyond a certain length (maybe about 80 characters), trying to enter this env var results in this error message:

Usage:

setenv [-f] name value ...

    - [forcibly] set environment variable 'name' to 'value ...'

setenv [-f] name

    - [forcibly] delete environment variable 'name'

=>

I can sucessfully enter env vars that are shorter.

How did Freescale install the 'bootcmd' env var?

How to fix?

标签 (1)
2 回复数

2,320 次查看
timesyssupport
Senior Contributor II

Hello Jack,

   To store the env variables, you can enclose the whole text in single apostrophes(').

Example:

setenv bootcmd 'mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi'

Thanks,

Timesys Support

2,320 次查看
jackblather
Senior Contributor I

That worked! Thanks!

0 项奖励
回复