From 33947793f4ab67ae8b70b6231c3b00373c5b1d66 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Thu, 21 Mar 2019 12:09:47 -0300 Subject: [PATCH] test-pxe-efi --- configs/releng/build.sh | 13 +++++++++ configs/releng/pxelinux/archiso.cfg | 4 +++ configs/releng/pxelinux/archiso_head.cfg | 25 ++++++++++++++++ configs/releng/pxelinux/archiso_pxe.cfg | 36 ++++++++++++++++++++++++ configs/releng/pxelinux/archiso_tail.cfg | 27 ++++++++++++++++++ configs/releng/pxelinux/syslinux.cfg | 5 ++++ 6 files changed, 110 insertions(+) create mode 100644 configs/releng/pxelinux/archiso.cfg create mode 100644 configs/releng/pxelinux/archiso_head.cfg create mode 100644 configs/releng/pxelinux/archiso_pxe.cfg create mode 100644 configs/releng/pxelinux/archiso_tail.cfg create mode 100644 configs/releng/pxelinux/syslinux.cfg diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 4b56542..34a07ad 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -173,6 +173,18 @@ make_efi() { curl -o ${work_dir}/iso/EFI/shellx64_v1.efi https://raw.githubusercontent.com/tianocore/edk2/UDK2018/EdkShellBinPkg/FullShell/X64/Shell_Full.efi } +# Prepare /EFI/syslinux +make_efi_syslinux() { + mkdir -p ${work_dir}/iso/EFI/syslinux + for _cfg in ${script_path}/pxelinux/*.cfg; do + sed "s|%ARCHISO_LABEL%|${iso_label}|g; + s|%INSTALL_DIR%|${install_dir}|g" ${_cfg} > ${work_dir}/iso/EFI/syslinux/${_cfg##*/} + done +# cp ${script_path}/pxelinux/splash.png ${work_dir}/EFI/syslinux + cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/efi64/*.c32 ${work_dir}/iso/EFI/syslinux + cp ${work_dir}/x86_64/airootfs/usr/lib/syslinux/bios/syslinux.efi ${work_dir}/iso/EFI/syslinux +} + # Prepare efiboot.img::/EFI for "El Torito" EFI boot mode make_efiboot() { mkdir -p ${work_dir}/iso/EFI/archiso @@ -261,6 +273,7 @@ run_once make_boot_extra run_once make_syslinux run_once make_isolinux run_once make_efi +run_once make_efi_syslinux run_once make_efiboot run_once make_prepare run_once make_iso diff --git a/configs/releng/pxelinux/archiso.cfg b/configs/releng/pxelinux/archiso.cfg new file mode 100644 index 0000000..c126cf6 --- /dev/null +++ b/configs/releng/pxelinux/archiso.cfg @@ -0,0 +1,4 @@ +DEFAULT pxe + +LABEL pxe +CONFIG EFI/syslinux/archiso_pxe.cfg diff --git a/configs/releng/pxelinux/archiso_head.cfg b/configs/releng/pxelinux/archiso_head.cfg new file mode 100644 index 0000000..cd47288 --- /dev/null +++ b/configs/releng/pxelinux/archiso_head.cfg @@ -0,0 +1,25 @@ +SERIAL 0 38400 +UI EFI/syslinux/vesamenu.c32 +MENU TITLE Arch Linux +#MENU BACKGROUND EFI/syslinux/splash.png + +MENU WIDTH 78 +MENU MARGIN 4 +MENU ROWS 7 +MENU VSHIFT 10 +MENU TABMSGROW 14 +MENU CMDLINEROW 14 +MENU HELPMSGROW 16 +MENU HELPMSGENDROW 29 + +# Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu + +MENU COLOR border 30;44 #40ffffff #a0000000 std +MENU COLOR title 1;36;44 #9033ccff #a0000000 std +MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all +MENU COLOR unsel 37;44 #50ffffff #a0000000 std +MENU COLOR help 37;40 #c0ffffff #a0000000 std +MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std +MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std +MENU COLOR msg07 37;40 #90ffffff #a0000000 std +MENU COLOR tabmsg 31;40 #30ffffff #00000000 std diff --git a/configs/releng/pxelinux/archiso_pxe.cfg b/configs/releng/pxelinux/archiso_pxe.cfg new file mode 100644 index 0000000..8aacdf2 --- /dev/null +++ b/configs/releng/pxelinux/archiso_pxe.cfg @@ -0,0 +1,36 @@ +INCLUDE EFI/syslinux/archiso_head.cfg + +LABEL arch64_nbd +TEXT HELP +Boot the Arch Linux (x86_64) live medium (Using NBD). +It allows you to install Arch Linux or perform system maintenance. +ENDTEXT +MENU LABEL Boot Arch Linux (x86_64) (NBD) +LINUX /%INSTALL_DIR/%boot/x86_64/vmlinuz +INITRD /%INSTALL_DIR/boot/intel_ucode.img,/%INSTALL_DIR/boot/amd_ucode.img,/%INSTALL_DIR/boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% archiso_nbd_srv=${pxeserver} +SYSAPPEND 3 + +LABEL arch64_nfs +TEXT HELP +Boot the Arch Linux (x86_64) live medium (Using NFS). +It allows you to install Arch Linux or perform system maintenance. +ENDTEXT +MENU LABEL Boot Arch Linux (x86_64) (NFS) +LINUX boot/x86_64/vmlinuz +INITRD /%INSTALL_DIR/boot/intel_ucode.img,/%INSTALL_DIR/boot/amd_ucode.img,/%INSTALL_DIR/boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt +SYSAPPEND 3 + +LABEL arch64_http +TEXT HELP +Boot the Arch Linux (x86_64) live medium (Using HTTP). +It allows you to install Arch Linux or perform system maintenance. +ENDTEXT +MENU LABEL Boot Arch Linux (x86_64) (HTTP) +LINUX /%INSTALL_DIR/boot/x86_64/vmlinuz +INITRD /%INSTALL_DIR/boot/intel_ucode.img,/%INSTALL_DIR/boot/amd_ucode.img,/%INSTALL_DIR/boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ +SYSAPPEND 3 + +INCLUDE EFI/syslinux/archiso_tail.cfg diff --git a/configs/releng/pxelinux/archiso_tail.cfg b/configs/releng/pxelinux/archiso_tail.cfg new file mode 100644 index 0000000..ae00e74 --- /dev/null +++ b/configs/releng/pxelinux/archiso_tail.cfg @@ -0,0 +1,27 @@ +LABEL existing +TEXT HELP +Boot an existing operating system. +Press TAB to edit the disk and partition number to boot. +ENDTEXT +MENU LABEL Boot existing OS +COM32 EFI/syslinux/chain.c32 +APPEND hd0 0 + +# http://www.memtest.org/ +#LABEL memtest +#MENU LABEL Run Memtest86+ (RAM test) +#LINUX boot/memtest + +# http://hdt-project.org/ +LABEL hdt +MENU LABEL Hardware Information (HDT) +COM32 EFI/syslinux/hdt.c32 +APPEND modules_alias=EFI/syslinux/hdt/modalias.gz pciids=EFI/syslinux/hdt/pciids.gz + +LABEL reboot +MENU LABEL Reboot +COM32 EFI/syslinux/reboot.c32 + +LABEL poweroff +MENU LABEL Power Off +COM32 EFI/syslinux/poweroff.c32 diff --git a/configs/releng/pxelinux/syslinux.cfg b/configs/releng/pxelinux/syslinux.cfg new file mode 100644 index 0000000..3ee98de --- /dev/null +++ b/configs/releng/pxelinux/syslinux.cfg @@ -0,0 +1,5 @@ +DEFAULT loadconfig + +LABEL loadconfig + CONFIG archiso.cfg + APPEND ../../ -- 2.21.0