]> code.delx.au - refind/commitdiff
Fixed no timeout with keyboard disconnected; better duplicate loader
authorsrs5694 <srs5694@users.sourceforge.net>
Tue, 9 Apr 2013 15:49:34 +0000 (11:49 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Tue, 9 Apr 2013 15:49:34 +0000 (11:49 -0400)
detection.

Make.common
NEWS.txt
docs/refind/configfile.html
docs/refind/getting.html
docs/refind/index.html
docs/refind/installing.html
docs/refind/todo.html
mkdistrib
refind/main.c
refind/menu.c

index e5d1cc4a0eb0845242eee1cb38790a3cf02c8880..0d994e598131655c0458b45de1d08528affeff5b 100644 (file)
@@ -8,6 +8,12 @@ GNUEFILIB       = /usr/lib64
 EFILIB          = /usr/lib64
 EFICRT0         = /usr/lib64
 
+# Comment out above and uncomment below if using locally-compiled GNU-EFI....
+#EFIINC          = /usr/local/include/efi
+#GNUEFILIB       = /usr/local/lib
+#EFILIB          = /usr/local/lib
+#EFICRT0         = /usr/local/lib
+
 HOSTARCH        = $(shell uname -m | sed s,i[3456789]86,ia32,)
 ARCH            := $(HOSTARCH)
 OS             = $(shell uname -s)
index 60935fc505fa1886151917eec4b3e58693fdbe58..3b5ad23fa964f53bafb1f92c5141b0d24cd10f2f 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,3 +1,10 @@
+0.6.9 (?/??/2013):
+------------------
+
+- Changed timeout code so that the timeout continues if the keyboard is
+  disconnected. This can help in booting a headless server or a system with
+  a bluetooth or other keyboard that's not recognized by the EFI.
+
 0.6.8 (3/18/2013):
 ------------------
 
index 6a49a25d2e3dd40993c0b0cb454cdbc8809f217e..587adba1135fa2d5cac97a4c92c6b63601d6c411 100644 (file)
@@ -216,7 +216,7 @@ timeout 20
 <tr>
    <td><tt>textmode</tt></td>
    <td>text mode number</td>
-   <td>Sets the text-mode video resolution to be used in conjunction with <tt>textonly</tt> or for the line editor and program-launch screens. This option takes a single-digit code. Mode <tt>0</tt> is guaranteed to be present and should be 80x25. Mode <tt>1</tt> is supposed to be either invalid or 80x50, but some systems use this number for something else. Higher values are system-specific. Mode <tt>1024</tt> is a rEFInd-specific code that means to <i>not</i> set any mode at all; rEFInd instead uses whatever mode was set when it launched. If you set this option to an invalid value, rEFInd pauses during startup to tell you of that fact. Note that setting <tt>textmode</tt> can sometimes force your graphics-mode resolution to a higher value than you specify in <tt>resolution</tt>.</td>
+   <td>Sets the text-mode video resolution to be used in conjunction with <tt>textonly</tt> or for the line editor and program-launch screens. This option takes a single-digit code. Mode <tt>0</tt> is guaranteed to be present and should be 80x25. Mode <tt>1</tt> is supposed to be either invalid or 80x50, but some systems use this number for something else. Higher values are system-specific. Mode <tt>1024</tt> is a rEFInd-specific code that means to <i>not</i> set any mode at all; rEFInd instead uses whatever mode was set when it launched. If you set this option to an invalid value, rEFInd pauses during startup to tell you of that fact. Note that setting <tt>textmode</tt> can sometimes force your graphics-mode resolution to a higher value than you specify in <tt>resolution</tt>. On Linux, the <tt>/sys/class/graphics/fb0/modes</tt> file holds available modes, but it may not be the same set of modes that EFI provides.</td>
 </tr>
 <tr>
    <td><tt>resolution</tt></td>
index bf8e718663464cfbedef387c80fc21a2d4097e84..0faf42f350a5404f0e038f73e29baf4677e6e582 100644 (file)
@@ -114,7 +114,14 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
     optical disc. This zip file package includes both <i>x</i>86 (aka IA32)
     and <i>x</i>86-64 (aka <i>x</i>64, AMD64, or EM64T) versions of rEFInd.
     Which you install depends on your architecture, as described on the <a
-    href="installing.html">Installing rEFInd</a> page.</li>
+    href="installing.html">Installing rEFInd</a> page. Some users of Arch
+    Linux have reported problems booting some specific Arch Linux kernels
+    with rEFInd and some other tools. For them, a <a
+    href="http://sourceforge.net/projects/refind/files/0.6.8/refind-bin-gnuefi-0.6.8.zip/download">variant
+    package</a> exists in which the <i>x</i>86-64 binary was compiled with
+    GNU-EFI rather than the usual TianoCore EDK2. This change helps some
+    users with this problem; but using GNU-EFI also means that this version
+    can't launch BIOS-mode OSes.</li>
 
 <li><b><a
     href="http://sourceforge.net/projects/refind/files/0.6.8/refind-0.6.8-1.x86_64.rpm/download">A
index a89b34ac2d5d70088dadc1502f51a48d793ec6ee..95c8f7230a972f9bec493c77b3a27dd4b776b1b6 100644 (file)
@@ -168,6 +168,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <li>J. A. Watson has a <a href="http://www.zdnet.com/the-refind-boot-loader-for-uefi-systems-7000010275/">review of rEFInd on an HP laptop</a> on ZDNet. He had serious problems because of the HP's UEFI bugs, but finally got it to work.</li>
 
+<li>James Jesudason has a tutorial on installing Ubuntu 13.04 beta on a Macbook Retina Pro on <a href="http://randomtutor.blogspot.com/2013_02_01_archive.html">this blog page.</a> I'd recommend using a Linux filesystem driver to read the kernel directly from a Linux filesystem rather than copy the kernel to the OS X partition as in the tutorial, but either method will work.</li>
+
 </ul></li> <!-- Informational Web pages -->
 
 <li><b>Additional programs</b>
index bf62d5bf3d0774238288a97b381e0cb5401458cf..a34ca1df4fbe66a61d542c759db8d1d7eb8d277c 100644 (file)
@@ -166,11 +166,11 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Beginning with version 0.6.2, I've included RPM and Debian package files for rEFInd. If you have a working RPM-based or Debian-based Linux installation that boots in EFI mode, using one of these files is likely to be the easiest way to install rEFInd: You need only download the file and issue an appropriate installation command. In some cases, double-clicking the package in your file manager will install it. If that doesn't work, a command like the following will install the RPM on an RPM-based system:</p>
 
-<pre class="listing"># <tt class="userinput">rpm -Uvh refind-0.6.7-1.x86_64.rpm</tt></pre>
+<pre class="listing"># <tt class="userinput">rpm -Uvh refind-0.6.8-1.x86_64.rpm</tt></pre>
 
 <p>On a Debian-based system, the equivalent command is:</p>
 
-<pre class="listing"># <tt class="userinput">dpkg -i refind_0.6.7-1_amd64.deb</tt></pre>
+<pre class="listing"># <tt class="userinput">dpkg -i refind_0.6.8-1_amd64.deb</tt></pre>
 
 <p>Either command produces output similar to that described for <a href="#installsh">using the <tt>install.sh</tt> script,</a> so you can check it for error messages and other signs of trouble. The package file installs rEFInd and registers it with the EFI to be the default boot loader. The script that runs as part of the installation process tries to determine if you're using Secure Boot, and if so it will try to configure rEFInd to launch using shim; however, this won't work correctly on all systems. Ubuntu 12.10 users who are booting with Secure Boot active should be wary, since the resulting installation will probably try to use Ubuntu's version of shim, which won't work correctly with rEFInd.</p>
 
index cea9202452b18f37266eb7a0aee3ea79006a7095..15d4228891c9b39575880a1134575a98cc0764b0 100644 (file)
@@ -220,6 +220,16 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
        Apple-specific EFI extension, and I know of no standard EFI way to
        do it.</li>
 
+    <li>A couple of Mac users have reported that the brightness-adjustment
+       features in Windows don't work when Windows is booted via rEFInd,
+       but that these features do work when Windows is booted via the
+       Mac's built-in boot manager. Unfortunately, I have no idea what
+       causes this problem, I have no Windows installation on my one
+       (elderly) Mac, and I have no way to debug it. Therefore, it's
+       unlikely that I'll be able to fix this problem myself; but if you
+       have the equipment and skill to do so, I'd be interested in
+       receiving a patch.</li>
+
     <li>The re-scan feature occasionally produces odd results, such as
        ignoring new media or keeping old media that have been ejected.
        This should be investigated and fixed.</li>
index 6d2a101ca0168d4bd0760eaec62f2d4b4ca5718a..261e5a69aeaa39b557aff3f16dca5e99ad11d759 100755 (executable)
--- a/mkdistrib
+++ b/mkdistrib
@@ -88,6 +88,18 @@ cp -a docs keys banners fonts COPYING.txt LICENSE.txt README.txt CREDITS.txt NEW
 
 # Prepare the final .zip file
 zip -9r ../refind-bin-$1.zip refind-bin-$1
+
+# Prepare a variant with the x86-64 version built with GNU-EFI....
+make clean
+make -j4 gnuefi
+if [[ $SignIt == 1 ]] ; then
+   $SBSign --key $KeysDir/refind.key --cert $KeysDir/refind.crt --output refind-bin-$1/refind/refind_x64.efi refind/refind_x64.efi
+else
+   cp refind/refind_x64.efi refind-bin-$1/refind/refind_x64.efi
+fi
+zip -9r ../refind-bin-gnuefi-$1.zip refind-bin-$1
+
+# Clean up....
 cd ..
 rm -r refind-$1
 
index ba1d8508cac1b8cc8d55e9dbf919f93713252ad4..1bae40518b6b5453bcfb501b3735e0762773558e 100644 (file)
@@ -132,7 +132,7 @@ static VOID AboutrEFInd(VOID)
 
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.8");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.8.1");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
@@ -985,6 +985,7 @@ static BOOLEAN DuplicatesFallback(IN REFIT_VOLUME *Volume, IN CHAR16 *FileName)
       FileInfo = LibFileInfo(FileHandle);
       FileSize = FileInfo->FileSize;
    } else {
+      refit_call1_wrapper(FileHandle->Close, FileHandle);
       return FALSE;
    }
 
@@ -1093,7 +1094,7 @@ static VOID ScanEfiFiles(REFIT_VOLUME *Volume) {
    EFI_STATUS              Status;
    REFIT_DIR_ITER          EfiDirIter;
    EFI_FILE_INFO           *EfiDirEntry;
-   CHAR16                  FileName[256], *Directory, *MatchPatterns, *VolName = NULL;
+   CHAR16                  FileName[256], *Directory, *MatchPatterns, *VolName = NULL, *SelfPath;
    UINTN                   i, Length;
    BOOLEAN                 ScanFallbackLoader = TRUE;
 
@@ -1158,6 +1159,12 @@ static VOID ScanEfiFiles(REFIT_VOLUME *Volume) {
          MyFreePool(VolName);
       } // while
 
+      // Don't scan the fallback loader if it's on the same volume and a duplicate of rEFInd itself....
+      SelfPath = DevicePathToStr(SelfLoadedImage->FilePath);
+      CleanUpPathNameSlashes(SelfPath);
+      if ((Volume->DeviceHandle == SelfLoadedImage->DeviceHandle) && DuplicatesFallback(Volume, SelfPath))
+         ScanFallbackLoader = FALSE;
+
       // If not a duplicate & if it exists & if it's not us, create an entry
       // for the fallback boot loader
       if (ScanFallbackLoader && FileExists(Volume->RootDir, FALLBACK_FULLNAME) && ShouldScan(Volume, L"EFI\\BOOT")) {
index ff8f1a648dada7aae67332931c3805a535c3f4a2..8cf1cc8e98e8f8de09d2a63124711fbac4187386 100644 (file)
@@ -404,7 +404,7 @@ static UINTN RunGenericMenu(IN REFIT_MENU_SCREEN *Screen, IN MENU_STYLE_FUNC Sty
 
         // read key press (and wait for it if applicable)
         Status = refit_call2_wrapper(ST->ConIn->ReadKeyStroke, ST->ConIn, &key);
-        if (Status == EFI_NOT_READY) {
+        if (Status != EFI_SUCCESS) {
             if (HaveTimeout && TimeoutCountdown == 0) {
                 // timeout expired
                 MenuExit = MENU_EXIT_TIMEOUT;