If you are writing a micro kernel OS, how do you load the modules needed such as drivers and filesystem support and binary execution? Also is there any good tutorials on how to execute binaries in ELF Format?
Currently I have written a OS which has a single TSS, GDT, IDT, ISRs and IRQs, paged memory and a basic kernel heap.
I have written a test ELF executable, which GRUB loads after the kernel. What I would like to know is how do I execute the code? It have got the start and end addresses from the multiboot data. Is there anything else I need to do before I load the hardware drivers?
How to execute modules loaded by GRUB - ELF?
-
- Posts: 1
- Joined: Sun Oct 14, 2007 10:08 am
How to execute modules loaded by GRUB - ELF?
Fusion OS - Coming Soon...
Well actually just coming...
Possibly...
Well actually just coming...
Possibly...
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
While I don't know if I recommend this -- I wrote an RDOFF2 loader, instead.
I edited a backend to LCC 3.6 to output nasm assembly, and so was able to use LCC and ldrdf to generate RDOFF2 objects/binaries.
The advantage of this is simplicity -- RDOFF2 objects are pretty simple to link and load. The nasm assembler comes with documentation on the format. I used this, and the source code to rdfdump in order to create my linker/loader code.
I eventually plan on supporting ELF as well, though, at some point, so I sometimes wonder why I didn't just put in the effort to support elf in the first place. However, like I said, the RDOFF2 loader got me up and running real quick.
--Jeff
I edited a backend to LCC 3.6 to output nasm assembly, and so was able to use LCC and ldrdf to generate RDOFF2 objects/binaries.
The advantage of this is simplicity -- RDOFF2 objects are pretty simple to link and load. The nasm assembler comes with documentation on the format. I used this, and the source code to rdfdump in order to create my linker/loader code.
I eventually plan on supporting ELF as well, though, at some point, so I sometimes wonder why I didn't just put in the effort to support elf in the first place. However, like I said, the RDOFF2 loader got me up and running real quick.
--Jeff