]> code.delx.au - refind/commitdiff
Suppress messages about delays for scanning boot loaders when
authorsrs5694 <srs5694@users.sourceforge.net>
Wed, 14 May 2014 01:00:33 +0000 (21:00 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Wed, 14 May 2014 01:00:33 +0000 (21:00 -0400)
scan_delay is just 1 second.

EfiLib/BdsHelper.c
Make.common
NEWS.txt
docs/refind/themes.html
fonts/mkfont.sh
refind/main.c
refind/menu.c

index b5958580e4fe52b36c52e670bfe797249263ca14..563993a9171a9fb2ea990f223fc7e9bc7b785f5b 100644 (file)
@@ -68,7 +68,11 @@ VOID UpdateBbsTable (BDS_COMMON_OPTION *Option) {
             // in priority. Done mainly as a fallback in case of string-matching weirdness.
             LocalBbsTable[Idx].BootPriority = 1;
          } // if/else
-      } // if
+      } else if (LocalBbsTable[Idx].BootPriority <= 1) {
+         // Something's got a high enough boot priority to interfere with booting
+         // our chosen entry, so bump it down a bit....
+         LocalBbsTable[Idx].BootPriority = 2;
+      } // if/else if
 
 //          Print (
 //            L" %02x: %04x %02x/%02x/%02x %02x/%02x %04x %04x %04x:%04x\n",
@@ -89,6 +93,7 @@ VOID UpdateBbsTable (BDS_COMMON_OPTION *Option) {
 //          Print(L"%s\n", Desc);
 
    } // for
+//    PauseForKey();
 }
 
 /**
index c1afdfe4144570dd77013563f12968f54f59f5c1..af47ccc8f9c1f5a8f016436df1dc412cd5e9dbc2 100644 (file)
@@ -4,9 +4,9 @@
 #
 
 EFIINC          = /usr/include/efi
-GNUEFILIB       = /usr/lib64
-EFILIB          = /usr/lib64
-EFICRT0         = /usr/lib64
+GNUEFILIB       = /usr/lib
+EFILIB          = /usr/lib
+EFICRT0         = /usr/lib
 
 # Comment out above and uncomment below if using locally-compiled GNU-EFI....
 #EFIINC          = /usr/local/include/efi
index 49c680d3c92d926410ca80d2b39b3ff0083aaa89..2bf51dc1d7f0e8c4a7e181084e82da26f73b778e 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,20 @@
 0.8.1 (5/??/2014):
 ------------------
 
+- Added two new bitmap fonts to those distributed with rEFInd: Ubuntu Mono
+  and Nimbus Mono. Both come in 12-, 14-, 16-, and 24-point sizes.
+
+- Messages about pauses for scanning and re-scanning of boot loaders are
+  now suppressed when doing an initial delayed scan when scan_delay is 1
+  second.
+
+- Improved centering of legacy boot option descriptions on some systems'
+  screens.
+
+- Fixed bug that could cause a BIOS-mode boot to launch an inappropriate
+  device if that device had an innately high boot priority (as set by the
+  firmware).
+
 - Changed icons from ICNS to PNG form. There are several reasons to do
   this, all of them minor; but together they're enough to warrant a change.
   PNG is more common, and therefore more accessible to most users --
index 586e7d5ae5c354bcc4a58f54756cfd482580bcd0..e09a16bdcdf3177c2c7c473682bdbd6d2569bcf6 100644 (file)
@@ -228,7 +228,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>rEFInd's default font is a 14-point (12-point in 0.6.5 and earlier) serif monospaced font. I also include a handful of alternatives in the <tt>fonts</tt> subdirectory. rEFInd's font support is extremely rudimentary, though; it reads a PNG file that holds the glyphs from ASCII 32 (space) through ASCII 126 (tilde, <tt>~</tt>), plus a glyph that's displayed for all characters outside of this range. Thus, rEFInd can't currently display non-ASCII characters or use proportional (variable-width) fonts. You can change the font from one monospaced font to another and change the font size, though.</p>
 
-<p>If you want to create your own fonts, you can do so. If you're using Linux, the <tt>mkfont.sh</tt> script in the <tt>fonts</tt> subdirectory will convert an installed <i>monospace</i> font into a suitable format. You can use it like this:</p>
+<p>If you want to create your own fonts, you can do so. If you're using Linux, the <tt>mkfont.sh</tt> script in the <tt>fonts</tt> subdirectory will convert an installed <i>monospace</i> font into a suitable format. (This script works properly for most fonts, but if a font is unusually thin or wide, you will have to adjust the <tt>let CellWidth=</tt> line near the end of the file.) You can use it like this:</p>
 
 <pre class="listing">
 $ <tt class="userinput">./mkfont.sh Liberation-Mono-Italic 14 -1 liberation-mono-italic-14.png</tt>
@@ -272,7 +272,7 @@ to be tedious.</p>
 
 <p>I used icons from the Oxygen Icons project, both from the <a href="http://deviantdark.deviantart.com/art/Oxygen-Refit-70199755">Oxygen Refit</a> package and from Gentoo's <tt>oxygen-icons</tt> package. These icons supplemented or replaced icons that rEFIt used; however, many OS icons (such as those for Windows and Mac OS) are carried over from rEFIt. I've also used a handful of icons for individual Linux distributions from other sources&mdash;usually documentation associated with the distribution in question.</p>
 
-<p>In addition to this default icon set, I've received word of three other rEFInd themes:</p>
+<p>In addition to this default icon set, I've received word of a few other rEFInd themes:</p>
 
 <ul>
 
@@ -286,6 +286,8 @@ to be tedious.</p>
 
 <li>Sean Gibbons' <a href="http://sdbinwiiexe.deviantart.com/art/rEFInd-Next-Theme-407754566">rEFInd Next</a> theme is "inspired by both iOS 7 and Windows 8 interfaces." It includes both a background image and a number of OS icons.</li>
 
+<li>Zhu Qunying has created a <a href="http://zhu-qy.blogspot.com/2014/02/a-slackware-banner-logo-for-refind-boot.html">Slackware-themed banner logo</a> for rEFInd. Although it's not a full theme, I thought I'd mention it here.</li>
+
 </ul>
 
 <p>If you've created or discovered another rEFInd theme, please <a href="mailto:rodsmith@rodsbooks.com">tell me about it</a> so that I can provide a link to it from this page.</p>
index 2f035e516c7ec223015cc82f126cfbbf36b8a20f..9ae39325772f1493bd70fe4d6bd1b6bbcb704b5a 100755 (executable)
@@ -39,6 +39,7 @@ fi
 
 Height=$2
 let CellWidth=(${Height}*6+5)/10
+#let CellWidth=(${Height}*5)/10
 let Width=${CellWidth}*96
 echo "Creating ${Width}x${Height} font bitmap...."
 $Convert -size ${Width}x${Height} xc:transparent -gravity NorthWest -font $1 -pointsize $2 \
index 13408141e0effe70bcf501da187952543781bdd7..51288d2f47beb4106dcdf0915d843cbbd6987935 100644 (file)
@@ -168,7 +168,7 @@ static VOID AboutrEFInd(VOID)
 
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.8.0.5");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.8.0.6");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2014 Roderick W. Smith");
@@ -1704,7 +1704,7 @@ static LEGACY_ENTRY * AddLegacyEntry(IN CHAR16 *LoaderTitle, IN REFIT_VOLUME *Vo
     Entry->me.BadgeImage   = Volume->VolBadgeImage;
     Entry->Volume          = Volume;
     Entry->LoadOptions     = (Volume->DiskKind == DISK_KIND_OPTICAL) ? L"CD" :
-        ((Volume->DiskKind == DISK_KIND_EXTERNAL) ? L"USB" : L"HD");
+                              ((Volume->DiskKind == DISK_KIND_EXTERNAL) ? L"USB" : L"HD");
     Entry->Enabled         = TRUE;
 
     // create the submenu
@@ -1764,11 +1764,16 @@ static LEGACY_ENTRY * AddLegacyEntryUEFI(BDS_COMMON_OPTION *BdsOption, IN UINT16
     LEGACY_ENTRY            *Entry, *SubEntry;
     REFIT_MENU_SCREEN       *SubScreen;
     CHAR16                  ShortcutLetter = 0;
-    CHAR16 *LegacyDescription = BdsOption->Description;
+    CHAR16 *LegacyDescription = StrDuplicate(BdsOption->Description);
 
     if (IsInSubstring(LegacyDescription, GlobalConfig.DontScanVolumes))
        return NULL;
 
+    // Remove stray spaces, since many EFIs produce descriptions with lots of
+    // extra spaces, especially at the end; this throws off centering of the
+    // description on the screen....
+    LimitStringLength(LegacyDescription, 100);
+
     // prepare the menu entry
     Entry = AllocateZeroPool(sizeof(LEGACY_ENTRY));
     Entry->me.Title = AllocateZeroPool(256 * sizeof(CHAR16));
@@ -2157,8 +2162,7 @@ static VOID FindLegacyBootType(VOID) {
 
    GlobalConfig.LegacyType = LEGACY_TYPE_NONE;
 
-   // UEFI-style legacy BIOS support is available only with the TianoCore EDK2
-   // build environment, and then only with some EFI implementations....
+   // UEFI-style legacy BIOS support is available only with some EFI implementations....
    Status = refit_call3_wrapper(gBS->LocateProtocol, &gEfiLegacyBootProtocolGuid, NULL, (VOID **) &LegacyBios);
    if (!EFI_ERROR (Status))
       GlobalConfig.LegacyType = LEGACY_TYPE_UEFI;
@@ -2173,20 +2177,23 @@ static VOID FindLegacyBootType(VOID) {
 } // static VOID FindLegacyBootType
 
 // Warn the user if legacy OS scans are enabled but the firmware can't support them....
-static VOID WarnIfLegacyProblems() {
+static VOID WarnIfLegacyProblems(VOID) {
    BOOLEAN  found = FALSE;
    UINTN    i = 0;
 
    if (GlobalConfig.LegacyType == LEGACY_TYPE_NONE) {
       do {
-         if (GlobalConfig.ScanFor[i] == 'h' || GlobalConfig.ScanFor[i] == 'b' || GlobalConfig.ScanFor[i] == 'c')
+         if (GlobalConfig.ScanFor[i] == 'h' || GlobalConfig.ScanFor[i] == 'b' || GlobalConfig.ScanFor[i] == 'c' ||
+             GlobalConfig.ScanFor[i] == 'H' || GlobalConfig.ScanFor[i] == 'B' || GlobalConfig.ScanFor[i] == 'C')
             found = TRUE;
          i++;
       } while ((i < NUM_SCAN_OPTIONS) && (!found));
+
       if (found) {
          Print(L"NOTE: refind.conf's 'scanfor' line specifies scanning for one or more legacy\n");
          Print(L"(BIOS) boot options; however, this is not possible because your computer lacks\n");
-         Print(L"the necessary Compatibility Support Module (CSM) support.\n");
+         Print(L"the necessary Compatibility Support Module (CSM) support or that support is\n");
+         Print(L"disabled in your firmware.\n");
          PauseForKey();
       } // if (found)
    } // if no legacy support
@@ -2401,14 +2408,15 @@ static VOID ScanForTools(VOID) {
 } // static VOID ScanForTools
 
 // Rescan for boot loaders
-VOID RescanAll(VOID) {
+static VOID RescanAll(BOOLEAN DisplayMessage) {
    EG_PIXEL           BGColor;
 
    BGColor.b = 255;
    BGColor.g = 175;
    BGColor.r = 100;
    BGColor.a = 0;
-   egDisplayMessage(L"Scanning for new boot loaders; please wait....", &BGColor);
+   if (DisplayMessage)
+      egDisplayMessage(L"Scanning for new boot loaders; please wait....", &BGColor);
    FreeList((VOID ***) &(MainMenu.Entries), &MainMenu.EntryCount);
    MainMenu.Entries = NULL;
    MainMenu.EntryCount = 0;
@@ -2530,7 +2538,6 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
        CopyMem(GlobalConfig.ScanFor, "ihebocm   ", NUM_SCAN_OPTIONS);
     SetConfigFilename(ImageHandle);
     ReadConfig(GlobalConfig.ConfigFilename);
-//    ScanVolumes();
 
     InitScreen();
     WarnIfLegacyProblems();
@@ -2552,10 +2559,11 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
        BGColor.g = 175;
        BGColor.r = 100;
        BGColor.a = 0;
-       egDisplayMessage(L"Pausing before disk scan; please wait....", &BGColor);
+       if (GlobalConfig.ScanDelay > 1)
+          egDisplayMessage(L"Pausing before disk scan; please wait....", &BGColor);
        for (i = 0; i < GlobalConfig.ScanDelay; i++)
           refit_call1_wrapper(BS->Stall, 1000000);
-       RescanAll();
+       RescanAll(GlobalConfig.ScanDelay > 1);
     } // if
 
     if (GlobalConfig.DefaultSelection)
@@ -2567,7 +2575,7 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
         // The Escape key triggers a re-scan operation....
         if (MenuExit == MENU_EXIT_ESCAPE) {
             MenuExit = 0;
-            RescanAll();
+            RescanAll(TRUE);
             continue;
         }
 
index 4c0d359cd075d8c99815440e58e7ee193b1367e5..427deda0f70121e6f88903d88f5c0ee42911da71 100644 (file)
@@ -734,10 +734,8 @@ static VOID DrawTextWithTransparency(IN CHAR16 *Text, IN UINTN XPos, IN UINTN YP
     }
 
     TextBuffer = egCropImage(GlobalConfig.ScreenBackground, XPos, YPos, TextWidth, TextLineHeight());
-    if (TextBuffer == NULL) {
-       Print(L"Error: NULL TextBuffer in DrawTextWithTransparency()\n");
+    if (TextBuffer == NULL)
        return;
-    }
 
     // render the text
     egRenderText(Text, TextBuffer, 0, 0, AverageBrightness(TextBuffer));