LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Question for u-boot env value. (https://www.linuxquestions.org/questions/linux-newbie-8/question-for-u-boot-env-value-4175539055/)

poplinux 04-07-2015 08:40 PM

Question for u-boot env value.
 
Dear Sir.

U-boot version : 2015.01

I'm setting some env value. for example see below.

Code:

U-boot > printenv
serial_number=abcdefg

I'm want to "serial_number" pass to kernel cmdline.
So, I'm make a "bootargs" env value. see below.

Code:

U-boot > printenv
bootargs='console=ttyS0,115200 board_serial=${serial_number}'

But, i was failed that env serial_number pass to kernel.

Code:

Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: console=ttyS0,115200 board_serial={serial_number}

How can u-boot env variable pass to kernel?

Thank you.

rtmistler 04-08-2015 12:51 PM

No quotes and make sure you use saveenv to save that information:
Code:

bootargs=console=ttyS0,115200 board_serial=${serial_number}

suicidaleggroll 04-08-2015 12:53 PM

Did you try delimiting the '$'?

eg:
Code:

setenv bootargs ${bootargs} board_serial=\${serial_number}
I haven't tried this, just noticed the delimit here and saw in your example the '$' had been stripped off:
http://www.denx.de/wiki/view/DULG/UBootEnvVariables


All times are GMT -5. The time now is 05:37 PM.