Add target for disk img

This commit is contained in:
Mathieu Maret 2021-10-05 22:07:17 +02:00
parent 1ce5874b0a
commit 4fe87718b1

View File

@ -32,7 +32,7 @@ fd.iso: kernel
grub-mkrescue -o $@ isodir
disk.img:
qemu-img create -f qcow2 disk2.img 32M
qemu-img create -f qcow2 disk.img 32M
#https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html#x86-Function-Attributes
arch/$(ARCH)/exception_handler.o:arch/$(ARCH)/exception_handler.c
@ -48,13 +48,12 @@ arch/$(ARCH)/irq_handler.o:arch/$(ARCH)/irq_handler.c
test: CFLAGS += -DRUN_TEST
test: clean kernel
test: clean kernel disk.img
qemu-system-x86_64 -kernel kernel -serial stdio -m 32M $(QEMU_OPT)
run:kernel
run:kernel disk.img
qemu-system-x86_64 -kernel $< $(QEMU_OPT)
debug: CFLAGS += $(DEBUG_FLAGS) -DRUN_TEST
debug: CXXFLAGS += $(DEBUG_FLAGS)
debug:kernel kernel.sym