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 07-26-2010, 06:42 AM   #1
tamamontu
LQ Newbie
 
Registered: Dec 2009
Posts: 9

Rep: Reputation: 0
help in loading kernel from SDcard


Hi Guys,

I have a cirrus logic EP9307(ARM9) based board with a SDRAM and FLASH. At present the booting sequence is RS232 -> Redboot -> Ethernet -> Zimage -> Ethernet -> Ramdisk.

I want to remove the flash chip and load the kernel from SDCARD. This chip has a inbuilt bootloader to boot from either a serial port, EEPROM, etc, I have written second stage bootloader to initialize the sdcard and load a test program from it. I want to load the kernel directly from the second stage bootloader(this will uncompress the zimage and then load the kernel on sdram) instead of using redboot.

I have been reading over the internet about passing the kernel tags which has all the target hardware information.


Has any one done some thing similar. Any pointers would help me a lot.

cheers
 
Old 07-26-2010, 11:21 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Is your obstacle how to pass arguments to the kernel? If so, then a possible solution may be to build a kernel with acceptable default arguments. I've just done this for an ARM based SBC, and it seems to work. If you set the arguments in the kernel directly, it will overcome the problem of your bootloader having to supply them. I don't know the mechanics of passing arguments to a kernel. I suppose there must be some documented data structure that gets put somewhere that the kernel can find it.

make menuconfig -> Boot Options -> Default kernel command string

--- rod
 
Old 07-27-2010, 02:37 AM   #3
tamamontu
LQ Newbie
 
Registered: Dec 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Hi Rod,

Yes i am trying to pass the kernel parameters as described in the following link

http://www.simtec.co.uk/products/SWL...g_article.html

I am trying to pass the tagged list to the kernel. At present I have redboot which decompresses the kernel, passes kernel parameters and then loads the kernel. Is there any way I can see what parameters are being passed by redboot.

Tama
 
Old 07-27-2010, 08:22 AM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
The kernel commandline should show up in the kernel boot messages, normally stored in /var/log/messages, and/or on the boot console.
--- rod.
 
Old 07-28-2010, 08:09 PM   #5
tamamontu
LQ Newbie
 
Registered: Dec 2009
Posts: 9

Original Poster
Rep: Reputation: 0
I am using 2.6.8.1 kernel. Where can i get more information on Zimage created by the kernel. I am trying to find the decompression algorithim for Zimage.
 
Old 07-29-2010, 10:50 PM   #6
tamamontu
LQ Newbie
 
Registered: Dec 2009
Posts: 9

Original Poster
Rep: Reputation: 0
I have a EP9307 based custom designed board. At present it is using the same setup as the development kit for EP9307.

At present we use redboot to download zimage on to flash and then boot the kernel by loading it into sdram.

I want to load the Zimage from SDCARD directly. I have modified first stage bootloader to load from EEprom, This in turn loads the second stage bootloader which initializes the SDCARD and loads a test program.

I have been reading about kernel boot process.

http://www.simtec.co.uk/products/SWL...g_article.html

http://www.webworldarticles.com/e/a/...-Linux-system/

All the paramters are passed as a tags list to the kernel. At present redboot is passing them. Is there any way to see what these paramaters are. Secondly do i need to have a decompression code in the second stage bootloader to decompress Zimage.

According to the second link Zimage already has a decompression code inbuilt which is used to decompress Zimage.

I am bit confused here. Can some please give some inputs on this.
All I want to do is load Zimage, Ramdisk from SDCARD. I am new to linux environment.
 
Old 07-30-2010, 10:58 AM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
I believe (and please correct me if I'm wrong) the decompression code gets built into the kernel, and is invoked by the kernel itself. No need to decompress a priori. I doubt very much that there is any runtime tool that displays the tags passed to the kernel. I'm not familiar with redboot, but assuming it is open-source, you should be able to tell at least what tags are used. The content of the tags may be discernible from boot-time configuration data, if it exists.
--- rod.
 
  


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
using sdcard as flash memory msrihari Linux - Newbie 3 04-02-2010 03:37 AM
Sdcard on ARM linux ravi_chobey Linux - Embedded & Single-board computer 3 02-03-2010 08:03 AM
SDcard problems on HP dv2640 ocularb0b Linux - Hardware 0 11-15-2007 03:08 PM
SDCard Partition Problems ch4se Linux - Hardware 1 08-14-2005 07:44 PM
Loading modules error after loading compiled kernel td0l2 Linux - Newbie 12 07-28-2004 11:10 AM

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

All times are GMT -5. The time now is 01:32 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