LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-07-2015, 08:40 PM   #1
poplinux
Member
 
Registered: May 2012
Posts: 107

Rep: Reputation: Disabled
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.

Last edited by poplinux; 04-07-2015 at 08:49 PM.
 
Old 04-08-2015, 12:51 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 5,296
Blog Entries: 12

Rep: Reputation: 1865Reputation: 1865Reputation: 1865Reputation: 1865Reputation: 1865Reputation: 1865Reputation: 1865Reputation: 1865Reputation: 1865Reputation: 1865Reputation: 1865
No quotes and make sure you use saveenv to save that information:
Code:
bootargs=console=ttyS0,115200 board_serial=${serial_number}
 
Old 04-08-2015, 12:53 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,492

Rep: Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092Reputation: 2092
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Desktop Env. will not boot. (KDE, neither GNOME) suselinuxfan Linux - Desktop 1 01-04-2007 10:58 PM
Shell env question Iriel Solaris / OpenSolaris 1 10-12-2005 12:38 PM
question about Linux env ashley75 Linux - General 1 10-21-2004 09:00 AM
init on boot programs that need env vars The_Spider Linux - General 3 04-29-2004 07:30 AM
where are the env variables set on boot? Pete Dogg Linux - Software 1 09-10-2003 02:37 AM


All times are GMT -5. The time now is 03:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration