]> code.delx.au - refind/commitdiff
Fixed BIOS-booting bug on Macs.
authorsrs5694 <srs5694@users.sourceforge.net>
Sat, 11 Aug 2012 21:13:01 +0000 (17:13 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Sat, 11 Aug 2012 21:13:01 +0000 (17:13 -0400)
Makefile
NEWS.txt
docs/refind/configfile.html
docs/refind/installing.html
docs/refind/todo.html
include/tiano_includes.h
refind.conf-sample
refind.inf
refind/main.c

index d81ce19dbf640987870f58281826344dbdfe43f6..5cbc948559869bfbdff121871e3a906df3913c18 100644 (file)
--- 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)
index d798500eb300193d9eb65eb7af5e5e8de7d1b05d..72b5e789d219430f345c4d53634d0f36b15abe76 100644 (file)
--- 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):
 ------------------
 
index 74e51e107b84be7f61a050284f0b35958c610724..033303433bfa5c42b2862a09f2cd6fbcc70708a4 100644 (file)
@@ -171,7 +171,7 @@ timeout 20
 <tr>
    <td><tt>showtools</tt></td>
    <td><tt>shell</tt>, <tt>gptsync</tt>, <tt>about</tt>, <tt>exit</tt>, <tt>shutdown</tt>, and <tt>reboot</tt></td>
-   <td>Specifies which tool tags to display on the second row. <tt>shell</tt> launches an EFI shell, <tt>gptsync</tt> launches a tool that creates a hybrid MBR, <tt>about</tt> displays information about the program, <tt>exit</tt> terminates rEFInd, <tt>shutdown</tt> shuts down the computer (or reboots it, on UEFI PCs), and <tt>reboot</tt> reboots the computer. The tags appear in the order in which you specify them. The default is <tt>shell, about, shutdown, reboot</tt>.</td>
+   <td>Specifies which tool tags to display on the second row. <tt>shell</tt> launches an EFI shell, <tt>gptsync</tt> launches a tool that creates a hybrid MBR, <tt>about</tt> displays information about the program, <tt>exit</tt> terminates rEFInd, <tt>shutdown</tt> shuts down the computer (or reboots it, on UEFI PCs), and <tt>reboot</tt> reboots the computer. The tags appear in the order in which you specify them. The default is <tt>shell, about, shutdown, reboot</tt>. Note that the <tt>shell</tt> and <tt>gptsync</tt> options both require the presence of programs not included with rEFInd; see the <a href="installing.html#addons">"Installing Additional Components"</a> section of the <a href="installing.html">Installing rEFInd</a> page for pointers to these programs.</td>
 </tr>
 <tr>
    <td><tt>textonly</tt></td>
@@ -206,7 +206,7 @@ timeout 20
 <tr>
    <td><tt>dont_scan_dirs</tt> or <tt>don't_scan_dirs</tt></td>
    <td>directory path(s)</td>
-   <td>Adds the specified directory or directories to a directory "blacklist"&mdash;these directories are <i>not</i> scanned for boot loaders. This may be useful to keep duplicate boot loaders out of the menu (say, if <tt>EFI/Boot/bootx64.efi</tt> 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 <tt>EFI</tt>. This option takes precedence over <tt>also_scan_dirs</tt>; if a directory appears in both lists, it will <i>not</i> be scanned.</td>
+   <td>Adds the specified directory or directories to a directory "blacklist"&mdash;these directories are <i>not</i> scanned for boot loaders, on <i>any</i> partition. This may be useful to keep duplicate boot loaders out of the menu (say, if <tt>EFI/Boot/bootx64.efi</tt> 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 <tt>EFI</tt>. This option takes precedence over <tt>also_scan_dirs</tt>; if a directory appears in both lists, it will <i>not</i> be scanned.</td>
 </tr>
 <tr>
    <td><tt>scan_all_linux_kernels</tt></td>
index 1d88eb977950a3aa71075799b7725d98bfb25008..e75c02ea354083daa3dd704668b680ebd1dc8046 100644 (file)
@@ -445,11 +445,15 @@ $ <b>ioreg -l -p IODeviceTree | grep firmware-abi</b>
 
 <ul>
 
-<li><b><a href="http://tianocore.git.sourceforge.net/git/gitweb.cgi?p=tianocore/edk2;a=blob_plain;f=EdkShellBinPkg/FullShell/X64/Shell_Full.efi;hb=HEAD">shell.efi</a></b>&mdash;This
+<li><b><a
+    href="http://tianocore.git.sourceforge.net/git/gitweb.cgi?p=tianocore/edk2;a=blob_plain;f=EdkShellBinPkg/FullShell/X64/Shell_Full.efi;hb=HEAD">shell.efi</a></b>&mdash;This
     file, placed in the ESP's <tt>efi/tools</tt> directory, adds the
     ability to launch a text-mode EFI shell from rEFInd. Note that the
     download link is to a 64-bit binary that must be renamed before rEFInd
-    will recognize it.</li>
+    will recognize it. Additional shell download links appear on the <a
+    href="https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#UEFI_Shell_download_links">Arch
+    Linux wiki,</a> and on other sites; try a Web search if the shell you
+    find doesn't work to your satisfaction.</li>
 
 <li><b>gptsync.efi</b>&mdash;This program creates a <a
     href="http://www.rodsbooks.com/gdisk/hybrid.html">hybrid MBR</a> from
index 9cb99d720265533a959f895d9684ed388ad0b80e..f3290a6f18eb1637a9c9b8465ad40a659b35908e 100644 (file)
@@ -175,6 +175,12 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
        and/or initial RAM disks relative to the rEFInd directory (or the
        boot loader's directory, in the case of initrds).</li>
 
+    <li>Various options (<tt>dont_scan_dirs</tt>, <tt>also_scan_dirs</tt>,
+       <tt>scan_driver_dirs</tt>, etc.) refer to directories or files,
+       either on the ESP or on all partitions. A way to identify specific
+       partitions for these options would be useful in some
+       situations.</li>
+
     </ul></li> <!-- Improvements -->
 
 <li><b>Known bugs that need squashing:</b>
@@ -257,8 +263,10 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
        forum thread</a> for more information.</li>
 
     <li>I'd like to find a way to enable users to enter customizations for
-       boot options and then save them to the <tt>refind.conf</tt>
-       file.</li>
+       boot options and then save them to the <tt>refind.conf</tt> 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.</li>
 
     <li>It should be possible to override specific auto-detected boot
        loader settings&mdash;say, to disable one specific boot loader or
@@ -287,6 +295,11 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
        written in a cross-platform GUI toolkit, so that a single code base
        can be used on any of the major OSes.</li>
 
+    <li>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.)</li>
+
     </ul></li> <!-- New features -->
 
     <li><b>Improvements to the EFI drivers:</b>
@@ -313,6 +326,10 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
     <li>The HFS+ driver returns a volume label of "HFS+ volume", no matter
         what the volume's real label is.</li>
 
+    <li>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.</li>
+
     </ul></li> <!-- Drivers -->
 
 </ul>
index 74ad2984cdae4e2ba01a4169a6b1f6759381e764..07eb2b1697360830194ee3aa7754162e3381fe74 100644 (file)
@@ -57,6 +57,7 @@
 #include <Protocol/UgaIo.h>
 #include <Protocol/UnicodeCollation.h>
 #include <Protocol/UsbIo.h>
+#include <Protocol/LegacyBios.h>
 
 // Guid Includes
 #include <Guid/Acpi.h>
index bfe36846cea93a96def5b15bb044141db22897bd..6431b781a80cac2317b9c1a2df8f9de9bc1a8dd4 100644 (file)
@@ -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
 
index bc8a14383bd33c4a6f796273a789a48128102d97..f1bcef1e6f3af00701f72d5c80d9f6fb69bd5b4c 100644 (file)
   gEfiScsiPassThruProtocolGuid                  ## PROTOCOL SOMETIMES_CONSUMES\r
   gEfiExtScsiPassThruProtocolGuid               ## PROTOCOL SOMETIMES_CONSUMES\r
 \r
+  gEfiLegacyBiosProtocolGuid                    # PROTOCOL TO_START\r
+\r
 [FeaturePcd]\r
   gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport\r
 \r
index d116576a0c9a5ed219fffa738ddf767c97a8423a..36fb5ce933dfaab9233b82a73243a0ca889a47a9 100644 (file)
@@ -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);