Which file format do you use for your own OS?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
raywill

Which file format do you use for your own OS?

Post 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 ....?
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Which file format do you use for your own OS?

Post 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]
raywill

Re:Which file format do you use for your own OS?

Post 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?
User avatar
kataklinger
Member
Member
Posts: 381
Joined: Fri Nov 04, 2005 12:00 am
Location: Serbia

Re:Which file format do you use for your own OS?

Post 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.
earlz

Re:Which file format do you use for your own OS?

Post by earlz »

i just use flat binary
makes everything simplier
crc

Re:Which file format do you use for your own OS?

Post 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.
srg

Re:Which file format do you use for your own OS?

Post by srg »

ELF

Out of all the formats, I think it's the best for my needs.
User avatar
Pype.Clicker
Member
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?

Post 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 :P
xenos

Re:Which file format do you use for your own OS?

Post 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.
Post Reply