[arch-releng] [DRAFT][RFC][PATCH][archiso] Add UEFI boot support via Linux >= 3.3 EFI boot stub.
Gerardo Exequiel Pozzi
vmlinuz386 at yahoo.com.ar
Tue Mar 20 13:45:59 EDT 2012
----- Mensaje original -----
> De: Keshav P R <the.ridikulus.rat at gmail.com>
> Para: Arch Linux Release Engineering <arch-releng at archlinux.org>
> CC:
> Enviado: martes, 20 de marzo de 2012 13:03
> Asunto: Re: [arch-releng] [DRAFT][RFC][PATCH][archiso] Add UEFI boot support via Linux >= 3.3 EFI boot stub.
>
> On Tue, Mar 20, 2012 at 21:29, Gerardo Exequiel Pozzi
> <vmlinuz386 at yahoo.com.ar> wrote:
>> Support is only added to x86_64. This only works via (U)EFI shell. Boot
> with:
>>
>> fs0:\EFI\linux\vmlinuz.efi archisolabel=ARCH_201203
> initrd=\EFI\linux\archiso.img
>>
>> There are plans to support command line options via a config file (not yet
> in linux-3.3),
>> in such case vmlinuz.efi can be renamed to bootia64.efi and placed to
> \EFI\boot to automatic boot.
>
> Should be bootx64.efi
oops, true. Thanks.
>
>>
>> ---
>> archiso/mkarchiso | 11 ++++++++++-
>> configs/releng/build.sh | 25 +++++++++++++++++++++++++
>> 2 files changed, 35 insertions(+), 1 deletion(-)
>>
>> diff --git a/archiso/mkarchiso b/archiso/mkarchiso
>> index ad88b0b..208f7b6 100755
>> --- a/archiso/mkarchiso
>> +++ b/archiso/mkarchiso
>> @@ -380,6 +380,8 @@ command_checksum () {
>>
>> # Create an ISO9660 filesystem from "iso" directory.
>> command_iso () {
>> + local _iso_efi_boot_args
>> +
>> if [[ ! -f "${work_dir}/iso/isolinux/isolinux.bin" ]]; then
>> _msg_error "The file
> '${work_dir}/iso/isolinux/isolinux.bin' does not exist." 1
>> fi
>> @@ -387,6 +389,12 @@ command_iso () {
>> _msg_error "The file
> '${work_dir}/iso/isolinux/isohdpfx.bin' does not exist." 1
>> fi
>>
>> + if [[ -d "${work_dir}/iso/EFI" ]]; then
>> + _iso_efi_boot_args="-eltorito-alt-boot --efi-boot
> EFI/archiso/archiso.fat -no-emul-boot"
>> + else
>> + _iso_efi_boot_args=""
>> + fi
>> +
>> _show_config iso
>>
>> if _is_directory_changed "${work_dir}/iso"
> "${out_dir}/${img_name}"; then
>> @@ -398,9 +406,10 @@ command_iso () {
>> fi
>> xorriso -as mkisofs ${_qflag} -r -l \
>> -b isolinux/isolinux.bin -c isolinux/boot.cat \
>> - -iso-level 3 \
>> -no-emul-boot -boot-load-size 4 -boot-info-table \
>> + ${_iso_efi_boot_args} \
>> -isohybrid-mbr ${work_dir}/iso/isolinux/isohdpfx.bin \
>> + -iso-level 3 \
>> -p "prepared by mkarchiso" \
>> -publisher "${iso_publisher}" \
>> -A "${iso_application}" \
>> diff --git a/configs/releng/build.sh b/configs/releng/build.sh
>> index 2faf210..f4ca11e 100755
>> --- a/configs/releng/build.sh
>> +++ b/configs/releng/build.sh
>> @@ -58,6 +58,29 @@ make_boot() {
>> fi
>> }
>>
>> +# Prepare /EFI (using linux EFI boot stub)
>> +make_boot_efi() {
>> + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
>> + if [[ ${arch} == "x86_64" ]]; then
>> + mkdir -p ${work_dir}/iso/EFI/linux
>> + cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz
> ${work_dir}/iso/EFI/linux/vmlinuz.efi
>> + cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img
> ${work_dir}/iso/EFI/linux/archiso.img
>> + # There are plans to support command line options via a config
> file (not yet in linux-3.3)
>> + # echo "archisolabel=${iso_label}
> initrd=\EFI\linux\archiso.img" | iconv -f ascii -t ucs2 >
> ${work_dir}/iso/EFI/linux/vmlinuz.conf
>> + mkdir -p ${work_dir}/iso/EFI/archiso
>> + mkdir -p ${work_dir}/fat
>> + dd of=${work_dir}/iso/EFI/archiso/archiso.fat bs=1 seek=32M
> count=0
>> + mkfs.vfat ${work_dir}/iso/EFI/archiso/archiso.fat
>> + mount ${work_dir}/iso/EFI/archiso/archiso.fat ${work_dir}/fat/
>> + mkdir -p ${work_dir}/fat/EFI/linux
>> + cp ${work_dir}/iso/EFI/linux/vmlinuz.efi
> ${work_dir}/fat/EFI/linux
>> + cp ${work_dir}/iso/EFI/linux/archiso.img
> ${work_dir}/fat/EFI/linux
>> + # cp ${work_dir}/iso/EFI/linux/vmlinuz.conf
> ${work_dir}/fat/EFI/linux
>> + umount ${work_dir}/fat/
>> + fi
>> + fi
>> +}
>> +
>> # Prepare /${install_dir}/boot/syslinux
>> make_syslinux() {
>> if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
>> @@ -155,6 +178,7 @@ make_core_repo() {
>> fi
>> }
>>
>> +
>> # Process aitab
>> # args: $1 (core | netinstall)
>> make_aitab() {
>> @@ -259,6 +283,7 @@ make_common_single() {
>> make_packages
>> make_setup_mkinitcpio
>> make_boot
>> + make_boot_efi
>> make_syslinux
>> make_isolinux
>> make_customize_root_image
>> --
>> 1.7.9.4
>>
>
More information about the arch-releng
mailing list