I was following the Bran's Kernel Development Tutorial, and I got the first part of the tutorial done.(Creating start.asm and compiling it into kernel.bin). I build a cross compiler(i586-elf). The problem is when I try to compile the kernel with the file build.sh(start.asm is renamed boot.asm)...
Code: Select all
echo "Building Kernel..."
echo "Assembling..."
nasm -f aout -o boot.o boot.asm
echo "Compiling..."
i586-elf-gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -c -o main.o main.c
echo "Linking output to kernel.bin"
ld -T link.ld -o kernel.bin boot.o main.o
echo "Finished Building Kernel!"
Code: Select all
corwin@vinneticus:~/Desktop/iKatos$ ./build.sh
Building Kernel...
Assembling...
Compiling...
main.c:2:43: error: unknown type name 'size_t'
main.c:10:36: error: unknown type name 'size_t'
main.c:17:67: error: unknown type name 'size_t'
main.c:24:1: error: unknown type name 'size_t'
main.c: In function 'strlen':
main.c:26:5: error: unknown type name 'size_t'
main.c: At top level:
main.c:42:6: warning: return type of 'main' is not 'int' [-Wmain]
Linking output to kernel.bin
ld: cannot find main.o: No such file or directory
Finished Building Kernel!
I don't know what to do, Could someone help me please?
~Lionel