From 90adad61495391cf5492875dbd0ae701037a5719 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 6 Oct 2020 16:43:28 +0100 Subject: [PATCH] Fix setup of Raspberry Pi on ARMv7 for UEFI images The Raspberry Pi isn't properly setup for ARMv7 as the arch detect during build was missed, hence nothing gets copied and the image won't boot. Signed-off-by: Peter Robinson --- fedora-disk-base.ks | 8 ++++++++ fedora-modular-disk-minimal.ks | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/fedora-disk-base.ks b/fedora-disk-base.ks index 1921fd3..138813d 100644 --- a/fedora-disk-base.ks +++ b/fedora-disk-base.ks @@ -58,8 +58,16 @@ glibc-all-langpacks %post # Setup Raspberry Pi firmware +if [[ $arch == "aarch64" ]] || [[ $arch == "armv7l" ]]; then +if [[ $arch == "aarch64" ]]; then cp -P /usr/share/uboot/rpi_3/u-boot.bin /boot/efi/rpi3-u-boot.bin cp -P /usr/share/uboot/rpi_4/u-boot.bin /boot/efi/rpi4-u-boot.bin +else +cp -P /usr/share/uboot/rpi_2/u-boot.bin /boot/efi/rpi2-u-boot.bin +cp -P /usr/share/uboot/rpi_3_32b/u-boot.bin /boot/efi/rpi3-u-boot.bin +cp -P /usr/share/uboot/rpi_4_32b/u-boot.bin /boot/efi/rpi4-u-boot.bin +fi +fi releasever=$(rpm --eval '%{fedora}') rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary diff --git a/fedora-modular-disk-minimal.ks b/fedora-modular-disk-minimal.ks index 081197c..f3ee458 100644 --- a/fedora-modular-disk-minimal.ks +++ b/fedora-modular-disk-minimal.ks @@ -55,8 +55,16 @@ sssd-client %post # Setup Raspberry Pi firmware +if [[ $arch == "aarch64" ]] || [[ $arch == "armv7l" ]]; then +if [[ $arch == "aarch64" ]]; then cp -P /usr/share/uboot/rpi_3/u-boot.bin /boot/efi/rpi3-u-boot.bin cp -P /usr/share/uboot/rpi_4/u-boot.bin /boot/efi/rpi4-u-boot.bin +else +cp -P /usr/share/uboot/rpi_2/u-boot.bin /boot/efi/rpi2-u-boot.bin +cp -P /usr/share/uboot/rpi_3_32b/u-boot.bin /boot/efi/rpi3-u-boot.bin +cp -P /usr/share/uboot/rpi_4_32b/u-boot.bin /boot/efi/rpi4-u-boot.bin +fi +fi releasever=$(rpm --eval '%{fedora}') rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary