makefile: add rule: iso creation && run_iso

This commit is contained in:
starnakin 2024-09-07 11:56:18 +02:00
parent 416a0c5635
commit 4e302452c1
3 changed files with 14 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
build build
obj obj
isodir

View File

@ -31,6 +31,15 @@ $(NAME): $(OBJ)
run: $(NAME) run: $(NAME)
qemu-system-i386 -kernel build/$(NAME).bin qemu-system-i386 -kernel build/$(NAME).bin
iso: $(NAME)
mkdir -p isodir/boot/grub
cp build/$(NAME).bin isodir/boot/bozOS.bin
cp config/grub.cfg isodir/boot/grub/grub.cfg
grub-mkrescue -o build/bozOS.iso isodir
run_iso: iso
qemu-system-i386 -cdrom build/bozOS.iso
clean: clean:
make -C libbozo clean make -C libbozo clean
rm -rf obj/ rm -rf obj/
@ -41,4 +50,4 @@ fclean: clean
re: fclean all re: fclean all
.PHONY: all clean fclean re run .PHONY: all clean fclean re run iso run_iso

3
config/grub.cfg Normal file
View File

@ -0,0 +1,3 @@
menuentry "bozos" {
multiboot /boot/bozOS.bin
}