diff --git a/Makefile b/Makefile index cf4df76..fdf9b27 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ debug: os.iso kernel/kernel.elf @$(GDB) #gdbgui -g i386-elf-gdb --project $(CWD) -os.iso: kernel/kernel.elf init vfs devfs initrd +os.iso: kernel/kernel.elf init vfs devfs initrd vga_drv @cp kernel/kernel.elf sysroot/boot @cd initrd; tar -f ../sysroot/boot/initrd.tar -c * @grub-mkrescue -o $@ sysroot >/dev/null 2>/dev/null @@ -51,6 +51,10 @@ devfs: devfs/* kernel/start.o @cp $@/$@ initrd/$@ +vga_drv: vga_drv/* kernel/start.o + @cd $@ && make + @cp $@/$@ initrd/$@ + kernel/kernel.elf: $(OBJ) $(ASM_OBJ) $(S_ASM_OBJ) sysroot/usr/lib/libc.a @$(CC) -z max-page-size=4096 -Xlinker -n -T kernel/cpu/$(PLAT)/linker.ld -o $@ $(CFLAGS) -nostdlib $^ -lgcc diff --git a/init/main.c b/init/main.c index 4a23575..c6a4d8c 100644 --- a/init/main.c +++ b/init/main.c @@ -173,8 +173,11 @@ int main() { yield(); // Bochs fails here datapos=find_loc("devfs",initrd); load_task(datapos,initrd); - free(initrd); yieldToPID(3); + datapos=find_loc("vga_drv",initrd); + load_task(datapos,initrd); + free(initrd); + yieldToPID(4); serial_print("MOUNT\n"); vga_write_string("CALLING MOUNT\n"); mount("","devfs","/dev"); diff --git a/vga_drv/Makefile b/vga_drv/Makefile new file mode 100644 index 0000000..b2a8060 --- /dev/null +++ b/vga_drv/Makefile @@ -0,0 +1,13 @@ +C_SOURCES = $(wildcard *.c) +OBJ = $(C_SOURCES:.c=.o) +CFLAGS = -Wall -g +CC = i386-myos-gcc + +vga_drv: $(OBJ) ../libc/* + @$(CC) -o $@ $(CFLAGS) $(OBJ) + +%.o: %.c + @$(CC) $(CFLAGS) -c $< -o $@ + +clean: + @rm -rf *.o vga_drv diff --git a/vga_drv/main.c b/vga_drv/main.c new file mode 100644 index 0000000..e9436dd --- /dev/null +++ b/vga_drv/main.c @@ -0,0 +1,3 @@ +int main() { + +} diff --git a/vga_drv/vga_drv b/vga_drv/vga_drv new file mode 100755 index 0000000..2357c7a Binary files /dev/null and b/vga_drv/vga_drv differ