LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 12-29-2010, 04:01 AM   #1
sattulinux
Member
 
Registered: Sep 2010
Posts: 44

Rep: Reputation: 2
Question initialisation of bootloader for arm-linux


hi everyone,

Currently i'm working on arm-linux(embedded system).
The process of my booting up is that initially i have got a bootloader(u-boot) which initializes kernel and then kernel takes care of rest. But can anyone please tell me a more regarding the basics:
1) What happens when initially the board is powered on or reset(beginning from cpu)?
2)bootloader initializes kernel, but who initializes bootloader? I mean something should be there which is activated by default on being powered up or reset, which in turn must be starting bootloader? (this is what i think)

I have tried to search in google regarding this, but everywhere i get the results directly beginning from uboot, but who starts uboot, that i haven't found upto now.
Can anyone please help me regarding these basics?
If possible, please provide me with the links where i can get these details both from hardware and software point of view.

thanking in advance,

With regards,
sattu
 
Old 12-29-2010, 10:22 AM   #2
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,481

Rep: Reputation: 715Reputation: 715Reputation: 715Reputation: 715Reputation: 715Reputation: 715Reputation: 715
this should probaly go to embedded...
 
Old 12-29-2010, 01:24 PM   #3
JonathanWilson
Member
 
Registered: Aug 2009
Location: Ilkeston, England
Distribution: ubuntu, xp, embeded
Posts: 79

Rep: Reputation: 1
I'm not 100% sure, but I believe that the CPU initiates the boot loader by jumping to (reading) a pre-determined address (usually in flash memory, but could be EEPROM etc.) and then using it as an offset knows where to find the boot loader which then mimics a bios and sets up buffers, irq's etc. After this it then loads the OS and jumps to the start address where it loaded the OS.

With a standard PC (i386 et.al.) the bios performs the action, and also initialises any buffers, irq's etc. I'm not sure if the bios initiates the CPU, or the CPU initiates the bios in the same way the embeded chip does.

(edit)
Actually, thinking further, I believe the CPU jumps to the address of the bios and starts executing the code from there.
(/edit)

Last edited by JonathanWilson; 12-29-2010 at 01:26 PM.
 
Old 12-29-2010, 11:13 PM   #4
sattulinux
Member
 
Registered: Sep 2010
Posts: 44

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by schneidz View Post
this should probaly go to embedded...
Oh sorry and thanks for moving it to embedded part,
 
Old 12-29-2010, 11:18 PM   #5
sattulinux
Member
 
Registered: Sep 2010
Posts: 44

Original Poster
Rep: Reputation: 2
Unhappy

Quote:
Originally Posted by JonathanWilson View Post
I'm not 100% sure, but I believe that the CPU initiates the boot loader by jumping to (reading) a pre-determined address (usually in flash memory, but could be EEPROM etc.) and then using it as an offset knows where to find the boot loader which then mimics a bios and sets up buffers, irq's etc. After this it then loads the OS and jumps to the start address where it loaded the OS.

With a standard PC (i386 et.al.) the bios performs the action, and also initialises any buffers, irq's etc. I'm not sure if the bios initiates the CPU, or the CPU initiates the bios in the same way the embeded chip does.

(edit)
Actually, thinking further, I believe the CPU jumps to the address of the bios and starts executing the code from there.
(/edit)
Thanks for your reply, but i want a sure shot answer as i'm stuck off in this case. What you have replied that i also think, it happens for sure, but then in some websites i have read that initially there is a x-loader which is begun by cpu on being powered up. This x-loader in turn initialises uboot and so on. Well, i'm really confused as to what happens where?
 
Old 12-30-2010, 11:10 AM   #6
JonathanWilson
Member
 
Registered: Aug 2009
Location: Ilkeston, England
Distribution: ubuntu, xp, embeded
Posts: 79

Rep: Reputation: 1
The wiki http://en.wikipedia.org/wiki/Booting about half way down mentions omap... basically in ROM embeded on the processor there is an initial bootloader (bootstrap code) that can be used when there is no other boot loader, such as a brand new machine with the flash NAND empty. This allows very minimal control through JTAG and/or serial to allow the loading of say Uboot onto the NAND and I believe it can also load an OS from other suitable media such as nand or MMC, however it works as a command line interface so the instructions must be entered every time manually unless the processor boot code sees another bootloader at the given memory location.
 
Old 01-21-2011, 02:39 AM   #7
appilu
Member
 
Registered: Jan 2011
Distribution: RedHat,Debian-Ubuntu,Fedora
Posts: 73

Rep: Reputation: 8
Hi,
sattulinux

i donno ,whether this clarify your querry
First loader in the flash is loaded ,then it loads u-boot->it loads kernel(zipped kernel into unzipped form)->initrd.
 
1 members found this post helpful.
Old 01-23-2011, 10:51 PM   #8
sattulinux
Member
 
Registered: Sep 2010
Posts: 44

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by appilu View Post
Hi,
sattulinux

i donno ,whether this clarify your querry
First loader in the flash is loaded ,then it loads u-boot->it loads kernel(zipped kernel into unzipped form)->initrd.
Thanks a lot appilu. But it would be great if you can explain it in details. If you know any links where these things are mentioned in details, then please do tell me. Or rather if you have any documentation, then this is my mail i.d- cooo.sattu.oool@gmail.com

waiting for your reply,

with regards,
sattu
 
Old 01-25-2011, 03:15 AM   #9
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
When a CPU boots it goes to the reset vector (http://en.wikipedia.org/wiki/Reset_vector), then from here the bootloader can be started.
 
1 members found this post helpful.
Old 01-25-2011, 06:01 AM   #10
appilu
Member
 
Registered: Jan 2011
Distribution: RedHat,Debian-Ubuntu,Fedora
Posts: 73

Rep: Reputation: 8
HI sattu,
this link i found things useful for you.
http://www.eetimes.com/design/embedd...s?pageNumber=0
 
1 members found this post helpful.
Old 01-26-2011, 09:46 AM   #11
sattulinux
Member
 
Registered: Sep 2010
Posts: 44

Original Poster
Rep: Reputation: 2
Cool

thanks a lot appilu and cnxsoft.
Appilu, the link that you have provided has really provided a great deal of details regarding booting. Now i have got a fare enough idea of what happens during the boot process.
I wanted one more help regarding the embedded linux.
Do you have any idea regarding the database connectivity from an embedded linux? To be precise, we have a mssql or mysql server in a remote p.c and we need to connect it from an arm-embedded-linux system. For that we require this ODBC and free TDS drivers installed on my board. We have tried a lot of options from net but still not able to connect. Can you help regarding this? It's actually urgent and the biggest problem with the embedded thing is that no setups are available and we require source codes which we can cross-compile for our board. If you all can help regarding this, that would really be great.

thanking you in advance,

with regards,
sattu
 
Old 01-26-2011, 11:17 PM   #12
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
I used SQLite and Berkeley DB on embedded systems, but I suppose it's not possible in your case.
MySQL can also be used in Embedded Systems, uclinux release has a version of mysql.
Download http://www.uclinux.org/pub/uClinux/d...101026.tar.bz2.
The code is in user/mysql directory but I never used it.
 
1 members found this post helpful.
Old 01-29-2011, 06:10 AM   #13
sattulinux
Member
 
Registered: Sep 2010
Posts: 44

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by cnxsoft View Post
I used SQLite and Berkeley DB on embedded systems, but I suppose it's not possible in your case.
MySQL can also be used in Embedded Systems, uclinux release has a version of mysql.
Download http://www.uclinux.org/pub/uClinux/d...101026.tar.bz2.
The code is in user/mysql directory but I never used it.
o.k, i will go through the website. But why i can't use SQLite and berkeley DB in my system? is it not meant for arm-embedded?
 
Old 01-29-2011, 09:05 PM   #14
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
Quote:
Originally Posted by sattulinux View Post
o.k, i will go through the website. But why i can't use SQLite and berkeley DB in my system? is it not meant for arm-embedded?
I understood that your server was running MySQL. So if you use SQLite or Berkeley DB in your system, you would have to change the server as well to use SQLite or Berkeley DB.
 
  


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
Compiling debian arm for NSLU2 - arm-linux-gnueabi-objdump not found ergosteur Linux - Kernel 3 10-30-2010 11:24 AM
Compile the linux2.6.14.1 for arm must ues the arm-linux-gcc-3.4.4? frankyue Linux - Embedded & Single-board computer 2 12-20-2008 07:28 AM
unified bootloader for x86 and arm Grawp Linux - Hardware 3 09-27-2008 08:34 AM
xserver GUI initialisation failure while connecting solaries server with linux entv.4 nayanasudarshan Linux - Software 0 03-05-2007 10:13 PM


All times are GMT -5. The time now is 08:31 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration