From 43368f5a57f1ce53c1d13bbf8cb32a0ebb3cf5f1 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Tue, 7 Mar 2017 00:52:41 -0300 Subject: [PATCH] [configs/releng] Add 32-bit EFI support Support booting 64-bit Linux, from 32-bit EFI firmware. --- configs/releng/build.sh | 24 ++++++++++++++++++++++++ configs/releng/efiboot/syslinux/archiso-cd.cfg | 7 +++++++ configs/releng/efiboot/syslinux/archiso-usb.cfg | 7 +++++++ configs/releng/efiboot/syslinux/syslinux.cfg | 6 ++++++ 4 files changed, 44 insertions(+) create mode 100644 configs/releng/efiboot/syslinux/archiso-cd.cfg create mode 100644 configs/releng/efiboot/syslinux/archiso-usb.cfg create mode 100644 configs/releng/efiboot/syslinux/syslinux.cfg diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 72b1e3f..17b929a 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -164,6 +164,18 @@ make_efi() { curl -o ${work_dir}/iso/EFI/shellx64_v2.efi https://raw.githubusercontent.com/tianocore/edk2/master/ShellBinPkg/UefiShell/X64/Shell.efi # EFI Shell 1.0 for non UEFI 2.3+ curl -o ${work_dir}/iso/EFI/shellx64_v1.efi https://raw.githubusercontent.com/tianocore/edk2/master/EdkShellBinPkg/FullShell/X64/Shell_Full.efi + + cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/efi32/syslinux.efi ${work_dir}/iso/EFI/boot/bootia32.efi + cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/efi32/ldlinux.e32 ${work_dir}/iso/EFI/boot/ + cp ${script_path}/efiboot/syslinux/syslinux.cfg ${work_dir}/iso/EFI/boot/ + + mkdir ${work_dir}/iso/EFI/syslinux + cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/efi32/libutil.c32 ${work_dir}/iso/EFI/syslinux/ + cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/efi32/menu.c32 ${work_dir}/iso/EFI/syslinux/ + + sed "s|%ARCHISO_LABEL%|${iso_label}|g; + s|%INSTALL_DIR%|${install_dir}|g" \ + ${script_path}/efiboot/syslinux/archiso-usb.cfg > ${work_dir}/iso/EFI/syslinux/archiso.cfg } # Prepare efiboot.img::/EFI for "El Torito" EFI boot mode @@ -199,6 +211,18 @@ make_efiboot() { cp ${work_dir}/iso/EFI/shellx64_v2.efi ${work_dir}/efiboot/EFI/ cp ${work_dir}/iso/EFI/shellx64_v1.efi ${work_dir}/efiboot/EFI/ + cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/efi32/syslinux.efi ${work_dir}/efiboot/EFI/boot/bootia32.efi + cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/efi32/ldlinux.e32 ${work_dir}/efiboot/EFI/boot/ + cp ${script_path}/efiboot/syslinux/syslinux.cfg ${work_dir}/efiboot/EFI/boot/ + + mkdir ${work_dir}/efiboot/EFI/syslinux + cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/efi32/libutil.c32 ${work_dir}/efiboot/EFI/syslinux/ + cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/efi32/menu.c32 ${work_dir}/efiboot/EFI/syslinux/ + + sed "s|%ARCHISO_LABEL%|${iso_label}|g; + s|%INSTALL_DIR%|${install_dir}|g" \ + ${script_path}/efiboot/syslinux/archiso-cd.cfg > ${work_dir}/efiboot/EFI/syslinux/archiso.cfg + umount -d ${work_dir}/efiboot } diff --git a/configs/releng/efiboot/syslinux/archiso-cd.cfg b/configs/releng/efiboot/syslinux/archiso-cd.cfg new file mode 100644 index 0000000..aebe289 --- /dev/null +++ b/configs/releng/efiboot/syslinux/archiso-cd.cfg @@ -0,0 +1,7 @@ +UI menu.c32 + +LABEL arch64 +MENU LABEL Boot Arch Linux (x86_64) +LINUX /EFI/archiso/vmlinuz +INITRD /EFI/archiso/intel_ucode.img,/EFI/archiso/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% diff --git a/configs/releng/efiboot/syslinux/archiso-usb.cfg b/configs/releng/efiboot/syslinux/archiso-usb.cfg new file mode 100644 index 0000000..03df5ca --- /dev/null +++ b/configs/releng/efiboot/syslinux/archiso-usb.cfg @@ -0,0 +1,7 @@ +UI menu.c32 + +LABEL arch64 +MENU LABEL Boot Arch Linux (x86_64) +LINUX /%INSTALL_DIR%/boot/x86_64/vmlinuz +INITRD /%INSTALL_DIR%/boot/intel_ucode.img,/%INSTALL_DIR%/boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% diff --git a/configs/releng/efiboot/syslinux/syslinux.cfg b/configs/releng/efiboot/syslinux/syslinux.cfg new file mode 100644 index 0000000..77b6407 --- /dev/null +++ b/configs/releng/efiboot/syslinux/syslinux.cfg @@ -0,0 +1,6 @@ +PATH /EFI/syslinux/ +DEFAULT loadconfig + +LABEL loadconfig + CONFIG /EFI/syslinux/archiso.cfg + APPEND /EFI/ -- 2.12.0