1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-11-20 11:16:10 -05:00

Remove modules

This commit is contained in:
Alex Kotov 2020-12-06 05:36:55 +05:00
parent fd8751af99
commit 7fe1a796b2
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
11 changed files with 3 additions and 162 deletions

2
.gitignore vendored
View file

@ -5,7 +5,5 @@
/config.mk
/rootfs/boot/kernelmq.multiboot2
/rootfs/boot/procman
/rootfs/boot/memgr
/vendor/*
!/vendor/.keep

View file

@ -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

1
memgr/.gitignore vendored
View file

@ -1 +0,0 @@
/memgr

View file

@ -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)

View file

@ -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)
}
}

View file

@ -1,8 +0,0 @@
void _start()
{
asm(
"mov $0, %eax \n\t"
"mov $0, %ebx \n\t"
"int $0x80 \n\t"
);
}

1
procman/.gitignore vendored
View file

@ -1 +0,0 @@
/procman

View file

@ -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)

View file

@ -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)
}
}

View file

@ -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"
);
}

View file

@ -2,6 +2,4 @@ set timeout=0
menuentry "KernelMQ" {
multiboot2 /boot/kernelmq.multiboot2 hello kernel
module2 /boot/procman hello module
module2 /boot/memgr
}