Which file format do you use for your own OS?
I know Grub can deal with lots kind of file format.
But if you are using your own boot loader,how do you deal with loading OS whose file format is elf or a.out?
Just skip the header or ....?
Which file format do you use for your own OS?
Re:Which file format do you use for your own OS?
ELF. It doesn't relocate or anything, so just make an executable with page-alignment and it can read it.raywill wrote: Which file format do you use for your own OS?
I know Grub can deal with lots kind of file format.
But if you are using your own boot loader,how do you deal with loading OS whose file format is elf or a.out?
Just skip the header or ....?
Use the lilo method of filesystem usage - skip filesystem and use sector numbers, with multiboot booting - ignore the executable headers and use byte offsets. Makes it so simple.
[edit]oops, misread 'file format' as 'file system'...[/edit]
Re:Which file format do you use for your own OS?
I ever used the way of skipping header.It is an ELF format file.Candy wrote: with multiboot booting - ignore the executable headers and use byte offsets. Makes it so simple.
Then ,do all executable file format have fixed size headers?
Another question:Do you think Binary file format is always a good choice for linking your OS?
- kataklinger
- Member
- Posts: 381
- Joined: Fri Nov 04, 2005 12:00 am
- Location: Serbia
Re:Which file format do you use for your own OS?
PE32 format (as an EXE file, but I'm planning to move to DLL). I only use entery point in header to know where code starts. I'm planning to export and import sections to make driver development easier.
Re:Which file format do you use for your own OS?
i just use flat binary
makes everything simplier
makes everything simplier
Re:Which file format do you use for your own OS?
I currently use a flat binary, with an optional multiboot header in it, allowing use of either GRUB or my homebrew boot loaders.
Re:Which file format do you use for your own OS?
ELF
Out of all the formats, I think it's the best for my needs.
Out of all the formats, I think it's the best for my needs.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Which file format do you use for your own OS?
ELF for the kernel (tnx to grub)
"PROG" native files from ELF/COFF files for userlevel programs
"KMOD" native files from ELF/COFF files for kernel modules
all of them in native "SFS" ramdisk
"PROG" native files from ELF/COFF files for userlevel programs
"KMOD" native files from ELF/COFF files for kernel modules
all of them in native "SFS" ramdisk
Re:Which file format do you use for your own OS?
I have worked with flat binaries as well as with ELF, but ELF tuned out to be more useful for me. It's quite useful when there are additional modules that need to be linked to the kernel and it is (mostly) platform independent.