U-Boot 2013.07 - Command Line Length Limit?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

U-Boot 2013.07 - Command Line Length Limit?

2,952 Views
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?

Labels (1)
2 Replies

1,318 Views
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

1,318 Views
jackblather
Senior Contributor I

That worked! Thanks!

0 Kudos