Hi!
My kernel is in ELF. When I set the 1_44=kernel.elf in bochsrc or something like that, Bochs won't run it even I've heared that PC can run ELF.
I'm too tired to make a new floppy image through a real floppy whith Grub every time I test my kernel, so I just want to run the ELF kernel.
Is there something wrong with my bochsrc? (I downloaded Bochs yesterday so I can't know):
///////////////////////////////////////
megs: 32
romimage: file=$BXSHARE/BIOS-bochs-latest, address=0xf0000
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
vga: extension=vbe
floppya: 1_44=kernel.elf, status=inserted
boot: a
log: bochs_log.txt
mouse: enabled=0
ips: 15000000
vga_update_interval: 150000
i440fxsupport: enabled=1
///////////////////////////////////////
Please help. It woul'd make this thing a lot easier
How to manage running ELF on Bochs
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:How to manage running ELF on Bochs
okay ...
ELF is a file format, and your BIOS (on both real PC and BOCHS) knows nothing about it at all. When you use 1_44=kernel.elf, the BIOS attempt to use the first 512 bytes of your ELF file as a bootsector, while it actually contains ELF header, sections description, symbols tables and things alike. Instead, GRUB _is_ a bootloader and it can distinguish an ELF file when it gets one (not that hard, the first 3 bytes are 'E', 'L', 'F') and it knows how to load it properly.
I suggest you head to the proper "disk image" section of the FAQ to see how you could just mount a floppy image that contains GRUB and just change the 'kernel.elf' file without using a real floppy on your system.
ELF is a file format, and your BIOS (on both real PC and BOCHS) knows nothing about it at all. When you use 1_44=kernel.elf, the BIOS attempt to use the first 512 bytes of your ELF file as a bootsector, while it actually contains ELF header, sections description, symbols tables and things alike. Instead, GRUB _is_ a bootloader and it can distinguish an ELF file when it gets one (not that hard, the first 3 bytes are 'E', 'L', 'F') and it knows how to load it properly.
I suggest you head to the proper "disk image" section of the FAQ to see how you could just mount a floppy image that contains GRUB and just change the 'kernel.elf' file without using a real floppy on your system.