1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2025-04-14 17:33:13 -04:00

Build ISO image for testing

This commit is contained in:
Braiden Vasco 2017-11-01 09:20:44 +00:00
parent aa71f8e70b
commit 30b70092e2
5 changed files with 52 additions and 4 deletions

View file

@ -1,8 +1,23 @@
run: all
qemu-system-i386 -kernel arch/kernel -d guest_errors
run: run-iso
all:
all: all-kernel all-iso
clean: clean-iso clean-kernel
run-kernel:
make run -C arch I=$(shell pwd)/include
all-kernel:
make all -C arch I=$(shell pwd)/include
clean:
clean-kernel:
make clean -C arch I=$(shell pwd)/include
run-iso: all-kernel
make run -C iso K=$(shell pwd)/arch/kernel
all-iso: all-kernel
make all -C iso K=$(shell pwd)/arch/kernel
clean-iso:
make clean -C iso K=$(shell pwd)/arch/kernel

View file

@ -9,6 +9,9 @@ CC = $(CCPREFIX)gcc
OBJS = boot.s.o main.c.o logger.c.o console.c.o gdt.c.o gdt.asm.o idt.c.o idt.asm.o isr.c.o isr.asm.o
run: kernel
qemu-system-i386 -kernel kernel -d guest_errors
all: kernel
clean:

2
iso/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/image.iso
/rootfs/boot/kernelmq

21
iso/Makefile Normal file
View file

@ -0,0 +1,21 @@
ifneq (ok, $(shell test -f '$(K)' && echo 'ok'))
$(error 'Kernel "$(K)" does not exist')
endif
ifneq (ok, $(shell grub-file --is-x86-multiboot '$(K)' && echo 'ok'))
$(error 'Kernel "$(K)" is not compliant with Multiboot 1')
endif
ifneq (ok, $(shell grub-file --is-x86-multiboot2 '$(K)' && echo 'ok'))
$(error 'Kernel "$(K)" is not compliant with Multiboot 2')
endif
run: all
qemu-system-i386 -cdrom image.iso
all:
cp "$(K)" rootfs/boot/kernelmq
grub-mkrescue rootfs -o image.iso
clean:
rm -f image.iso rootfs/boot/kernelmq

View file

@ -0,0 +1,7 @@
menuentry "KernelMQ, multiboot 1" {
multiboot /boot/kernelmq
}
menuentry "KernelMQ, multiboot 2" {
multiboot2 /boot/kernelmq
}