Add vga_drv program
This commit is contained in:
parent
d874b17b14
commit
58711735b2
6
Makefile
6
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
|
||||
|
||||
|
@ -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");
|
||||
|
13
vga_drv/Makefile
Normal file
13
vga_drv/Makefile
Normal file
@ -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
|
3
vga_drv/main.c
Normal file
3
vga_drv/main.c
Normal file
@ -0,0 +1,3 @@
|
||||
int main() {
|
||||
|
||||
}
|
BIN
vga_drv/vga_drv
Executable file
BIN
vga_drv/vga_drv
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user