]> code.delx.au - refind/commitdiff
Added new "space_after_boot_options" token to refind.conf.
authorsrs5694 <srs5694@users.sourceforge.net>
Tue, 16 Oct 2012 01:15:10 +0000 (21:15 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Tue, 16 Oct 2012 01:15:10 +0000 (21:15 -0400)
NEWS.txt
docs/refind/installing.html
install.sh [changed mode: 0644->0755]
refind.conf-sample
refind/config.c
refind/global.h
refind/main.c

index 109d09523e6d6dc44e30a7711337fe601b3ad7c0..dc09c2be8e27bd5a0ecc793274a4258266239166 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,3 +1,8 @@
+0.4.7 (??/?/2012):
+------------------
+
+- Added new "space_after_boot_options" token to refind.conf.
+
 0.4.6 (10/6/2012):
 ------------------
 
index 3da2d2b33075ae68de22ba5c761b2d43e0ef2a3f..6dd8550247f6412d2c4ba84de52329793748b0bc 100644 (file)
@@ -481,6 +481,24 @@ $ <b>ioreg -l -p IODeviceTree | grep firmware-abi</b>
 
 <p>I've seen links to other versions of these tools from time to time on the Web, so if you try one of these programs and it crashes or behaves strangely, try performing a Web search; you may turn up something that works better for you than the one to which I've linked.</p>
 
+<a name="sluggish">
+<h2>Fixing a Sluggish Macintosh Boot</h2>
+</a>
+
+<p>I've received a few reports of a sluggish boot process (a delay of about 30 seconds before starting rEFInd) on some Macs after installing rEFInd. I've been unable to replicate this problem myself, and its true cause remains mysterious to me. I have found <a href="http://ubuntuforums.org/showpost.php?p=12256273&postcount=200">a Web forum post</a> describing a possible fix. Be aware, though, that this procedure involves using the <tt>efibootmgr</tt> utility on Macs, which has been known to damage the firmware on some Macs. Other reports indicate that this problem has been fixed with recent kernels. Thus, I present this information cautiously and with a strong "use at your own risk" warning. If you care to proceed, I recommend you update your Linux kernel to the latest possible and then proceed as follows:</p>
+
+<ol>
+
+<li>Boot into Linux.</li>
+
+<li>Type <tt class="userinput">efibootmgr</tt> as <tt>root</tt> to obtain a list of your boot loader entries. Each entry is preceded by a boot number, as in <tt>Boot0003</tt> or <tt>Boot0027</tt>.</li>
+
+<li>Remove all of the boot loader entries <i>except</i> rEFInd's by using <tt>efibootmgr</tt>'s <tt>-b <tt class="variable">bootnum</tt></tt> option to specify the boot entry and <tt>-B</tt> to delete it. For instance, typing <tt class="userinput">efibootmgr -b 0027 -B</tt> as <tt>root</tt> deletes boot entry <tt>Boot0027</tt>. Issue a separate <tt>efibootmgr</tt> command for each boot entry.</li>
+
+<li>Re-install rEFInd using the install script. It's unclear from the original post if this meant installing from Linux or from OS X.</li>
+
+</ol>
+
 <hr />
 
 <p>copyright &copy; 2012 by Roderick W. Smith</p>
old mode 100644 (file)
new mode 100755 (executable)
index af28dd0c2c342c080dd78adf59201403eaf5829f..a0f19deb32c3cbcbc936844e33619fd270effbbc 100644 (file)
@@ -45,8 +45,8 @@ timeout 20
 # the big icons by stretching it in the middle. If only a big one is given,
 # the built-in default will be used for the small icons.
 #
-# Like the banner option above, these options take a filename of
-# an uncompressed BMP image file.
+# Like the banner option above, these options take a filename of an
+# uncompressed BMP image file with a color depth of 24, 8, 4, or 1 bits.
 #
 #selection_big   selection-big.bmp
 #selection_small selection-small.bmp
@@ -193,6 +193,17 @@ timeout 20
 #
 #default_selection 1
 
+# Enable or disable the usual adding of a space after the boot options
+# when launching an EFI binary. Ordinarily rEFInd adds a space at the
+# end of the options line, since rEFIt's code indicated this was
+# required on some Macs. I've heard of problems on some systems when
+# these spaces are added, though, so this option enables you to set
+# the option explicitly. Setting it to anything but "true" causes the
+# trailing space to be omitted.
+# Default value is "true".
+#
+#space_after_boot_options false
+
 # Sample manual configuration stanzas. Each begins with the "menuentry"
 # keyword followed by a name that's to appear in the menu (use quotes
 # if you want the name to contain a space) and an open curly brace
index c1756afad5fa5540c7bd72feea311ba2bb55e2bd..9a6996b9c4b67031965047010e62cfbf4bdf4e0f 100644 (file)
@@ -428,6 +428,10 @@ VOID ReadConfig(VOID)
 
         } else if (StriCmp(TokenList[0], L"max_tags") == 0) {
            HandleInt(TokenList, TokenCount, &(GlobalConfig.MaxTags));
+
+        } else if ((StriCmp(TokenList[0], L"space_after_boot_options") == 0) && (TokenCount == 2)) {
+           GlobalConfig.SpaceAfterBootOptions = (StriCmp(TokenList[1], L"true") == 0);
+
         }
 
         FreeTokenLine(&TokenList, &TokenCount);
index 101b5975b67ae28bab7c18a6f67a1fdc7de2e726..2535b40f9b993e14010557173155292505f6ed35 100644 (file)
@@ -200,6 +200,7 @@ typedef struct {
 typedef struct {
    BOOLEAN     TextOnly;
    BOOLEAN     ScanAllLinux;
+   BOOLEAN     SpaceAfterBootOptions;
    UINTN       RequestedScreenWidth;
    UINTN       RequestedScreenHeight;
    UINTN       Timeout;
index beac3bfada7c305ab94550dd0b4e8b73465a780c..43bff039203d2cd78f9b1e17e8c0d43177db40fd 100644 (file)
@@ -93,7 +93,7 @@ static REFIT_MENU_ENTRY MenuEntryExit     = { L"Exit rEFInd", TAG_EXIT, 1, 0, 0,
 static REFIT_MENU_SCREEN MainMenu       = { L"Main Menu", NULL, 0, NULL, 0, NULL, 0, L"Automatic boot" };
 static REFIT_MENU_SCREEN AboutMenu      = { L"About", NULL, 0, NULL, 0, NULL, 0, NULL };
 
-REFIT_CONFIG GlobalConfig = { FALSE, FALSE, 0, 0, 20, 0, 0, GRAPHICS_FOR_OSX, LEGACY_TYPE_MAC, 0,
+REFIT_CONFIG GlobalConfig = { FALSE, FALSE, TRUE, 0, 0, 20, 0, 0, GRAPHICS_FOR_OSX, LEGACY_TYPE_MAC, 0,
                               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                               {TAG_SHELL, TAG_ABOUT, TAG_SHUTDOWN, TAG_REBOOT, 0, 0, 0, 0, 0 }};
 
@@ -115,7 +115,7 @@ static VOID AboutrEFInd(VOID)
 
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.4.6");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.4.6.1");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
@@ -200,9 +200,11 @@ static EFI_STATUS StartEFIImageList(IN EFI_DEVICE_PATH **DevicePaths,
         if (LoadOptionsPrefix != NULL) {
             MergeStrings(&FullLoadOptions, LoadOptionsPrefix, 0);
             MergeStrings(&FullLoadOptions, LoadOptions, L' ');
-            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...
+            if (GlobalConfig.SpaceAfterBootOptions) {
+               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...
+            } // if
         } else {
             MergeStrings(&FullLoadOptions, LoadOptions, 0);
         } // if/else