Page 1 of 1
Which file format do you use for your own OS?
Posted: Sat Jan 07, 2006 12:59 pm
by raywill
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 ....?
Re:Which file format do you use for your own OS?
Posted: Sat Jan 07, 2006 1:11 pm
by Candy
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 ....?
ELF. It doesn't relocate or anything, so just make an executable with page-alignment and it can read it.
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?
Posted: Sat Jan 07, 2006 1:52 pm
by raywill
Candy wrote:
with multiboot booting - ignore the executable headers and use byte offsets. Makes it so simple.
I ever used the way of skipping header.It is an ELF format file.
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?
Re:Which file format do you use for your own OS?
Posted: Sat Jan 07, 2006 1:58 pm
by kataklinger
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?
Posted: Sat Jan 07, 2006 2:09 pm
by earlz
i just use flat binary
makes everything simplier
Re:Which file format do you use for your own OS?
Posted: Sat Jan 07, 2006 2:36 pm
by crc
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?
Posted: Fri Jan 20, 2006 2:39 pm
by srg
ELF
Out of all the formats, I think it's the best for my needs.
Re:Which file format do you use for your own OS?
Posted: Fri Jan 20, 2006 4:11 pm
by Pype.Clicker
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
Re:Which file format do you use for your own OS?
Posted: Mon Jan 23, 2006 9:04 am
by xenos
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.