Link to home
Start Free TrialLog in
Avatar of Radhaj
Radhaj

asked on

BIOS

Hello,


         I had to write BIOS for my PVR. My embedded device includes a Linux
 OS. I had to load my OS from hard disk into RAM. So i had to invoke
the bootloader from my BIOS program. I am using LILO bootloader. How shall
I invoke my bootloader from my BIOS program.
Avatar of cjs2895
cjs2895

The way your question is worded is somewhat tough to understand, but I'll take a stab at it. LILO actually installs two bootloaders. The first bootloader (stage 1) resides somewhere in the first few sectors of the disk. Its job is to load the second bootloader (stage 2) from the appropriate partition on the hard disk. The stage 2 bootloader resides in the first few sectors of each partition, the total size allowed for it varies by filesystem (Fat12/Fat16 = 1 sector, Fat32 = 3 sectors, ext2fs = 32 sectors I think). In the case of Linux, the stage 2 bootloader is responsible for loading the kernel off the disk and into memory (it uses BIOS calls I believe), then switching the processor's memory handeler into real mode (2GB address space), then finally it begins executing the kernel in memory. Once execution is passed to the kernel it uncompresses itself, fresses the compressed memory image, and begins its bootup sequence. So to sum all this up, the job of your bios will be to load the stage1 bootloader from disk and execute it. After that the stage2 bootloader and kernel will take over.
Avatar of Radhaj

ASKER


     Thanks for your suggestion. How to load(invoke) the first stage bootloader?
ASKER CERTIFIED SOLUTION
Avatar of cjs2895
cjs2895

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial