Skip to contentSkip to conversation

how to program a bootloader

U-Boot-Users Mildred Frisco 3 participants 3 messages Oct 14, 2004 – Oct 15, 2004

lore
Share & tools
lore
#0 lore raw

Hi,
This might not be the exact list for this but hope some here would be able to help me. Is there a step-by-step guide on how to program a bootloader? The u-boot bootloader (or other linux bootloader) is a very big program to study. I would like to know how to program the basics and concepts.
Thanks.

Mildred

#1 lore raw

Hi Mildred:

Mildred Frisco <[email protected]> wrote:
<quote>
Is there a step-by-step guide on how to program a bootloader? The u-boot bootloader (or other linux bootloader) is a
very big program to study.
</quote>
?
I think we are in the same boat :)

I was looking for a bootloader that can be reprogrammed/extended for target ARM. U-boot allows us to do the same, although, most of the commands have already been implemented. Check in the doc/ directory for README.commands file. It tells you how to add new commands.

I haven't written and tested any new commands yet, but, was able to compile u-boot for the target at91rm9200 ARM.

Regards,

K Shakthi

_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

#2 lore raw
In reply to Mildred Frisco

Hi Mildred,

Quoted 6 lines

This might not be the exact list for this but hope some here would be able to help me. Is there a step-by-step guide on how to program a bootloader? The u-boot bootloader (or other linux bootloader) is a very big program to study. I would like to know how to program the basics and concepts.
Thanks.

Well look at it this way - what does a bootloader do?

- Initialize the hardware
- Setup everything so the booted program finds what it needs
- What abilities are needed to do this in a comfortable way?

Well there's your requirements ;) Now find the relevant hardware and software documentation to write a program doing just that.

The complexity of U-Boot is due to supporting many different platforms. Try studing the code relevant for _one single_ board and you have an excellent object to study.

For a somewhat more detailed specification read the docs about the available U-Boot commands in the DULG documentation. Most commands are there because they serve a purpose necessary for a comfortable working of a bootloader. Read the README in the toplevel directory to read more about the "invisible parts" of U-Boot.

But remember that studying a working fully fledged boot loader can be somewhat irritating if you just want to see clearly the basic concepts. On the other hand there is _nothing better_ to study than such a Free Software project that has features needed and added by a community much larger than most closed software development teams.

Cheers
Detlev

Signature · 4 lines
"It's amazing I won. I was running against peace, prosperity, and
incumbency."
  --  George H.W. Bush, 06/14/2001, talking to Swedish prime
      minister Goran Perrson, unaware that a live tv camera was still on