Compiling bkerndev on linux
Posted: Sat Nov 14, 2009 6:12 am
I have downloaded the source for bkerndev & modified build.bat to work on linux:
but when run it gives these errors:
whats wrong?
EDIT:
Sorry if this is the wrong place to post
Code: Select all
#!/bin/bash
nasm -f aout -o start.o start.asm
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o main.o main.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o scrn.o scrn.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o gdt.o gdt.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o idt.o idt.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o isrs.o isrs.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o irq.o irq.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o timer.o timer.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o kb.o kb.c
ld -T link.ld -o kernel.bin start.o main.o scrn.o gdt.o idt.o isrs.o irq.o timer.o kb.o
sudo losetup /dev/loop0 dev_kernel_grub.img
sudo mount /dev/loop0 /mnt
sudo cp kernel.bin /mnt/kernel
sudo umount /dev/loop0
sudo losetup -d /dev/loop0
rm *.o
Code: Select all
main.c:49: warning: return type of ‘main’ is not ‘int’
main.c: In function ‘main’:
main.c:63: warning: pointer targets in passing argument 1 of ‘puts’ differ in signedness
./include/system.h:30: note: expected ‘unsigned char *’ but argument is of type ‘char *’
main.c:51: warning: unused variable ‘i’
scrn.c: In function ‘puts’:
scrn.c:144: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
./include/system.h:24: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
gdt.c: In function ‘gdt_install’:
gdt.c:59: warning: assignment makes integer from pointer without a cast
idt.c: In function ‘idt_install’:
idt.c:56: warning: assignment makes integer from pointer without a cast
isrs.c:98: warning: pointer targets in initialization differ in signedness
isrs.c:99: warning: pointer targets in initialization differ in signedness
isrs.c:100: warning: pointer targets in initialization differ in signedness
isrs.c:101: warning: pointer targets in initialization differ in signedness
isrs.c:102: warning: pointer targets in initialization differ in signedness
isrs.c:103: warning: pointer targets in initialization differ in signedness
isrs.c:104: warning: pointer targets in initialization differ in signedness
isrs.c:105: warning: pointer targets in initialization differ in signedness
isrs.c:107: warning: pointer targets in initialization differ in signedness
isrs.c:108: warning: pointer targets in initialization differ in signedness
isrs.c:109: warning: pointer targets in initialization differ in signedness
isrs.c:110: warning: pointer targets in initialization differ in signedness
isrs.c:111: warning: pointer targets in initialization differ in signedness
isrs.c:112: warning: pointer targets in initialization differ in signedness
isrs.c:113: warning: pointer targets in initialization differ in signedness
isrs.c:114: warning: pointer targets in initialization differ in signedness
isrs.c:116: warning: pointer targets in initialization differ in signedness
isrs.c:117: warning: pointer targets in initialization differ in signedness
isrs.c:118: warning: pointer targets in initialization differ in signedness
isrs.c:119: warning: pointer targets in initialization differ in signedness
isrs.c:120: warning: pointer targets in initialization differ in signedness
isrs.c:121: warning: pointer targets in initialization differ in signedness
isrs.c:122: warning: pointer targets in initialization differ in signedness
isrs.c:123: warning: pointer targets in initialization differ in signedness
isrs.c:125: warning: pointer targets in initialization differ in signedness
isrs.c:126: warning: pointer targets in initialization differ in signedness
isrs.c:127: warning: pointer targets in initialization differ in signedness
isrs.c:128: warning: pointer targets in initialization differ in signedness
isrs.c:129: warning: pointer targets in initialization differ in signedness
isrs.c:130: warning: pointer targets in initialization differ in signedness
isrs.c:131: warning: pointer targets in initialization differ in signedness
isrs.c:133: warning: pointer targets in initialization differ in signedness
isrs.c: In function ‘fault_handler’:
isrs.c:146: warning: pointer targets in passing argument 1 of ‘puts’ differ in signedness
./include/system.h:30: note: expected ‘unsigned char *’ but argument is of type ‘char *’
timer.c: In function ‘timer_handler’:
timer.c:26: warning: pointer targets in passing argument 1 of ‘puts’ differ in signedness
./include/system.h:30: note: expected ‘unsigned char *’ but argument is of type ‘char *’
start.o:start.o:(.text+0x2d): undefined reference to `_main'
start.o:start.o:(.text+0x39): undefined reference to `_gp'
start.o:start.o:(.text+0x56): undefined reference to `_idtp'
start.o:start.o:(.text+0x1a6): undefined reference to `_fault_handler'
start.o:start.o:(.text+0x272): undefined reference to `_irq_handler'
gdt.o: In function `gdt_install':
gdt.c:(.text+0x10e): undefined reference to `gdt_flush'
idt.o: In function `idt_install':
idt.c:(.text+0x64): undefined reference to `idt_load'
isrs.o: In function `isrs_install':
isrs.c:(.text+0x48): undefined reference to `isr0'
isrs.c:(.text+0x6c): undefined reference to `isr1'
isrs.c:(.text+0x90): undefined reference to `isr2'
isrs.c:(.text+0xb4): undefined reference to `isr3'
isrs.c:(.text+0xd8): undefined reference to `isr4'
isrs.c:(.text+0xfc): undefined reference to `isr5'
isrs.c:(.text+0x120): undefined reference to `isr6'
isrs.c:(.text+0x144): undefined reference to `isr7'
isrs.c:(.text+0x168): undefined reference to `isr8'
isrs.c:(.text+0x18c): undefined reference to `isr9'
isrs.c:(.text+0x1b0): undefined reference to `isr10'
isrs.c:(.text+0x1d4): undefined reference to `isr11'
isrs.c:(.text+0x1f8): undefined reference to `isr12'
isrs.c:(.text+0x21c): undefined reference to `isr13'
isrs.c:(.text+0x240): undefined reference to `isr14'
isrs.c:(.text+0x264): undefined reference to `isr15'
isrs.c:(.text+0x288): undefined reference to `isr16'
isrs.c:(.text+0x2ac): undefined reference to `isr17'
isrs.c:(.text+0x2d0): undefined reference to `isr18'
isrs.c:(.text+0x2f4): undefined reference to `isr19'
isrs.c:(.text+0x318): undefined reference to `isr20'
isrs.c:(.text+0x33c): undefined reference to `isr21'
isrs.c:(.text+0x360): undefined reference to `isr22'
isrs.c:(.text+0x384): undefined reference to `isr23'
isrs.c:(.text+0x3a8): undefined reference to `isr24'
isrs.c:(.text+0x3cc): undefined reference to `isr25'
isrs.c:(.text+0x3f0): undefined reference to `isr26'
isrs.c:(.text+0x414): undefined reference to `isr27'
isrs.c:(.text+0x438): undefined reference to `isr28'
isrs.c:(.text+0x45c): undefined reference to `isr29'
isrs.c:(.text+0x480): undefined reference to `isr30'
isrs.c:(.text+0x4a4): undefined reference to `isr31'
irq.o: In function `irq_install':
irq.c:(.text+0x159): undefined reference to `irq0'
irq.c:(.text+0x17d): undefined reference to `irq1'
irq.c:(.text+0x1a1): undefined reference to `irq2'
irq.c:(.text+0x1c5): undefined reference to `irq3'
irq.c:(.text+0x1e9): undefined reference to `irq4'
irq.c:(.text+0x20d): undefined reference to `irq5'
irq.c:(.text+0x231): undefined reference to `irq6'
irq.c:(.text+0x255): undefined reference to `irq7'
irq.c:(.text+0x279): undefined reference to `irq8'
irq.c:(.text+0x29d): undefined reference to `irq9'
irq.c:(.text+0x2c1): undefined reference to `irq10'
irq.c:(.text+0x2e5): undefined reference to `irq11'
irq.c:(.text+0x309): undefined reference to `irq12'
irq.c:(.text+0x32d): undefined reference to `irq13'
irq.c:(.text+0x351): undefined reference to `irq14'
irq.c:(.text+0x375): undefined reference to `irq15'
EDIT:
Sorry if this is the wrong place to post