Page 1 of 1

my kernel + bootprog not working

Posted: Sat Sep 07, 2002 10:36 am
by gonchuki
hi everyone!

I'm new to this stuff of OS development (well, everyone has been a newbie some time :-[) ... and i just got a <<common?>> newbie problem:

As I read a lot of OS dev stuff I realized that making a bootloader is not the best place to start, so i just started an exhaustive search of simple bootloaders... in my opinion, bootprog would be the best one (GRUB does not run COM/EXE binaries) ... well, by using the OS for Dummies i had no problem booting, all went correct and smooth... but i still can't make my simple kernel to load. No error messages, no reboots, the PC just hangs after reading the floppy.
I tried with several things in the start: section of the asm kernel file and no one worked: calling the c_main function, doing a jmp 0xFFFF:0x0000 to force a reboot... nothing works.
Please, can someone guide me on how to boot a simple kernel??? may be i made something wrong in the compiling process???

Re:my kernel + bootprog not working

Posted: Sat Sep 07, 2002 9:34 pm
by Tom
if you use linux I could help you, do you use Linux to make your OS?

Re:my kernel + bootprog not working

Posted: Sun Sep 08, 2002 2:02 pm
by gonchuki
no, i'm using windows :-[ that's why i don't use GRUB... and i don't know if there's a windows compiler that outputs ELF binaries ??? ??? ??? suggestions? :-\

Re:my kernel + bootprog not working

Posted: Sun Sep 08, 2002 2:31 pm
by Schol-R-LEA
Actually, it is entirely possible to use GRUB to load Windows, though it does take some work. See sections 4.1.2 and 4.2.6 in the GRUB manual for details of how to do so, if you want to try it. I'd strongly recommend testing it out in Bochs or on a testbed machine first before committing you development workstation to it, though, and verify your backups, too.

Re:my kernel + bootprog not working

Posted: Sun Sep 08, 2002 4:07 pm
by Warmaster199
gonchuki wrote: no, i'm using windows :-[ that's why i don't use GRUB... and i don't know if there's a windows compiler that outputs ELF binaries ??? ??? ??? suggestions? :-\
---> Use the (G)nu (C) (C)ompiler (GCC). It's a free compiler downloadable from the net. The DOS port is called DJGPP(There is no windows port that I know of :P). I am pretting sure that all of us hardcore OS developers use DJGPP (GCC[compiler] and LD[linker]). Use NASM for the assembler modules and link with LD.

LD will output ELF binaries... [move]"...as well as any executable format know to man"[/move]

Re:my kernel + bootprog not working

Posted: Sun Sep 08, 2002 5:30 pm
by Tim
The DOS port is called DJGPP(There is no windows port that I know of ).
The Cygwin package contains Windows ports of gcc and binutils, and is quite widely used.

Re:my kernel + bootprog not working

Posted: Sun Sep 08, 2002 7:56 pm
by gonchuki
Yes! i'm already using this package... directly installed with Dev-Cpp... but i didn't know gcc + ld could make ELF binaries.

So... what parameters do i have to feed them to get the ELF output? i already know that for NASM is "-f elf" but.... what for gcc and ld?

Re:my kernel + bootprog not working

Posted: Tue Sep 10, 2002 7:57 pm
by Tom