Bug#885692: live-build: [Patch] Support building ARM64 live system with EFI boot mechanism
Hello Steven,
On Fri, 29 Dec 2017, Steven Shiau wrote:
> Dear Maintainer,
>
> Attached please find the patch for creating EFI boot mechanism for ARM64
> system. It would be great to have this for creating ARM64 Debian live. My 2 cents.
How did you test the resulting image? On what kind of hardware?
Please find below a few comments that I would like you to take into
account. Please submit an updated (and tested) patch via a merge request
on https://salsa.debian.org/live-team/live-build
> # Checking depends
> -Check_package chroot /usr/lib/grub/x86_64-efi/configfile.mod grub-efi-amd64-bin
> -Check_package chroot /usr/lib/grub/i386-efi/configfile.mod grub-efi-ia32-bin
> +case "${LB_LINUX_FLAVOURS}" in
Please test LB_ARCHITECTURES here. The flavours of the kernel do vary over
time, the architectures much less so. Same for the second case below:
> +case "${LB_LINUX_FLAVOURS}" in
> + amd64|486|586|686*|generic)
> + "\${LIVE_BUILD_PATH}/efi-image" "${_CHROOT_DIR}/grub-efi-temp-x86_64-efi/" "x86_64-efi" "x64" "debian-live/amd64"
> + mkdir -p ${_CHROOT_DIR}/grub-efi-temp/efi/boot
> + mcopy -n -i ${_CHROOT_DIR}/grub-efi-temp-x86_64-efi/efi.img '::efi/boot/boot*.efi' ${_CHROOT_DIR}/grub-efi-temp/efi/boot
> + cp -r "${_CHROOT_DIR}"/grub-efi-temp-x86_64-efi/* "${_CHROOT_DIR}/grub-efi-temp/"
> +
> + "\${LIVE_BUILD_PATH}/efi-image" "${_CHROOT_DIR}/grub-efi-temp-i386-efi/" "i386-efi" "ia32" "debian-live/i386"
> + PATH="\${PRE_EFI_IMAGE_PATH}"
> + mkdir -p ${_CHROOT_DIR}/grub-efi-temp/efi/boot
> + mcopy -n -i ${_CHROOT_DIR}/grub-efi-temp-i386-efi/efi.img '::efi/boot/boot*.efi' ${_CHROOT_DIR}/grub-efi-temp/efi/boot
> + cp -r "${_CHROOT_DIR}"/grub-efi-temp-i386-efi/* "${_CHROOT_DIR}/grub-efi-temp/"
> + ;;
> + arm64)
> + "\${LIVE_BUILD_PATH}/efi-image" "${_CHROOT_DIR}/grub-efi-temp-arm64-efi/" "arm64-efi" "aa64" "debian-live/arm64"
> + mkdir -p ${_CHROOT_DIR}/grub-efi-temp/efi/boot
> + mcopy -n -i ${_CHROOT_DIR}/grub-efi-temp-arm64-efi/efi.img '::efi/boot/boot*.efi' ${_CHROOT_DIR}/grub-efi-temp/efi/boot
> + cp -r "${_CHROOT_DIR}"/grub-efi-temp-arm64-efi/* "${_CHROOT_DIR}/grub-efi-temp/"
> + PATH="\${PRE_EFI_IMAGE_PATH}"
> + ;;
> +esac
If I read this part correctly, we are doing three time the same thing but
with different values for each architecture. Please factor out the code in
a single function that you call three times with appropriate parameters.
Cheers,
--
Raphaël Hertzog ◈ Debian Developer
Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/
Reply to: