Last active
August 4, 2024 06:56
-
-
Save mekb-turtle/8ff002b06a6f7fdfc05651a6d91e1b20 to your computer and use it in GitHub Desktop.
Test Limine configurations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
DIR=/tmp/liminetest | |
ISO_DIR=$DIR/isoroot | |
ISO=$DIR/out.iso | |
LIMINE_CONFIG=limine.conf | |
LIMINE_EXTRA_FILES=(limine_bg.bmp) | |
LIMINE_BIN_DIR=/usr/share/limine | |
LIMINE_TOOL=limine | |
#LIMINE_BIN_DIR=~/clone2/limine/bin | |
#LIMINE_TOOL=~/clone2/limine/bin/limine | |
mkdir -pv "$DIR/" "$ISO_DIR/" && \ | |
cp -v "${1-/boot/$LIMINE_CONFIG}" "$ISO_DIR/$LIMINE_CONFIG" || exit "$?" | |
for i in "${LIMINE_EXTRA_FILES[@]}"; do | |
cp -vr "/boot/${i}" "$ISO_DIR/${i}" | |
done | |
cp -v "$LIMINE_BIN_DIR/"limine-uefi-cd.bin \ | |
"$LIMINE_BIN_DIR/"limine-bios-cd.bin \ | |
"$ISO_DIR/" && | |
xorriso -as mkisofs -b limine-bios-cd.bin \ | |
-no-emul-boot -boot-load-size 4 -boot-info-table \ | |
--efi-boot limine-uefi-cd.bin \ | |
-efi-boot-part --efi-boot-image --protective-msdos-label \ | |
"$ISO_DIR/" -o "$ISO" && \ | |
"$LIMINE_TOOL" bios-install "$ISO" && \ | |
"qemu-system-$(uname -m)" -m 256 -bios /usr/share/edk2-ovmf/x64/OVMF.fd -cdrom "$ISO" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment