31 lines
804 B
Bash
Executable File
31 lines
804 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ -z "$1" ]; then
|
|
echo "Argument 1 must be the Rust target triple."
|
|
exit 1
|
|
fi
|
|
|
|
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit 1 ; pwd -P )"
|
|
cd "$SCRIPTPATH" || exit 1
|
|
|
|
rm -rf ./iso/
|
|
rm ./gila.iso
|
|
#cargo clean
|
|
|
|
set -euxo pipefail
|
|
|
|
mkdir -p ./iso/limine/
|
|
cp ./limine.conf ./iso/
|
|
cp /usr/share/limine/limine-bios.sys ./iso/limine/
|
|
cp /usr/share/limine/limine-bios-cd.bin ./iso/limine/
|
|
cp /usr/share/limine/limine-uefi-cd.bin ./iso/limine/
|
|
|
|
cargo build --target="$1" --release
|
|
cp target/"$1"/release/gila ./iso/
|
|
|
|
xorriso -as mkisofs -b limine/limine-bios-cd.bin -no-emul-boot \
|
|
-boot-load-size 4 -boot-info-table --efi-boot \
|
|
limine/limine-uefi-cd.bin -efi-boot-part --efi-boot-image \
|
|
--protective-msdos-label iso -o gila.iso
|
|
|
|
limine bios-install gila.iso |