#!/bin/bash set -euo pipefail rm -rf img mkdir -p img/boot/efi/boot cd lib/acpica-build make -j4 cd ../../kernel cargo build --release cd ../loader cargo build --release cd .. cp target/x86_64-unknown-uefi/release/loader.efi img/boot/efi/boot/bootx64.efi cd img dd if=/dev/zero of=boot.img bs=1M count=16 status=none mformat -i boot.img mcopy -si boot.img boot/* :: dd if=/dev/zero of=os.img bs=1M count=32 status=none parted -s os.img mklabel gpt parted -s os.img mkpart primary fat32 2048s 100% parted -s os.img set 1 esp on dd if=boot.img of=os.img bs=1M seek=1 conv=notrunc status=none