summaryrefslogtreecommitdiff
path: root/configs/releng
diff options
context:
space:
mode:
Diffstat (limited to 'configs/releng')
-rwxr-xr-xconfigs/releng/build.sh38
-rw-r--r--configs/releng/efiboot/EFI/boot/startup.nsh10
2 files changed, 48 insertions, 0 deletions
diff --git a/configs/releng/build.sh b/configs/releng/build.sh
index f4138db..22d7110 100755
--- a/configs/releng/build.sh
+++ b/configs/releng/build.sh
@@ -58,6 +58,43 @@ make_boot() {
fi
}
+# Prepare EFI "El Torito" boot image (using Linux >= 3.3 EFI boot stub)
+make_boot_efi() {
+ if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
+ if [[ ${arch} == "x86_64" ]]; then
+ mkdir -p ${work_dir}/iso/EFI/archiso
+ dd of=${work_dir}/iso/EFI/archiso/efiboot.img bs=1 seek=20M count=0
+ mkfs.vfat ${work_dir}/iso/EFI/archiso/efiboot.img
+
+ mkdir -p ${work_dir}/efiboot
+ mount ${work_dir}/iso/EFI/archiso/efiboot.img ${work_dir}/efiboot
+
+ mkdir -p ${work_dir}/efiboot/EFI/archiso
+ cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz ${work_dir}/efiboot/EFI/archiso/vmlinuz.efi
+ cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img ${work_dir}/efiboot/EFI/archiso/archiso.img
+
+ # There are plans to support command line options via a config file (not yet in linux-3.3)
+ #cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz ${work_dir}/efiboot/EFI/boot/bootx64.efi
+ #cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img ${work_dir}/efiboot/EFI/boot/linux.img
+ #echo "archisolabel=${iso_label} initrd=\EFI\boot\linux.img" | iconv -f ascii -t ucs2 > ${work_dir}/iso/EFI/boot/linux.conf
+
+ # For now, provide an EFI-shell until 'linux.conf' hits mainline.
+ mkdir -p ${work_dir}/efiboot/EFI/boot
+ # EFI Shell 2.0 for UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UEFI_Shell )
+ #wget -O ${work_dir}/efiboot/EFI/boot/bootx64.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi
+ # EFI Shell 1.0 for non UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Efi-shell )
+ wget -O ${work_dir}/efiboot/EFI/boot/bootx64.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EdkShellBinPkg/FullShell/X64/Shell_Full.efi
+
+ # Add an EFI shell script for automatic boot if ESC-key is not pressed within 5 seconds timeout.
+ sed "s|%ARCHISO_LABEL%|${iso_label}|g;
+ s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/efiboot/EFI/boot/startup.nsh > ${work_dir}/efiboot/EFI/boot/startup.nsh
+
+ umount ${work_dir}/efiboot
+ fi
+ : > ${work_dir}/build.${FUNCNAME}
+ fi
+}
+
# Prepare /${install_dir}/boot/syslinux
make_syslinux() {
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
@@ -264,6 +301,7 @@ make_common_single() {
make_packages
make_setup_mkinitcpio
make_boot
+ make_boot_efi
make_syslinux
make_isolinux
make_customize_root_image
diff --git a/configs/releng/efiboot/EFI/boot/startup.nsh b/configs/releng/efiboot/EFI/boot/startup.nsh
new file mode 100644
index 0000000..f50aed2
--- /dev/null
+++ b/configs/releng/efiboot/EFI/boot/startup.nsh
@@ -0,0 +1,10 @@
+@echo -off
+
+for %m run (0 9)
+ if exist fs%m:\EFI\archiso\vmlinuz.efi then
+ fs%m:
+ cd fs%m:\EFI\archiso
+ echo "Launching Arch Linux ISO Kernel fs%m:\EFI\archiso\vmlinuz.efi"
+ vmlinuz.efi archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% initrd=\EFI\archiso\archiso.img
+ endif
+endfor