I've been trying to get into OS development for some time now. I have almost no experience with assembly (just a few days, I'm reading 'Art of Assembly' in hope of learning it), but I have some experience with C (I'm not a beginner any more, but I'm not really satisfied with my knowledge either), so I thought I'd join the community to learn how operating systems really work. Maybe some day even create my own little os
Anyway, I was trying to follow the Bare Bones tutorial from wiki ( http://www.osdev.org/wiki/Bare_bones ) and I understood it rather well (some parts of assembly code I don't understand yet, but I figure I will, once I gain more experience). I have tried to compile it, only to hit a solid brick wall. So, here's my problem (hopefully someone will help), or rather- the log of things I did :
1. When trying to compile kernel.c, I get an error saying :
Code: Select all
kernel.c:1: warning: unused parameter ‘mbd’
kernel.c:1: warning: unused parameter ‘magic’
So, I decided to compile without -Werror ...
2. NASM gave me loader.s with no problems...
3. When I try to link the two files (while passing linker.ld script to ld), I get this :
Code: Select all
loader.o: In function `_loader':
loader.s:(.text+0x14): undefined reference to `_kmain'
Code: Select all
call _kmain
Thank you in advance.
edit :
Just in case it matters, I will list the versions of programs I'm using :
GNU make : 3.81
gcc : 4.2.3
nasm : 0.99.06-2
ld : 2.18.0.20080103
Under Kubuntu 8.04, with 2.6.24-16 kernel.