From: srs5694 Date: Sat, 11 Aug 2012 21:13:01 +0000 (-0400) Subject: Fixed BIOS-booting bug on Macs. X-Git-Url: https://code.delx.au/refind/commitdiff_plain/784c0563eba1ac8b70bff33705ba7d143f3d94dd Fixed BIOS-booting bug on Macs. --- diff --git a/Makefile b/Makefile index d81ce19..5cbc948 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,9 @@ LIBEG_DIR=libeg EFILIB_DIR=EfiLib # Build rEFInd, including libeg -all: +all: tiano + +gnuefi: make -C $(LIBEG_DIR) make -C $(LOADER_DIR) # make -C $(FS_DIR) diff --git a/NEWS.txt b/NEWS.txt index d798500..72b5e78 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,3 +1,8 @@ +0.4.5 (?/??/2012): +------------------ + +- Fixed bug that caused a failure to boot BIOS-based OSes on Macs. + 0.4.4 (6/23/2012): ------------------ diff --git a/docs/refind/configfile.html b/docs/refind/configfile.html index 74e51e1..0333034 100644 --- a/docs/refind/configfile.html +++ b/docs/refind/configfile.html @@ -171,7 +171,7 @@ timeout 20 showtools shell, gptsync, about, exit, shutdown, and reboot - Specifies which tool tags to display on the second row. shell launches an EFI shell, gptsync launches a tool that creates a hybrid MBR, about displays information about the program, exit terminates rEFInd, shutdown shuts down the computer (or reboots it, on UEFI PCs), and reboot reboots the computer. The tags appear in the order in which you specify them. The default is shell, about, shutdown, reboot. + Specifies which tool tags to display on the second row. shell launches an EFI shell, gptsync launches a tool that creates a hybrid MBR, about displays information about the program, exit terminates rEFInd, shutdown shuts down the computer (or reboots it, on UEFI PCs), and reboot reboots the computer. The tags appear in the order in which you specify them. The default is shell, about, shutdown, reboot. Note that the shell and gptsync options both require the presence of programs not included with rEFInd; see the "Installing Additional Components" section of the Installing rEFInd page for pointers to these programs. textonly @@ -206,7 +206,7 @@ timeout 20 dont_scan_dirs or don't_scan_dirs directory path(s) - Adds the specified directory or directories to a directory "blacklist"—these directories are not scanned for boot loaders. This may be useful to keep duplicate boot loaders out of the menu (say, if EFI/Boot/bootx64.efi is a duplicate of another boot loader); or to keep drivers or utilities out of the boot menu, if you've stored them in a subdirectory of EFI. This option takes precedence over also_scan_dirs; if a directory appears in both lists, it will not be scanned. + Adds the specified directory or directories to a directory "blacklist"—these directories are not scanned for boot loaders, on any partition. This may be useful to keep duplicate boot loaders out of the menu (say, if EFI/Boot/bootx64.efi is a duplicate of another boot loader); or to keep drivers or utilities out of the boot menu, if you've stored them in a subdirectory of EFI. This option takes precedence over also_scan_dirs; if a directory appears in both lists, it will not be scanned. scan_all_linux_kernels diff --git a/docs/refind/installing.html b/docs/refind/installing.html index 1d88eb9..e75c02e 100644 --- a/docs/refind/installing.html +++ b/docs/refind/installing.html @@ -445,11 +445,15 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi
  • Known bugs that need squashing: @@ -257,8 +263,10 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    forum thread for more information.
  • I'd like to find a way to enable users to enter customizations for - boot options and then save them to the refind.conf - file.
  • + boot options and then save them to the refind.conf file. + One possible way to implement this would be to have manual boot + stanzas override auto-detected boot loader definitions for the same + boot loader file.
  • It should be possible to override specific auto-detected boot loader settings—say, to disable one specific boot loader or @@ -287,6 +295,11 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    written in a cross-platform GUI toolkit, so that a single code base can be used on any of the major OSes.
  • +
  • A way to "source" one configuration file from another one would be + helpful for some types of configuration scripts. (This would enable + overriding options in a secondary file without modifying the + default original file, for instance.)
  • +
  • Improvements to the EFI drivers: @@ -313,6 +326,10 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • The HFS+ driver returns a volume label of "HFS+ volume", no matter what the volume's real label is.
  • +
  • This may not be possible, or it may require a new driver, but a way + to have the drivers access files (like a Linux loopback mount) is + desirable.
  • + diff --git a/include/tiano_includes.h b/include/tiano_includes.h index 74ad298..07eb2b1 100644 --- a/include/tiano_includes.h +++ b/include/tiano_includes.h @@ -57,6 +57,7 @@ #include #include #include +#include // Guid Includes #include diff --git a/refind.conf-sample b/refind.conf-sample index bfe3684..6431b78 100644 --- a/refind.conf-sample +++ b/refind.conf-sample @@ -87,8 +87,10 @@ timeout 20 # Which non-bootloader tools to show on the tools line, and in what # order to display them: -# shell - the EFI shell -# gptsync - the (dangerous) gptsync.efi utility +# shell - the EFI shell (requires external program; see rEFInd +# documentation for details) +# gptsync - the (dangerous) gptsync.efi utility (requires external +# program; see rEFInd documentation for details) # about - an "about this program" option # exit - a tag to exit from rEFInd # shutdown - shuts down the computer (a bug causes this to reboot EFI @@ -141,7 +143,8 @@ timeout 20 # another boot loader or to exclude a directory that holds drivers # or non-bootloader utilities provided by a hardware manufacturer. If # a directory is listed both here and in also_scan_dirs, dont_scan_dirs -# takes precedence. +# takes precedence. Note that this blacklist applies to ALL the +# filesystems that rEFInd scans, not just the ESP. # #dont_scan_dirs EFI/boot,EFI/Dell diff --git a/refind.inf b/refind.inf index bc8a143..f1bcef1 100644 --- a/refind.inf +++ b/refind.inf @@ -129,6 +129,8 @@ gEfiScsiPassThruProtocolGuid ## PROTOCOL SOMETIMES_CONSUMES gEfiExtScsiPassThruProtocolGuid ## PROTOCOL SOMETIMES_CONSUMES + gEfiLegacyBiosProtocolGuid # PROTOCOL TO_START + [FeaturePcd] gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport diff --git a/refind/main.c b/refind/main.c index d116576..36fb5ce 100644 --- a/refind/main.c +++ b/refind/main.c @@ -110,7 +110,7 @@ static VOID AboutrEFInd(VOID) if (AboutMenu.EntryCount == 0) { AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT); - AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.4.4"); + AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.4.4.1"); AddMenuInfoLine(&AboutMenu, L""); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer"); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith"); @@ -198,7 +198,9 @@ static EFI_STATUS StartEFIImageList(IN EFI_DEVICE_PATH **DevicePaths, MergeStrings(&FullLoadOptions, L" ", 0); // NOTE: That last space is also added by the EFI shell and seems to be significant // when passing options to Apple's boot.efi... - } + } else { + MergeStrings(&FullLoadOptions, LoadOptions, 0); + } // if/else // NOTE: We also include the terminating null in the length for safety. ChildLoadedImage->LoadOptions = (VOID *)FullLoadOptions; ChildLoadedImage->LoadOptionsSize = ((UINT32)StrLen(FullLoadOptions) + 1) * sizeof(CHAR16); @@ -1137,8 +1139,9 @@ static VOID StartLegacy(IN LEGACY_ENTRY *Entry) (UGAHeight - BootLogoImage->Height) >> 1, &StdBackgroundPixel); - if (Entry->Volume->IsMbrPartition) + if (Entry->Volume->IsMbrPartition) { ActivateMbrPartition(Entry->Volume->WholeDiskBlockIO, Entry->Volume->MbrPartitionIndex); + } ExtractLegacyLoaderPaths(DiscoveredPathList, MAX_DISCOVERED_PATHS, LegacyLoaderList);