LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 03-11-2019, 12:47 PM   #1
bachabharat
LQ Newbie
 
Registered: Mar 2019
Posts: 3

Rep: Reputation: Disabled
iMX8M Passing bootargs from U-Boot


I am trying to understand how the bootargs are being passed to the kernel from U-Boot.
Is there any fixed address the kernel looks at? or Is it stored in some RAM location and the address is passed onto kernel through "x" registers?

Board: Variscite DART iMX8M (A-53)

Thanks and Regards,
Bharat Kumar.

Last edited by bachabharat; 03-15-2019 at 10:33 AM. Reason: Not relevant
 
Old 03-15-2019, 01:15 AM   #2
blue_z
Member
 
Registered: Jul 2015
Location: USA
Distribution: Ubuntu, Lubuntu, Mint, custom embedded
Posts: 104

Rep: Reputation: Disabled
Quote:
Originally Posted by bachabharat View Post
I am trying to understand how the bootargs are being passed to the kernel from U-Boot.
...
Is there any fixed address the kernel looks at?
No.


Quote:
Originally Posted by bachabharat View Post
or Is it stored in some RAM location and the address is passed onto kernel through "x" registers?
Almost.
The bootargs environment variable is used as the kernel command line, and for an ARM processor is inserted into either the legacy ATAGs list or the Device Tree blob.
The memory address of the ATAGs or dtb is passed to the ARM kernel in the r2 register.
Study Booting ARM Linux for full details.


Quote:
Originally Posted by bachabharat View Post
I am not interested in using U-Boot prompt to setup environment variables.
Your negative statement is not clear as to what you do want to do.
Take a look at my answer here.
If you do not want U-Boot to provide a command line, you can either configure the kernel with a default command line, or install a command line in the Device Tree.

Regards

Last edited by blue_z; 03-15-2019 at 01:20 AM.
 
Old 03-15-2019, 10:30 AM   #3
bachabharat
LQ Newbie
 
Registered: Mar 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
Answer

Quote:
The bootargs environment variable is used as the kernel command line, and for an ARM processor is inserted into either the legacy ATAGs list or the Device Tree blob.
This worked for me. Added a node(bootargs)in the device tree before passing the FDT address to the kernel in X0 register.

Thanks @blue_z.

Regards,
Bharat
 
  


Reply



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
[U-Boot]bootargs get overwriten nenpa8lo Linux - General 0 12-09-2011 04:37 AM
why bootargs!!!!!!!? Robin Thankachan Linux - Embedded & Single-board computer 2 06-16-2011 07:14 PM
Linux bootargs parameter format question gsinde Linux - Embedded & Single-board computer 3 04-03-2011 11:58 AM
bootargs is not getting update shariefbe Linux - Embedded & Single-board computer 0 01-11-2010 03:50 AM
How can I access bootargs from inside the kernel? mintzyuval Linux - Newbie 13 04-03-2009 06:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 09:57 AM.

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
Open Source Consulting | Domain Registration