diff --git a/calamares-2.4.4-fix-uefi32-cal-403.patch b/calamares-2.4.4-fix-uefi32-cal-403.patch new file mode 100644 index 0000000..e03ed04 --- /dev/null +++ b/calamares-2.4.4-fix-uefi32-cal-403.patch @@ -0,0 +1,40 @@ +From c7dd77c0f9b9bbc904dbe0e63055775bb92c7f0e Mon Sep 17 00:00:00 2001 +Message-Id: +From: Kevin Kofler +Date: Sun, 6 Nov 2016 03:38:34 +0100 +Subject: [PATCH] [bootloader] Fix UEFI firmware workaround for 32-bit UEFI. + +On 32-bit UEFI (note that the bitness of the firmware is what matters +here, not the bitness of the distribution), instead of copying +grubx64.efi to bootx64.efi, copy grubia32.efi to bootia32.efi. + +Patch by TeHMoroS from SparkyLinux. + +CAL-403 #close +--- + src/modules/bootloader/main.py | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py +index c009443..9feb02e 100644 +--- a/src/modules/bootloader/main.py ++++ b/src/modules/bootloader/main.py +@@ -231,9 +231,13 @@ def install_grub(efi_directory, fw_type): + check_target_env_call(["mkdir", "-p", efi_boot_directory]) + + # Workaround for some UEFI firmwares ++ efi_file_source = {"32": os.path.join(efi_directory_firmware, efi_bootloader_id, "grubia32.efi"), ++ "64": os.path.join(efi_directory_firmware, efi_bootloader_id, "grubx64.efi")} ++ efi_file_target = {"32": os.path.join(efi_boot_directory, "bootia32.efi"), ++ "64": os.path.join(efi_boot_directory, "bootx64.efi")} + check_target_env_call(["cp", +- os.path.join(efi_directory_firmware, efi_bootloader_id, "grubx64.efi"), +- os.path.join(efi_boot_directory, "bootx64.efi")]) ++ efi_file_source[efi_bitness], ++ efi_file_target[efi_bitness]]) + else: + print("Bootloader: grub (bios)") + boot_loader = libcalamares.globalstorage.value("bootLoader") +-- +2.7.4 + diff --git a/calamares.spec b/calamares.spec index 5b4e6df..455554c 100644 --- a/calamares.spec +++ b/calamares.spec @@ -43,6 +43,10 @@ Patch100: calamares-2.4.4-bootloader-fix-vfat_correct_case.patch # https://github.com/calamares/calamares/commit/c0ebc91b15f49b353d02844f264e5d9fdcbb7550 Patch101: calamares-2.4.4-fix-checkHasInternet.patch +# fix UEFI firmware workaround for 32-bit UEFI (CAL-403, patch by TeHMoroS) +# https://github.com/calamares/calamares/commit/c7dd77c0f9b9bbc904dbe0e63055775bb92c7f0e +Patch102: calamares-2.4.4-fix-uefi32-cal-403.patch + # Calamares is only supported where live images (and GRUB) are. (#1171380) # This list matches the livearches global from anaconda.spec ExclusiveArch: %{ix86} x86_64 ppc ppc64 ppc64le @@ -102,8 +106,12 @@ Requires: upower Requires: NetworkManager Requires: dracut Requires: grub2 -%ifarch %{ix86} x86_64 -# EFI currently only supported on x86/x86_64 +%ifarch x86_64 +# EFI currently only supported on x86_64 +# It should also work on 32-bit x86, but it is better to let the spin maintainer +# decide whether to attempt supporting it. Proper EFI support on 32-bit +# distributions would require also shipping the x86_64 grub2-efi* packages, +# which are not available in the 32-bit Fedora repositories. Requires: grub2-efi Requires: grub2-efi-modules %endif @@ -174,6 +182,7 @@ developing custom modules for Calamares. %setup -q %{?snaphash:-n %{name}-%{snaphash}} %patch100 -p1 %patch101 -p1 +%patch102 -p1 %patch0 -p1 -b .default-settings # delete backup files so they don't get installed rm -f src/modules/*/*.conf.default-settings @@ -322,6 +331,10 @@ fi %changelog +* Sun Nov 06 2016 Kevin Kofler - 2.4.4-4 +- Fix UEFI firmware workaround for 32-bit UEFI (CAL-403, patch by TeHMoroS) +- Disable the Requires: grub2-efi grub2-efi-modules on 32-bit x86 again + * Sat Nov 05 2016 Kevin Kofler - 2.4.4-3 - Fix the check for available Internet connection on startup