[arch-releng] [RFC] [PATCH] [configs/releng] Add 32-bit EFI support
Gerardo Exequiel Pozzi
vmlinuz386 at gmail.com
Tue Mar 7 04:11:04 UTC 2017
Support booting 64-bit Linux, from 32-bit EFI firmware.
This was requested some times on our bugtracker.
---
configs/releng/build.sh | 18 ++++++++++++++++++
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, 38 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..d3b8994 100755
--- a/configs/releng/build.sh
+++ b/configs/releng/build.sh
@@ -164,6 +164,15 @@ 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 ${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 +208,15 @@ 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 ${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
More information about the arch-releng
mailing list