/[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 1342446 - (show annotations) (download)
Mon Dec 17 18:52:52 2018 UTC (5 years, 5 months ago) by martinw
File size: 2364 byte(s)
- new version 0.11.4
- support 32-bit UEFI on 64-bit O/S

1 --- a/refind-install 2018-12-16 14:22:43.839555903 +0000
2 +++ b/refind-install 2018-12-16 16:55:46.116501872 +0000
3 @@ -269,41 +269,45 @@
4 fi
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