# Common make rules for building with gnu-efi
#
-#EFIINC = /usr/include/efi
-#GNUEFILIB = /usr/lib64
-#EFILIB = /usr/lib64
-#EFICRT0 = /usr/lib64
+EFIINC = /usr/include/efi
+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
+#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)
+0.6.10 (?/??/2013):
+-------------------
+
+- Renamed "Reboot to Firmware User Interface" to "Reboot to Computer Setup
+ Utility" in menu.
+
+- Fixed bug in gptsync that caused it to hang if the disk had too few GPT
+ partitions to fill the MBR.
+
0.6.10 (5/5/2013):
------------------
<tr>
<td><tt>showtools</tt></td>
<td><tt>shell</tt>, <tt>gptsync</tt>, <tt>apple_recovery</tt>, <tt>mok_tool</tt>, <tt>about</tt>, <tt>exit</tt>, <tt>shutdown</tt>, <tt>reboot</tt>, and <tt>firmware</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>apple_recovery</tt> boots the OS X Recovery HD, <tt>mok_tool</tt> launches a tool to manage Machine Owner Keys (MOKs) on systems with Secure Boot active, <tt>about</tt> displays information about the program, <tt>exit</tt> terminates rEFInd, <tt>shutdown</tt> shuts down the computer (or reboots it, on some UEFI PCs), <tt>reboot</tt> reboots the computer, and <tt>firmware</tt> reboots the computer into the firmware's own user interface. The tags appear in the order in which you specify them. The default is <tt>shell, apple_recovery, mok_tool, about, shutdown, reboot, firmware</tt>. Note that the <tt>shell</tt>, <tt>apple_recovery</tt>, and <tt>mok_tool</tt> options all require the presence of programs not included with rEFInd. The <tt>gptsync</tt> option requires use of a like-named program which, although it ships with rEFInd 0.6.9 and later, is not installed by default except under OS X. 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 the shell and <tt>gptsync</tt> programs. The <tt>apple_recovery</tt> option will appear only if you've got an Apple Recovery HD partition (which has a boot loader called <tt>com.apple.recovery.boot/boot.efi</tt>). The <tt>firmware</tt> option works only on computers that support this option; on other computers, the option is quietly ignored. See the <a href="secureboot.html">Secure Boot</a> page for information on Secure Boot and MOK management.</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>apple_recovery</tt> boots the OS X Recovery HD, <tt>mok_tool</tt> launches a tool to manage Machine Owner Keys (MOKs) on systems with Secure Boot active, <tt>about</tt> displays information about the program, <tt>exit</tt> terminates rEFInd, <tt>shutdown</tt> shuts down the computer (or reboots it, on some UEFI PCs), <tt>reboot</tt> reboots the computer, and <tt>firmware</tt> reboots the computer into the computer's own setup utility. The tags appear in the order in which you specify them. The default is <tt>shell, apple_recovery, mok_tool, about, shutdown, reboot, firmware</tt>. Note that the <tt>shell</tt>, <tt>apple_recovery</tt>, and <tt>mok_tool</tt> options all require the presence of programs not included with rEFInd. The <tt>gptsync</tt> option requires use of a like-named program which, although it ships with rEFInd 0.6.9 and later, is not installed by default except under OS X. 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 the shell and <tt>gptsync</tt> programs. The <tt>apple_recovery</tt> option will appear only if you've got an Apple Recovery HD partition (which has a boot loader called <tt>com.apple.recovery.boot/boot.efi</tt>). The <tt>firmware</tt> option works only on computers that support this option; on other computers, the option is quietly ignored. See the <a href="secureboot.html">Secure Boot</a> page for information on Secure Boot and MOK management.</td>
</tr>
<tr>
<td><tt>font</tt></td>
OPTIMFLAGS = -fno-strict-aliasing -mno-red-zone -Wno-address -Os
DEBUGFLAGS = -Wall -Wno-missing-braces -Wno-array-bounds -ffunction-sections -fdata-sections
-CFLAGS = $(OPTIMFLAGS) -g -fshort-wchar -fno-stack-protector $(DEBUGFLAGS) -c -DHOST_EFI_EDK2 -D__MAKEWITH_TIANO
+CFLAGS = $(OPTIMFLAGS) -g -fshort-wchar -fno-stack-protector $(DEBUGFLAGS) -c -DHOST_EFI_EDK2 -D__MAKEWITH_TIANO -std=gnu89
#CFLAGS = $(OPTIMFLAGS) -g -fshort-wchar -fno-stack-protector $(DEBUGFLAGS) -c -include AutoGen.h -DHOST_EFI_EDK2
prefix = /usr/bin/
// partition if there are several Linux partitions before other hybridized
// partitions.
i = gpt_part_count - 1; // Note that gpt_part_count can't be 0; filtered by check_gpt()
- while (i >= 0 && new_mbr_part_count <= 3) {
+ while (i < gpt_part_count && new_mbr_part_count <= 3) { // if too few GPT partitions, i loops around to a huge value
if ((gpt_parts[i].start_lba > 0) && (gpt_parts[i].end_lba > 0) &&
(gpt_parts[i].end_lba <= MAX_MBR_LBA) &&
((gpt_parts[i].gpt_parttype->kind == GPT_KIND_DATA) || (gpt_parts[i].gpt_parttype->kind == GPT_KIND_BASIC_DATA)) &&
// set active on the first matching partition
if (count_active == 0) {
for (i = 0; i < new_mbr_part_count; i++) {
- if ((iter >= 0 && (new_mbr_parts[i].mbr_type == 0x07 || // NTFS
- new_mbr_parts[i].mbr_type == 0x0b || // FAT32
- new_mbr_parts[i].mbr_type == 0x0c)) || // FAT32 (LBA)
+ if (((new_mbr_parts[i].mbr_type == 0x07 || // NTFS
+ new_mbr_parts[i].mbr_type == 0x0b || // FAT32
+ new_mbr_parts[i].mbr_type == 0x0c)) || // FAT32 (LBA)
(iter >= 1 && (new_mbr_parts[i].mbr_type == 0x83)) || // Linux
(iter >= 2 && i > 0)) {
new_mbr_parts[i].active = TRUE;
// config
//
+
#if defined(EFI32) || defined(EFIX64)
#define CONFIG_EFI
#endif
CHAR16 *FindExtension(IN CHAR16 *Path) {
CHAR16 *Extension;
BOOLEAN Found = FALSE, FoundSlash = FALSE;
- UINTN i;
+ INTN i;
Extension = AllocateZeroPool(sizeof(CHAR16));
if (Path) {
static REFIT_MENU_ENTRY MenuEntryShutdown = { L"Shut Down Computer", TAG_SHUTDOWN, 1, 0, 'U', NULL, NULL, NULL };
static REFIT_MENU_ENTRY MenuEntryReturn = { L"Return to Main Menu", TAG_RETURN, 1, 0, 0, NULL, NULL, NULL };
static REFIT_MENU_ENTRY MenuEntryExit = { L"Exit rEFInd", TAG_EXIT, 1, 0, 0, NULL, NULL, NULL };
-static REFIT_MENU_ENTRY MenuEntryFirmware = { L"Reboot to Firmware User Interface", TAG_FIRMWARE, 1, 0, 0, NULL, NULL, NULL };
+static REFIT_MENU_ENTRY MenuEntryFirmware = { L"Reboot to Computer Setup Utility", TAG_FIRMWARE, 1, 0, 0, NULL, NULL, NULL };
static REFIT_MENU_SCREEN MainMenu = { L"Main Menu", NULL, 0, NULL, 0, NULL, 0, L"Automatic boot",
L"Use arrow keys to move cursor; Enter to boot;",
if (AboutMenu.EntryCount == 0) {
AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
- AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.10");
+ AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.10.1");
AddMenuInfoLine(&AboutMenu, L"");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2013 Roderick W. Smith");