summaryrefslogtreecommitdiffstats
path: root/EFI
diff options
context:
space:
mode:
Diffstat (limited to 'EFI')
-rw-r--r--EFI/BOOT/make-grub.sh19
1 files changed, 14 insertions, 5 deletions
diff --git a/EFI/BOOT/make-grub.sh b/EFI/BOOT/make-grub.sh
index d5fcd65..ca5869b 100644
--- a/EFI/BOOT/make-grub.sh
+++ b/EFI/BOOT/make-grub.sh
@@ -26,11 +26,20 @@
# image (efiboot.img) that goes in the /isolinux directory for booting on
# UEFI systems.
+# Preparations:
+eval $1 # EFIFORM=value1
+eval $2 # EFISUFF=value2
+
+# Defaults in case the script was called without parameters:
+EFIFORM=${EFIFORM:-"x86_64"}
+EFISUFF=${EFISUFF:-"x64"}
+
echo
-echo "Building /EFI/BOOT/bootx64.efi and /boot/syslinux/efiboot.img."
+echo "Building /EFI/BOOT/boot${EFISUFF}.efi and /boot/syslinux/efiboot.img."
-# First, build bootx64.efi, which will be installed here in /EFI/BOOT:
-grub-mkimage --format=x86_64-efi --output=bootx64.efi --config=grub-embedded.cfg --compression=xz --prefix=/EFI/BOOT part_gpt part_msdos fat ext2 hfs hfsplus iso9660 udf ufs1 ufs2 zfs chain linux boot appleldr ahci configfile normal regexp minicmd reboot halt search search_fs_file search_fs_uuid search_label gfxterm gfxmenu efi_gop efi_uga all_video loadbios gzio echo true probe loadenv bitmap_scale font cat help ls png jpeg tga test at_keyboard usb_keyboard
+# First, build bootx64.efi/bootia32.efi,
+# which will be installed here in /EFI/BOOT:
+grub-mkimage --format=${EFIFORM}-efi --output=boot${EFISUFF}.efi --config=grub-embedded.cfg --compression=xz --prefix=/EFI/BOOT part_gpt part_msdos fat ext2 hfs hfsplus iso9660 udf ufs1 ufs2 zfs chain linux boot appleldr ahci configfile normal regexp minicmd reboot halt search search_fs_file search_fs_uuid search_label gfxterm gfxmenu efi_gop efi_uga all_video loadbios gzio echo true probe loadenv bitmap_scale font cat help ls png jpeg tga test at_keyboard usb_keyboard
# Then, create a FAT formatted image that contains bootx64.efi in the
# /EFI/BOOT directory. This is used to bootstrap GRUB from the ISO image.
@@ -43,7 +52,7 @@ MOUNTPOINT=$(mktemp -d)
mount -o loop efiboot.img $MOUNTPOINT
# Copy the GRUB binary to /EFI/BOOT:
mkdir -p $MOUNTPOINT/EFI/BOOT
-cp -a bootx64.efi $MOUNTPOINT/EFI/BOOT
+cp -a boot${EFISUFF}.efi $MOUNTPOINT/EFI/BOOT
# Unmount and clean up:
umount $MOUNTPOINT
rmdir $MOUNTPOINT
@@ -51,5 +60,5 @@ rmdir $MOUNTPOINT
mv efiboot.img ../../boot/syslinux/
echo
-echo "Done building /EFI/BOOT/bootx64.efi and /boot/syslinux/efiboot.img."
+echo "Done building /EFI/BOOT/boot${EFISUFF}.efi and /boot/syslinux/efiboot.img."