Beginner Question
Posted: Tue Jul 07, 2009 12:25 am
So, the day before I could not sleep. It was close to the morning and at the time it sounded like a good idea to start developing my own OS. After reading pages on the net and the wiki here I finally started with the GCC cross compiler. I don't use linux, so I am not very familiar with a lot of things. But I got trough installing cygwin and setting up binutils and gcc cross compiler, probably successfully. I now have a cygwin installation with a GCC 4.4.0 i586 cross compiler, and binutils. I only have the GAS assembly, could not find the nasm.
Anyway, so I moved on to compiling the C bare bone to see if everything is working, http://wiki.osdev.org/Bare_bones. I used the GAS assembly, no errors. I compiled the kernel.c without any problems, except a warning for unused variable, but that is all. All this done using the cross compiler and assembly. Then I used the linker from the same cross compiler tools, to link them all. Now I got myself a nice 2.2k kernel.bin file.
Then I prepared my floppy image and started bochs. GRUB loaded but my kernel did not. I got an "invalid or unsupported executable format" error.
I re-compiled, and relinked a few times, double checking everything. I did not get any errors and I did use the cross compiler. I know there is not enough information here to find the problem, but can anyone give me any pointers?
I am thinking of starting fresh from the start again, to make sure the cross compiler is done correctly. But it takes hours to make, don't want to go trough all that just to find out it was something else.
Anyway, so I moved on to compiling the C bare bone to see if everything is working, http://wiki.osdev.org/Bare_bones. I used the GAS assembly, no errors. I compiled the kernel.c without any problems, except a warning for unused variable, but that is all. All this done using the cross compiler and assembly. Then I used the linker from the same cross compiler tools, to link them all. Now I got myself a nice 2.2k kernel.bin file.
Then I prepared my floppy image and started bochs. GRUB loaded but my kernel did not. I got an "invalid or unsupported executable format" error.
I re-compiled, and relinked a few times, double checking everything. I did not get any errors and I did use the cross compiler. I know there is not enough information here to find the problem, but can anyone give me any pointers?
I am thinking of starting fresh from the start again, to make sure the cross compiler is done correctly. But it takes hours to make, don't want to go trough all that just to find out it was something else.