scan_delay is just 1 second.
// in priority. Done mainly as a fallback in case of string-matching weirdness.
LocalBbsTable[Idx].BootPriority = 1;
} // if/else
// in priority. Done mainly as a fallback in case of string-matching weirdness.
LocalBbsTable[Idx].BootPriority = 1;
} // if/else
+ } 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",
// Print (
// L" %02x: %04x %02x/%02x/%02x %02x/%02x %04x %04x %04x:%04x\n",
// Print(L"%s\n", Desc);
} // for
// Print(L"%s\n", Desc);
} // for
#
EFIINC = /usr/include/efi
#
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
# Comment out above and uncomment below if using locally-compiled GNU-EFI....
#EFIINC = /usr/local/include/efi
0.8.1 (5/??/2014):
------------------
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 --
- 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 --
<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>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>
<pre class="listing">
$ <tt class="userinput">./mkfont.sh Liberation-Mono-Italic 14 -1 liberation-mono-italic-14.png</tt>
<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—usually documentation associated with the distribution in question.</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—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>
<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>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>
</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>
Height=$2
let CellWidth=(${Height}*6+5)/10
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 \
let Width=${CellWidth}*96
echo "Creating ${Width}x${Height} font bitmap...."
$Convert -size ${Width}x${Height} xc:transparent -gravity NorthWest -font $1 -pointsize $2 \
if (AboutMenu.EntryCount == 0) {
AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
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");
AddMenuInfoLine(&AboutMenu, L"");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2014 Roderick W. Smith");
Entry->me.BadgeImage = Volume->VolBadgeImage;
Entry->Volume = Volume;
Entry->LoadOptions = (Volume->DiskKind == DISK_KIND_OPTICAL) ? L"CD" :
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
Entry->Enabled = TRUE;
// create the submenu
LEGACY_ENTRY *Entry, *SubEntry;
REFIT_MENU_SCREEN *SubScreen;
CHAR16 ShortcutLetter = 0;
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;
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));
// prepare the menu entry
Entry = AllocateZeroPool(sizeof(LEGACY_ENTRY));
Entry->me.Title = AllocateZeroPool(256 * sizeof(CHAR16));
GlobalConfig.LegacyType = LEGACY_TYPE_NONE;
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;
Status = refit_call3_wrapper(gBS->LocateProtocol, &gEfiLegacyBootProtocolGuid, NULL, (VOID **) &LegacyBios);
if (!EFI_ERROR (Status))
GlobalConfig.LegacyType = LEGACY_TYPE_UEFI;
} // static VOID FindLegacyBootType
// Warn the user if legacy OS scans are enabled but the firmware can't support them....
} // 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 {
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));
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");
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
PauseForKey();
} // if (found)
} // if no legacy support
} // static VOID ScanForTools
// Rescan for boot loaders
} // static VOID ScanForTools
// Rescan for boot loaders
+static VOID RescanAll(BOOLEAN DisplayMessage) {
EG_PIXEL BGColor;
BGColor.b = 255;
BGColor.g = 175;
BGColor.r = 100;
BGColor.a = 0;
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;
FreeList((VOID ***) &(MainMenu.Entries), &MainMenu.EntryCount);
MainMenu.Entries = NULL;
MainMenu.EntryCount = 0;
CopyMem(GlobalConfig.ScanFor, "ihebocm ", NUM_SCAN_OPTIONS);
SetConfigFilename(ImageHandle);
ReadConfig(GlobalConfig.ConfigFilename);
CopyMem(GlobalConfig.ScanFor, "ihebocm ", NUM_SCAN_OPTIONS);
SetConfigFilename(ImageHandle);
ReadConfig(GlobalConfig.ConfigFilename);
InitScreen();
WarnIfLegacyProblems();
InitScreen();
WarnIfLegacyProblems();
BGColor.g = 175;
BGColor.r = 100;
BGColor.a = 0;
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);
for (i = 0; i < GlobalConfig.ScanDelay; i++)
refit_call1_wrapper(BS->Stall, 1000000);
+ RescanAll(GlobalConfig.ScanDelay > 1);
} // if
if (GlobalConfig.DefaultSelection)
} // if
if (GlobalConfig.DefaultSelection)
// The Escape key triggers a re-scan operation....
if (MenuExit == MENU_EXIT_ESCAPE) {
MenuExit = 0;
// The Escape key triggers a re-scan operation....
if (MenuExit == MENU_EXIT_ESCAPE) {
MenuExit = 0;
}
TextBuffer = egCropImage(GlobalConfig.ScreenBackground, XPos, YPos, TextWidth, TextLineHeight());
}
TextBuffer = egCropImage(GlobalConfig.ScreenBackground, XPos, YPos, TextWidth, TextLineHeight());
- if (TextBuffer == NULL) {
- Print(L"Error: NULL TextBuffer in DrawTextWithTransparency()\n");
+ if (TextBuffer == NULL)
// render the text
egRenderText(Text, TextBuffer, 0, 0, AverageBrightness(TextBuffer));
// render the text
egRenderText(Text, TextBuffer, 0, 0, AverageBrightness(TextBuffer));