kernel-zig/grub.sh
Jack Halford e0eda2690c add support for multiboot2
the bump allocator isn't ported
qemu -kernel doesn't support this
2019-08-12 17:22:15 +02:00

20 lines
372 B
Bash
Executable file

#!/bin/bash
exit_missing() {
printf "$_ must be installed\n" ; exit 1;
}
which xorriso || exit_missing
which grub-mkrescue || exit_missing
mkdir -p build/iso/boot/grub
cp build/kernel build/iso/boot
>build/iso/boot/grub/grub.cfg <<EOF
set timeout=0
set default=0
menuentry "OS" {
multiboot2 /boot/kernel
boot
}
EOF
grub-mkrescue -o build/kernel.iso build/iso