From ca67b09c015d4af3ae3cce12aa72e60941dbb8b5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 18:29:52 +0200 Subject: Adding debian version 2.06-13+deb12u1. Signed-off-by: Daniel Baumann --- debian/patches/install-efi-fallback.patch | 91 +++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 debian/patches/install-efi-fallback.patch (limited to 'debian/patches/install-efi-fallback.patch') diff --git a/debian/patches/install-efi-fallback.patch b/debian/patches/install-efi-fallback.patch new file mode 100644 index 0000000..6501d8a --- /dev/null +++ b/debian/patches/install-efi-fallback.patch @@ -0,0 +1,91 @@ +From 7cf3ac7be59ef377a98ead5c7d3d5cb537c159c4 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Mon, 13 Jan 2014 12:13:05 +0000 +Subject: Fall back to non-EFI if booted using EFI but -efi is missing + +It may be possible, particularly in recovery situations, to be booted +using EFI on x86 when only the i386-pc target is installed, or on ARM +when only the arm-uboot target is installed. There's nothing actually +stopping us installing i386-pc or arm-uboot from an EFI environment, and +it's better than returning a confusing error. + +Author: Steve McIntyre <93sam@debian.org> +Forwarded: no +Last-Update: 2019-05-24 + +Patch-Name: install-efi-fallback.patch +--- + grub-core/osdep/linux/platform.c | 40 ++++++++++++++++++++++++++++---- + 1 file changed, 35 insertions(+), 5 deletions(-) + +diff --git a/grub-core/osdep/linux/platform.c b/grub-core/osdep/linux/platform.c +index e28a79dab..2e7f72086 100644 +--- a/grub-core/osdep/linux/platform.c ++++ b/grub-core/osdep/linux/platform.c +@@ -19,10 +19,12 @@ + #include + + #include ++#include + #include + #include + #include + #include ++#include + #include + + #include +@@ -128,9 +130,24 @@ const char * + grub_install_get_default_arm_platform (void) + { + if (is_efi_system()) +- return "arm-efi"; +- else +- return "arm-uboot"; ++ { ++ const char *pkglibdir = grub_util_get_pkglibdir (); ++ const char *platform; ++ char *pd; ++ int found; ++ ++ platform = "arm-efi"; ++ ++ pd = grub_util_path_concat (2, pkglibdir, platform); ++ found = grub_util_is_directory (pd); ++ free (pd); ++ if (found) ++ return platform; ++ else ++ grub_util_info ("... but %s platform not available", platform); ++ } ++ ++ return "arm-uboot"; + } + + const char * +@@ -138,10 +155,23 @@ grub_install_get_default_x86_platform (void) + { + if (is_efi_system()) + { ++ const char *pkglibdir = grub_util_get_pkglibdir (); ++ const char *platform; ++ char *pd; ++ int found; ++ + if (read_platform_size() == 64) +- return "x86_64-efi"; ++ platform = "x86_64-efi"; ++ else ++ platform = "i386-efi"; ++ ++ pd = grub_util_path_concat (2, pkglibdir, platform); ++ found = grub_util_is_directory (pd); ++ free (pd); ++ if (found) ++ return platform; + else +- return "i386-efi"; ++ grub_util_info ("... but %s platform not available", platform); + } + + grub_util_info ("Looking for /proc/device-tree .."); -- cgit v1.2.3