From 2569172b598d42a95c1aeb3bde752358f0b43689 Mon Sep 17 00:00:00 2001
From: srs5694 by Roderick W. Smith, rodsmith@rodsbooks.com Originally written: 3/14/2013; last Web page update:
-2/3/2012, referencing rEFInd 0.6.7 Originally written: 3/14/2012; last Web page update:
+3/18/2013, referencing rEFInd 0.6.8 I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
Originally written: 3/14/2012; last Web page update: -2/3/2013, referencing rEFInd 0.6.7
+3/18/2013, referencing rEFInd 0.6.8I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/docs/refind/drivers.html b/docs/refind/drivers.html index 579014c..cc8dd50 100644 --- a/docs/refind/drivers.html +++ b/docs/refind/drivers.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 4/19/2012; last Web page update: -2/3/2013, referencing rEFInd 0.6.7
+3/18/2013, referencing rEFInd 0.6.8I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/docs/refind/features.html b/docs/refind/features.html index c074c07..9d75cca 100644 --- a/docs/refind/features.html +++ b/docs/refind/features.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -2/3/2013, referencing rEFInd 0.6.7
+3/18/2013, referencing rEFInd 0.6.8I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/docs/refind/getting.html b/docs/refind/getting.html index 5416986..bf8e718 100644 --- a/docs/refind/getting.html +++ b/docs/refind/getting.html @@ -15,7 +15,7 @@ F href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -2/8/2013, referencing rEFInd 0.6.7
+3/18/2013, referencing rEFInd 0.6.8I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
@@ -98,7 +98,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -2/3/2013, referencing rEFInd 0.6.7
+3/18/2013, referencing rEFInd 0.6.8I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
@@ -166,6 +166,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -2/11/2013, referencing rEFInd 0.6.7
+3/18/2013, referencing rEFInd 0.6.8I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/docs/refind/linux.html b/docs/refind/linux.html index 0b88e5a..18768f5 100644 --- a/docs/refind/linux.html +++ b/docs/refind/linux.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/19/2012; last Web page update: -2/3/2013, referencing rEFInd 0.6.7
+3/18/2013, referencing rEFInd 0.6.8I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/docs/refind/revisions.html b/docs/refind/revisions.html index 6afc69d..b05ec6f 100644 --- a/docs/refind/revisions.html +++ b/docs/refind/revisions.html @@ -14,7 +14,7 @@by Roderick W. Smith, rodsmith@rodsbooks.com
-Last Web page update: 2/3/2013
+Last Web page update: 3/18/2013
I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
@@ -92,6 +92,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 11/13/2012; last Web page update: -2/3/2013, referencing rEFInd 0.6.7
+3/18/2013, referencing rEFInd 0.6.8I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
@@ -126,7 +126,7 @@ described on this page currently supports only x86-64, notThrough 2012, it became obvious that Secure Boot would be a feature that was controlled, to a large extent, by Microsoft. This is because Microsoft requires that non-server computers that display Windows 8 logos ship with Secure Boot enabled. As a practical matter, this also means that such computers ship with Microsoft's keys in their firmware. In the absence of an industry-standard body to manage the signing of Secure Boot keys, this means that Microsoft's key is the only one that's more-or-less guaranteed to be installed on the computer, thus blocking the ability to boot any OS that lacks a boot path through Microsoft's signing key.
- +Fortunately, Microsoft will sign third-party binaries with their key—or more precisely, with a key that Microsoft uses to sign third-party binaries. (Microsoft uses another key to sign its own binaries, and some devices, such as the Microsoft Surface tablet, lack the third-party Microsoft key.) A payment of $99 to Verisign enables a software distributor to sign as many binaries as desired. Red Hat (Fedora), Novell (SUSE), and Canonical (Ubuntu) have all announced plans to take advantage of this system. Unfortunately, using a third-party signing service is an awkward solution for open source software. In fact, for this very reason Red Hat has developed a program that it calls shim that essentially shifts the Secure Boot "train" from Microsoft's proprietary "track" to one that's more friendly to open source authors. Shim is signed by Microsoft and redirects the boot process to another boot loader that can be signed with keys that the distribution maintains and that are built into shim. Fedora 18 also uses this system. SUSE has announced that it will use the same system, as does Ubuntu with version 12.10 and later. SUSE has contributed to the shim approach by providing expansions to shim that support a set of keys that users can maintain themselves. These keys are known as Machine Owner Keys (MOKs), and managing them is described later, in Managing MOKs. To reiterate, then, there are potentially three ways to sign a binary that will get it launched on a computer that uses shim:
diff --git a/docs/refind/themes.html b/docs/refind/themes.html index 4ab2603..e5115af 100644 --- a/docs/refind/themes.html +++ b/docs/refind/themes.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 4/19/2012; last Web page update: -2/3/2013, referencing rEFInd 0.6.7
+3/18/2013, referencing rEFInd 0.6.8I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/docs/refind/todo.html b/docs/refind/todo.html index 00f3be4..cea9202 100644 --- a/docs/refind/todo.html +++ b/docs/refind/todo.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -2/3/2013, referencing rEFInd 0.6.7
+3/18/2013, referencing rEFInd 0.6.8I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
@@ -245,6 +245,11 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -2/3/2013, referencing rEFInd 0.6.7
+3/18/2013, referencing rEFInd 0.6.8I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/filesystems/fsw_efi.c b/filesystems/fsw_efi.c index 6ac67f4..67c7186 100644 --- a/filesystems/fsw_efi.c +++ b/filesystems/fsw_efi.c @@ -98,7 +98,7 @@ EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid = EFI_FILE_SYSTEM_VOLUME_LABEL_INFO /** Helper macro for stringification. */ #define FSW_EFI_STRINGIFY(x) #x /** Expands to the EFI driver name given the file system type name. */ -#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.6.7 " FSW_EFI_STRINGIFY(t) L" File System Driver" +#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.6.8 " FSW_EFI_STRINGIFY(t) L" File System Driver" // function prototypes diff --git a/install.sh b/install.sh index 1e66871..4d0c398 100755 --- a/install.sh +++ b/install.sh @@ -29,6 +29,7 @@ # # Revision history: # +# 0.6.8 -- Bug fix: ESP scan now uses "uniq". # 0.6.6 -- Bug fix: Upgrade drivers when installed to EFI/BOOT. Also enable # copying shim.efi and MokManager.efi over themselves. # 0.6.4 -- Copies ext2 driver rather than ext4 driver for ext2/3fs @@ -594,7 +595,7 @@ FindLinuxESP() { fi InstallDir=`echo $EspLine | cut -d " " -f 6` if [[ -n $InstallDir ]] ; then - EspFilesystem=`grep $InstallDir /etc/mtab | cut -d " " -f 3` + EspFilesystem=`grep $InstallDir /etc/mtab | uniq | cut -d " " -f 3` fi if [[ $EspFilesystem != 'vfat' ]] ; then echo "$RootDir/boot/efi doesn't seem to be on a VFAT filesystem. The ESP must be" diff --git a/libeg/image.c b/libeg/image.c index 88829a5..c529da9 100644 --- a/libeg/image.c +++ b/libeg/image.c @@ -85,9 +85,10 @@ EG_IMAGE * egCreateFilledImage(IN UINTN Width, IN UINTN Height, IN BOOLEAN HasAl EG_IMAGE * egCopyImage(IN EG_IMAGE *Image) { - EG_IMAGE *NewImage; + EG_IMAGE *NewImage = NULL; - NewImage = egCreateImage(Image->Width, Image->Height, Image->HasAlpha); + if (Image != NULL) + NewImage = egCreateImage(Image->Width, Image->Height, Image->HasAlpha); if (NewImage == NULL) return NULL; diff --git a/mkcdimage b/mkcdimage index 4dc8b0b..934199a 100755 --- a/mkcdimage +++ b/mkcdimage @@ -65,7 +65,7 @@ mkdosfs -n "ElTorito" refind-bin-$Version.img mcopy -irefind-bin-$Version.img -s EFI shell*.efi ::/ # Make the ISO-9660 image file.... -mkisofs -A "Bootable rEFInd" -V "rEFInd $Version" -volset "rEFInd $Version" \ +mkisofs -A "Bootable rEFInd" -V "rEFInd_$Version" -volset "rEFInd_$Version" \ -J -r -v -x ./lost+found -o ../../refind-cd-$Version.iso \ -eltorito-alt-boot -efi-boot refind-bin-$Version.img \ -no-emul-boot ./ diff --git a/refind.spec b/refind.spec index d4b0fe9..4ba63f7 100644 --- a/refind.spec +++ b/refind.spec @@ -1,6 +1,6 @@ Summary: EFI boot manager software Name: refind -Version: 0.6.7 +Version: 0.6.8 Release: 1%{?dist} Summary: EFI boot manager software License: GPLv3 diff --git a/refind/config.c b/refind/config.c index c18e979..871b0e6 100644 --- a/refind/config.c +++ b/refind/config.c @@ -497,6 +497,9 @@ VOID ReadConfig(CHAR16 *FileName) else GlobalConfig.RequestedScreenHeight = 0; + } else if (StriCmp(TokenList[0], L"screensaver") == 0) { + HandleInt(TokenList, TokenCount, &(GlobalConfig.ScreensaverTime)); + } else if (StriCmp(TokenList[0], L"use_graphics_for") == 0) { GlobalConfig.GraphicsFor = 0; for (i = 1; i < TokenCount; i++) { diff --git a/refind/global.h b/refind/global.h index edf9244..0aad5f1 100644 --- a/refind/global.h +++ b/refind/global.h @@ -229,6 +229,7 @@ typedef struct { UINTN GraphicsFor; UINTN LegacyType; UINTN ScanDelay; + UINTN ScreensaverTime; CHAR16 *BannerFileName; EG_IMAGE *ScreenBackground; CHAR16 *SelectionSmallFileName; diff --git a/refind/lib.c b/refind/lib.c index 66dbe00..601038c 100644 --- a/refind/lib.c +++ b/refind/lib.c @@ -1151,13 +1151,15 @@ EFI_STATUS DirNextEntry(IN EFI_FILE *Directory, IN OUT EFI_FILE_INFO **DirEntry, LastBufferSize = BufferSize; } if (EFI_ERROR(Status)) { - FreePool(Buffer); + MyFreePool(Buffer); + Buffer = NULL; break; } // check for end of listing if (BufferSize == 0) { // end of directory listing - FreePool(Buffer); + MyFreePool(Buffer); + Buffer = NULL; break; } @@ -1273,7 +1275,6 @@ BOOLEAN DirIterNext(IN OUT REFIT_DIR_ITER *DirIter, IN UINTN FilterMode, IN CHAR while (KeepGoing && (OnePattern = FindCommaDelimited(FilePattern, i++)) != NULL) { if (MetaiMatch(DirIter->LastFileInfo->FileName, OnePattern)) KeepGoing = FALSE; -// Print(L"%s did%s match %s\n", DirIter->LastFileInfo->FileName, KeepGoing ? L" not" : L"", OnePattern); } // while // else continue loop } else diff --git a/refind/main.c b/refind/main.c index d115ae2..ba1d850 100644 --- a/refind/main.c +++ b/refind/main.c @@ -66,17 +66,17 @@ #define MACOSX_LOADER_PATH L"System\\Library\\CoreServices\\boot.efi" #if defined (EFIX64) -#define SHELL_NAMES L"\\EFI\\tools\\shell.efi,\\EFI\\tools\\shellx64.efi,\\shellx64.efi" +#define SHELL_NAMES L"\\EFI\\tools\\shell.efi,\\EFI\\tools\\shellx64.efi,\\shell.efi,\\shellx64.efi" #define DRIVER_DIRS L"drivers,drivers_x64" #define FALLBACK_FULLNAME L"EFI\\BOOT\\bootx64.efi" #define FALLBACK_BASENAME L"bootx64.efi" #elif defined (EFI32) -#define SHELL_NAMES L"\\EFI\\tools\\shell.efi,\\EFI\\tools\\shellia32.efi,\\shellia32.efi" +#define SHELL_NAMES L"\\EFI\\tools\\shell.efi,\\EFI\\tools\\shellia32.efi,\\shell.efi,\\shellia32.efi" #define DRIVER_DIRS L"drivers,drivers_ia32" #define FALLBACK_FULLNAME L"EFI\\BOOT\\bootia32.efi" #define FALLBACK_BASENAME L"bootia32.efi" #else -#define SHELL_NAMES L"\\EFI\\tools\\shell.efi" +#define SHELL_NAMES L"\\EFI\\tools\\shell.efi,\\shell.efi" #define DRIVER_DIRS L"drivers" #define FALLBACK_FULLNAME L"EFI\\BOOT\\boot.efi" /* Not really correct */ #define FALLBACK_BASENAME L"boot.efi" /* Not really correct */ @@ -110,7 +110,7 @@ static REFIT_MENU_SCREEN MainMenu = { L"Main Menu", NULL, 0, NULL, 0, NULL L"Insert or F2 for more options; Esc to refresh" }; static REFIT_MENU_SCREEN AboutMenu = { L"About", NULL, 0, NULL, 0, NULL, 0, NULL, L"Press Enter to return to main menu", L"" }; -REFIT_CONFIG GlobalConfig = { FALSE, FALSE, 0, 0, 0, DONT_CHANGE_TEXT_MODE, 20, 0, 0, GRAPHICS_FOR_OSX, LEGACY_TYPE_MAC, 0, +REFIT_CONFIG GlobalConfig = { FALSE, FALSE, 0, 0, 0, DONT_CHANGE_TEXT_MODE, 20, 0, 0, GRAPHICS_FOR_OSX, LEGACY_TYPE_MAC, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, {TAG_SHELL, TAG_APPLE_RECOVERY, TAG_MOK_TOOL, TAG_ABOUT, TAG_SHUTDOWN, TAG_REBOOT, 0, 0, 0, 0, 0 }}; @@ -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.7.1"); + AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.8"); AddMenuInfoLine(&AboutMenu, L""); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer"); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith"); @@ -1064,21 +1064,27 @@ static BOOLEAN ScanLoaderDir(IN REFIT_VOLUME *Volume, IN CHAR16 *Path, IN CHAR16 } // if MyFreePool(Extension); } // while + NewLoader = LoaderList; while (NewLoader != NULL) { AddLoaderEntry(NewLoader->FileName, NULL, Volume); NewLoader = NewLoader->NextEntry; } // while + CleanUpLoaderList(LoaderList); Status = DirIterClose(&DirIter); - if (Status != EFI_NOT_FOUND) { + // NOTE: EFI_INVALID_PARAMETER really is an error that should be reported; + // but I've gotten reports from users who are getting this error occasionally + // and I can't find anything wrong or reproduce the problem, so I'm putting + // it down to buggy EFI implementations and ignoring that particular error.... + if ((Status != EFI_NOT_FOUND) && (Status != EFI_INVALID_PARAMETER)) { if (Path) SPrint(FileName, 255, L"while scanning the %s directory", Path); else StrCpy(FileName, L"while scanning the root directory"); CheckError(Status, FileName); } // if (Status != EFI_NOT_FOUND) - } // if not scanning our own directory + } // if not scanning a blacklisted directory return FoundFallbackDuplicate; } /* static VOID ScanLoaderDir() */ @@ -1091,11 +1097,9 @@ static VOID ScanEfiFiles(REFIT_VOLUME *Volume) { UINTN i, Length; BOOLEAN ScanFallbackLoader = TRUE; -// Print(L"Entering ScanEfiFiles(), GlobalConfig.ScanAllLinux = %s\n", GlobalConfig.ScanAllLinux ? L"TRUE" : L"FALSE"); MatchPatterns = StrDuplicate(LOADER_MATCH_PATTERNS); if (GlobalConfig.ScanAllLinux) MergeStrings(&MatchPatterns, LINUX_MATCH_PATTERNS, L','); -// Print(L"MatchPatterns = '%s'\n", MatchPatterns); if ((Volume->RootDir != NULL) && (Volume->VolName != NULL)) { // check for Mac OS X boot loader diff --git a/refind/menu.c b/refind/menu.c index 668b646..ff8f1a6 100644 --- a/refind/menu.c +++ b/refind/menu.c @@ -412,8 +412,9 @@ static UINTN RunGenericMenu(IN REFIT_MENU_SCREEN *Screen, IN MENU_STYLE_FUNC Sty } else if (HaveTimeout) { refit_call1_wrapper(BS->Stall, 100000); // Pause for 100 ms TimeoutCountdown--; - } else + } else { refit_call3_wrapper(BS->WaitForEvent, 1, &ST->ConIn->WaitForKey, &index); + } continue; } if (HaveTimeout) { -- 2.39.2