/[packages]/cauldron/refind/current/SOURCES/detect-efi-size.patch
ViewVC logotype

Contents of /cauldron/refind/current/SOURCES/detect-efi-size.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1876339 - (show annotations) (download)
Tue Aug 9 08:43:21 2022 UTC (20 months, 1 week ago) by martinw
File size: 2367 byte(s)
- new version 0.13.3.1
  o drop upstreamed patches
  o rebase other patches

1 --- a/refind-install 2022-08-08 21:44:42.971965342 +0100
2 +++ b/refind-install 2022-08-08 21:50:10.198857317 +0100
3 @@ -293,41 +293,45 @@
4 esac
5 ;;
6 linux*)
7 + local EfiSize
8 + if [[ -e /sys/firmware/efi/fw_platform_size ]] ; then
9 + EfiSize=`cat /sys/firmware/efi/fw_platform_size`
10 + fi
11 CpuType=$(uname -m)
12 case "$CpuType" in
13 aarch64)
14 Platform="aa64"
15 ;;
16 x86_64)
17 - Platform="x64"
18 + case "$EfiSize" in
19 + 32)
20 + Platform="ia32"
21 + ;;
22 + *)
23 + Platform="x64"
24 + ;;
25 + esac
26 ;;
27 i?86)
28 - Platform="ia32"
29 + case "$EfiSize" in
30 + 64)
31 + Platform="x64"
32 + ;;
33 + *)
34 + Platform="ia32"
35 + ;;
36 + esac
37 # If we're in EFI mode, do some sanity checks, and alert the user or even
38 # abort. Not in BIOS mode, though, since that could be used on an emergency
39 # disc to try to recover a troubled Linux installation.
40 if [[ -d /sys/firmware/efi ]] ; then
41 - if [[ "$ShimSource" != "none" && "$TargetDir" != "/BOOT/EFI" ]] ; then
42 + if [[ "$Platform" == "ia32" && "$ShimSource" != "none" && "$TargetDir" != "/BOOT/EFI" ]] ; then
43 echo ""
44 echo "CAUTION: shim does not currently supports 32-bit systems, so you should not"
45 echo "use the --shim option to install on such systems. Aborting!"
46 echo ""
47 exit 1
48 fi
49 - echo
50 - echo "CAUTION: This Linux installation uses a 32-bit kernel. 32-bit EFI-based"
51 - echo "computers are VERY RARE. If you've installed a 32-bit version of Linux"
52 - echo "on a 64-bit computer, you should manually install the 64-bit version of"
53 - echo "rEFInd. If you're positive you want to continue with this installation,"
54 - echo "answer 'Y' to the following question..."
55 - echo
56 - echo -n "Are you sure you want to continue (Y/N)? "
57 - ReadYesNo
58 - if [[ $YesNo == "Y" || $YesNo == "y" ]] ; then
59 - echo "OK; continuing with the installation..."
60 - else
61 - exit 0
62 - fi
63 fi # In EFI mode
64 ;;
65 *)

  ViewVC Help
Powered by ViewVC 1.1.30