Page 1 of 1
Kernel Loading :(
Posted: Sun Oct 06, 2002 7:04 am
by Unexpected
I am begginer in OS development.
I don't understand how can I load my kernel?
I have compiled kernel.bin file....
What I need to write in to MBR or somewhere else, to load my kernel.bin into memory?
I know this is stupid question, but can you help me?
Re:Kernel Loading :(
Posted: Sun Oct 06, 2002 10:29 am
by Tom
If your using linux to compile & link...look at my web site, install.sh should help you.
Download Prekernel0-6.zip
www.sourceforge.net/projects/fritzos
Re:Kernel Loading :(
Posted: Sun Oct 06, 2002 4:09 pm
by Unexpected
Very thnx
Your sources is very understandable.
One question. The boot.bin file must be wrote into sector 0, and kernel32.bin file must be loaded into sector 1? Or somewhere else?
Re:Kernel Loading :(
Posted: Sun Oct 06, 2002 9:11 pm
by Tom
well, right now my kernel32.bin file has to be in sector 1, but the kernel is now probly big enough that it is in sector 1, and 2 and so on.
if you use install.sh in Linux ( open up the INSTALLING file ). type:
sh install.sh with a blank floppy in /dev/fd0 !!!!
( also if you modify my kernel it %100 needs the asm( "jump start" );
Hope that helps you,
Re:Kernel Loading :(
Posted: Mon Oct 07, 2002 1:41 pm
by Unexpected
I compiling your kernel with DJGPP in Win. I am runing the bat file:
nasm -f bin boot.asm -o boot.bin
gcc -c kernel32.c -o kernel32.o
ld -Ttext=0x1000 -o kernel32 kernel32.o -e 0x0
objcopy -R .note -R .comment -S -O binary kernel32.o kernel32.bin
And havening this ld.exe error:
kernel32.o(.text+0x1):kernel32.c: undefined reference to `start'
Whats the problem?
Re:Kernel Loading :(
Posted: Mon Oct 07, 2002 4:22 pm
by Tom
in the first asm funciton in the C file try
asm( "jmp _start" );