From c102a9cd6c1da22f0c928fc66bd4bf0b5750765a Mon Sep 17 00:00:00 2001 From: Miguel Date: Sun, 19 Aug 2018 03:33:06 +0200 Subject: foolos fonts work again! --- kernel/kernel.c | 9 ++++++--- userspace/Makefile | 4 ++++ userspace/fonts/Makefile | 2 +- userspace/fonts/binarize.py | 2 -- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/kernel/kernel.c b/kernel/kernel.c index 4ba76fa..e52c490 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -54,9 +54,6 @@ void kernel_main(uint32_t eax,uint32_t ebx) // MULTIBOOT HEADER multiboot_information *info=get_multiboot(eax, ebx); - // INIT VESA - vesa_init(info->vbe_control_info,info->vbe_mode_info,0); - // Gather Info about other processors. (APs = application processors) // ACPI or MP smp_processors procdata; @@ -81,6 +78,12 @@ void kernel_main(uint32_t eax,uint32_t ebx) // PCI Bus pci_init(); + // INIT VESA + uint32_t addr=kballoc(1); + fs_content("/binfont.bin",addr,0x100); // copy 0x100 bytes to 0x7000 + vesa_init(info->vbe_control_info,info->vbe_mode_info,addr); + PutString("WELCOME TO THE Fool Operating System",100,100,0xffff00); + // INIT MULTITASKING (and switch to usermode) task_init(dir); diff --git a/userspace/Makefile b/userspace/Makefile index a508e7f..85c7982 100644 --- a/userspace/Makefile +++ b/userspace/Makefile @@ -25,7 +25,9 @@ include ../Makefile.common all: crt0.o ext2.img + ext2.img: $(PROGS) ../mp/mp.bin + make -C fonts @echo "----------------------" @echo "Creating ext2.img ...." @dd if=/dev/zero of=ext2.img bs=1024 count=$(IMAGESIZE) @@ -38,6 +40,7 @@ ext2.img: $(PROGS) ../mp/mp.bin @echo "Welcome to FoolOs\nWe hope you will enjoy your stay." > mnt/home/miguel/hello.txt @mkdir -p mnt/bin @cp $(PROGS) mnt/bin + @cp fonts/binfont.bin mnt/ @echo "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++." > mnt/home/miguel/hello.brain # cp ~/temp/fool-os-stuff/binutils-build-host-foolos/binutils/readelf mnt/bin @@ -60,6 +63,7 @@ ext2.img: $(PROGS) ../mp/mp.bin @echo "----------------------" clean: + make -C fonts clean @echo "Cleaning userspace ..."; rm -f *.o $(PROGS) ext2.img *.d new: clean all diff --git a/userspace/fonts/Makefile b/userspace/fonts/Makefile index 2eeaf37..a203753 100644 --- a/userspace/fonts/Makefile +++ b/userspace/fonts/Makefile @@ -1,5 +1,5 @@ ############ fool-font ############ binfont.bin: binfont.src - python3.2 binarize.py $< $@ + python3 binarize.py $< $@ clean: -rm binfont.bin diff --git a/userspace/fonts/binarize.py b/userspace/fonts/binarize.py index 1abb9d6..a992c93 100644 --- a/userspace/fonts/binarize.py +++ b/userspace/fonts/binarize.py @@ -74,8 +74,6 @@ def usage(): print ("python3.x binarize.py [file_in] [file_out]") - - """ direct use """ if __name__ == "__main__": -- cgit v1.2.3