diff --git a/.gitignore b/.gitignore index b128cd2..8d03617 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,5 @@ /config.mk /rootfs/boot/kernelmq.multiboot2 -/rootfs/boot/procman -/rootfs/boot/memgr /vendor/* !/vendor/.keep diff --git a/Makefile b/Makefile index 6f9d434..fc09849 100644 --- a/Makefile +++ b/Makefile @@ -1,37 +1,22 @@ GRUBCFG = rootfs/boot/grub/grub.cfg KERNEL = rootfs/boot/kernelmq.multiboot2 -PROCMAN = rootfs/boot/procman -MEMGR = rootfs/boot/memgr IMAGE = image.iso -.PHONY: kernelmq/kernelmq.multiboot2 procman/procman memgr/memgr +.PHONY: kernelmq/kernelmq.multiboot2 run: $(IMAGE) qemu-system-i386 -cdrom $< -display none -serial stdio clean: - rm -f $(KERNEL) $(PROCMAN) $(MEMGR) + rm -f $(KERNEL) make -C kernelmq clean - make -C procman clean -$(IMAGE): $(GRUBCFG) $(KERNEL) $(PROCMAN) $(MEMGR) +$(IMAGE): $(GRUBCFG) $(KERNEL) grub-mkrescue rootfs -o $@ $(KERNEL): kernelmq/kernelmq.multiboot2 cp $< $@ -$(PROCMAN): procman/procman - cp $< $@ - -$(MEMGR): memgr/memgr - cp $< $@ - kernelmq/kernelmq.multiboot2: make -C kernelmq kernelmq.multiboot2 - -procman/procman: - make -C procman procman - -memgr/memgr: - make -C memgr memgr diff --git a/memgr/.gitignore b/memgr/.gitignore deleted file mode 100644 index 9a41cad..0000000 --- a/memgr/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/memgr diff --git a/memgr/Makefile b/memgr/Makefile deleted file mode 100644 index 3b42577..0000000 --- a/memgr/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -CCPREFIX = i686-elf- - -AS = $(CCPREFIX)as -CC = $(CCPREFIX)gcc -LD = $(CCPREFIX)ld - -MEMGR = memgr - -CFLAGS = -std=gnu99 -ffreestanding -nostdinc -fno-builtin -fno-stack-protector -Wall -Wextra - -all: $(MEMGR) - -clean: - rm -f $(MEMGR) start.o - -$(MEMGR): start.o - $(LD) -o $@ -T linker.ld $^ - -start.o: start.c - $(CC) -c $< -o $@ $(CFLAGS) diff --git a/memgr/linker.ld b/memgr/linker.ld deleted file mode 100644 index 6cc6d47..0000000 --- a/memgr/linker.ld +++ /dev/null @@ -1,29 +0,0 @@ -OUTPUT_ARCH("i386") -OUTPUT_FORMAT("elf32-i386") -ENTRY(_start) - -SECTIONS -{ - . = 0x0; - - .text BLOCK(4K) : ALIGN(4K) - { - *(.text) - } - - .rodata BLOCK(4K) : ALIGN(4K) - { - *(.rodata) - } - - .data BLOCK(4K) : ALIGN(4K) - { - *(.data) - } - - .bss BLOCK(4K) : ALIGN(4K) - { - *(COMMON) - *(.bss) - } -} diff --git a/memgr/start.c b/memgr/start.c deleted file mode 100644 index d6d4900..0000000 --- a/memgr/start.c +++ /dev/null @@ -1,8 +0,0 @@ -void _start() -{ - asm( - "mov $0, %eax \n\t" - "mov $0, %ebx \n\t" - "int $0x80 \n\t" - ); -} diff --git a/procman/.gitignore b/procman/.gitignore deleted file mode 100644 index 992a001..0000000 --- a/procman/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/procman diff --git a/procman/Makefile b/procman/Makefile deleted file mode 100644 index 554afcb..0000000 --- a/procman/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -CCPREFIX = i686-elf- - -AS = $(CCPREFIX)as -CC = $(CCPREFIX)gcc -LD = $(CCPREFIX)ld - -PROCMAN = procman - -CFLAGS = -std=gnu99 -ffreestanding -nostdinc -fno-builtin -fno-stack-protector -Wall -Wextra - -all: $(PROCMAN) - -clean: - rm -f $(PROCMAN) start.o - -$(PROCMAN): start.o - $(LD) -o $@ -T linker.ld $^ - -start.o: start.c - $(CC) -c $< -o $@ $(CFLAGS) diff --git a/procman/linker.ld b/procman/linker.ld deleted file mode 100644 index 6cc6d47..0000000 --- a/procman/linker.ld +++ /dev/null @@ -1,29 +0,0 @@ -OUTPUT_ARCH("i386") -OUTPUT_FORMAT("elf32-i386") -ENTRY(_start) - -SECTIONS -{ - . = 0x0; - - .text BLOCK(4K) : ALIGN(4K) - { - *(.text) - } - - .rodata BLOCK(4K) : ALIGN(4K) - { - *(.rodata) - } - - .data BLOCK(4K) : ALIGN(4K) - { - *(.data) - } - - .bss BLOCK(4K) : ALIGN(4K) - { - *(COMMON) - *(.bss) - } -} diff --git a/procman/start.c b/procman/start.c deleted file mode 100644 index 00a2033..0000000 --- a/procman/start.c +++ /dev/null @@ -1,32 +0,0 @@ -void _start() -{ - asm( - "mov $0, %eax \n\t" - "mov $0, %ebx \n\t" - "int $0x80 \n\t" - - "mov $0, %eax \n\t" - "mov $1, %ebx \n\t" - "int $0x80 \n\t" - - "mov $1, %eax \n\t" - "mov $0, %ebx \n\t" - "int $0x80 \n\t" - - "mov $2, %eax \n\t" - "mov $0, %ebx \n\t" - "int $0x80 \n\t" - - "mov $256, %eax \n\t" - "mov $0, %ebx \n\t" - "int $0x80 \n\t" - - "mov $257, %eax \n\t" - "mov $0, %ebx \n\t" - "int $0x80 \n\t" - - "mov $258, %eax \n\t" - "mov $0, %ebx \n\t" - "int $0x80 \n\t" - ); -} diff --git a/rootfs/boot/grub/grub.cfg b/rootfs/boot/grub/grub.cfg index 83af43f..cc35c15 100644 --- a/rootfs/boot/grub/grub.cfg +++ b/rootfs/boot/grub/grub.cfg @@ -2,6 +2,4 @@ set timeout=0 menuentry "KernelMQ" { multiboot2 /boot/kernelmq.multiboot2 hello kernel - module2 /boot/procman hello module - module2 /boot/memgr }