boot loader

I am trying to write a secondary boot loader for a flash device that is
tightly coupled to bios interrupt 13 device on an x86 bios based hardware.
The bios finds and loads the MBR. The MBR runs and finds my secondary boot
loader. My secondary runs, finds the Neutrino image, loads it into real
memory starting at 0:0 All appears well until I jump to the loaded image in
memory. Then the system goes unresponsive. I have tried loading the image
at other address I have read the documentation and it seems to indicate
that a bootable image has a short program attached to the front of the image
that does the rest of the setup work with respect to addressing, setting up
for the startup program and running it. So it would appear that loading the
image and jumping to the first address in the loaded image should do it.
Well, I must be missing something key here. The image I am loading is a
bootable image. dinit,ing the image to a floppy results in a successful
boot on the same hardware.

Is it is as simple as it appears? Load a bios bootable image into linear
real memory, jump to offset 0 in the image and magic occurs?

Would it be possible to get source to the Neutrino secondary boot loader?
Disassembling them is pretty tedious. I bet I could get a clue from there.

If you do a “dumpifs -vvv image”, you’ll see a variable ram_paddr in
the startup header, that is where you need to load it into ram.
Startup is position dependent on where it was linked for.

Once loaded you can then jump to ram_paddr.

Jason

Brian K. Jackson <bkjackson@agvp.com> wrote:

I am trying to write a secondary boot loader for a flash device that is
tightly coupled to bios interrupt 13 device on an x86 bios based hardware.
The bios finds and loads the MBR. The MBR runs and finds my secondary boot
loader. My secondary runs, finds the Neutrino image, loads it into real
memory starting at 0:0 All appears well until I jump to the loaded image in
memory. Then the system goes unresponsive. I have tried loading the image
at other address I have read the documentation and it seems to indicate
that a bootable image has a short program attached to the front of the image
that does the rest of the setup work with respect to addressing, setting up
for the startup program and running it. So it would appear that loading the
image and jumping to the first address in the loaded image should do it.
Well, I must be missing something key here. The image I am loading is a
bootable image. dinit,ing the image to a floppy results in a successful
boot on the same hardware.

Is it is as simple as it appears? Load a bios bootable image into linear
real memory, jump to offset 0 in the image and magic occurs?

Would it be possible to get source to the Neutrino secondary boot loader?
Disassembling them is pretty tedious. I bet I could get a clue from there.