From b72a91c9b51a3c6761db777f3e2818d240adf62e Mon Sep 17 00:00:00 2001 From: srs5694 Date: Thu, 2 May 2013 15:36:02 -0400 Subject: [PATCH] ChromeOS icon. --- BUILDING.txt | 20 +++++++++++--------- CREDITS.txt | 5 +++++ NEWS.txt | 6 ++++++ docs/refind/todo.html | 3 +++ gptsync/gptsync.c | 7 ++++--- libeg/image.c | 8 ++++++++ libeg/screen.c | 2 +- refind.inf | 1 + refind.spec | 2 +- refind/config.c | 2 +- refind/config.h | 2 +- refind/global.h | 2 +- refind/lib.c | 4 ++-- refind/main.c | 14 +++++++++----- 14 files changed, 54 insertions(+), 24 deletions(-) diff --git a/BUILDING.txt b/BUILDING.txt index 3899967..a553148 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -38,7 +38,7 @@ To compile rEFInd, you'll need the following: a locally-compiled GNU-EFI package, but older and more recent versions assume GNU-EFI installation in typical locations for distribution-provided packages. The legacy BIOS boot support on - UEFI-based PCs doesn't work when GNU-EFI is compiled under GNU-EFI, so + UEFI-based PCs doesn't work when rEFInd is compiled under GNU-EFI, so as of rEFInd 0.4.6, GNU-EFI is no longer the primary build environment, although it's easier to set up on a Linux system. @@ -98,7 +98,7 @@ is a bit unclear about others. Here's how I installed the toolkit: 2) Type "mkdir /usr/local/UDK2010". You can use another directory, but the Makefile for rEFInd's EFI drivers assumes this location. You'll need to - edit the EDK2BASE line in the Make.common file if you install somewhere + edit the EDK2BASE line in the Make.tiano file if you install somewhere else. 3) Type "cd /usr/local/UDK2010". @@ -177,13 +177,15 @@ With your development system set up, you can compile rEFInd as follows: 4) Type "make gnuefi" to build with GNU-EFI, or either "make" alone or "make tiano" to build with TianoCore EDK2. With any luck, rEFInd will compile without error, leaving the "refind_ia32.efi" or "refind_x64.efi" - file, depending on your platform, in the "refind" subdirectory. If you - want to build IA32 binaries on an x86-64 (X64) system, type "ARCH=ia32 - make". This works only if you're using the TianoCore build kit, and only - if you set TARGET_ARCH to either "IA32" or "IA32 X64" in target.txt when - you set up the TianoCore toolkit. If you plan to build both - architectures, be sure to copy the .efi file for the first build out of - the refind subdirectory before building the second architecture. + file, depending on your platform, in the "refind" subdirectory. This same + step builds the "gptsync_x64.efi" or "gptsync_ia32.efi" program file, in + the "gptsync" subdirectory. If you want to build IA32 binaries on an + x86-64 (X64) system, type "ARCH=ia32 make". This works only if you're + using the TianoCore build kit, and only if you set TARGET_ARCH to either + "IA32" or "IA32 X64" in target.txt when you set up the TianoCore toolkit. + If you plan to build both architectures, be sure to copy the .efi file + for the first build out of the refind subdirectory before building the + second architecture. 5) The default build process does NOT build the filesystem drivers. If you want to build them, you must type "make fs" in the main rEFInd source diff --git a/CREDITS.txt b/CREDITS.txt index 0ed0b47..72cadfb 100644 --- a/CREDITS.txt +++ b/CREDITS.txt @@ -89,5 +89,10 @@ Icons and graphics: * The ALT Linux icon was donated by the ALT Linux developers (see http://www.altlinux.com). +* The ChromeOS icon (os_chrome.icns) is a cropped version of the icon from + Wikipedia + (http://en.wikipedia.org/wiki/File:Google_Chrome_icon_and_wordmark_%282011%29.svg), + which in turn is Google's original work. + * Erik Kemperman provided the rEFInd icon, which is a combination of the common refresh/reload icon and the search/find icon. diff --git a/NEWS.txt b/NEWS.txt index 46ce92f..68e771c 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,6 +1,12 @@ 0.6.10 (?/??/2013): ------------------- +- Added icon for ChromeOS (os_chrome.icns in the icons subdirectory). + ChromeOS reportedly boots using the fallback filename, but if a user + wants to install rEFInd on a ChromeBook, renaming the original EFI/BOOT + directory to EFI/chrome and then installing rEFInd in the fallback + filename will bring up this new icon for ChromeOS. + - Added new option to reboot the computer into the firmware's user interface. This option is active by default, or can be set via the "firmware" option to the "showtools" token in refind.conf. It works diff --git a/docs/refind/todo.html b/docs/refind/todo.html index 89835be..ef4520b 100644 --- a/docs/refind/todo.html +++ b/docs/refind/todo.html @@ -343,6 +343,9 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

loader settings—say, to disable one specific boot loader or change its icon. +
  • The ability to rotate the display for users who rotate their + monitors would be helpful.
  • +
  • A GUI configuration tool would be nice, but it's low on my personal priority list. If you'd like to contribute, I prefer something written in a cross-platform GUI toolkit, so that a single code base diff --git a/gptsync/gptsync.c b/gptsync/gptsync.c index 5d442c5..6cc1562 100644 --- a/gptsync/gptsync.c +++ b/gptsync/gptsync.c @@ -268,7 +268,7 @@ static VOID generate_hybrid_mbr(VOID) { i = 0; do { if ((gpt_parts[i].start_lba > 0) && (gpt_parts[i].end_lba > 0) && - (gpt_parts[i].end_lba <= MAX_MBR_LBA) && + (gpt_parts[i].end_lba <= MAX_MBR_LBA) && /* Within MBR limits */ (gpt_parts[i].gpt_parttype->kind == GPT_KIND_BASIC_DATA) && /* MS Basic Data GPT type code */ (gpt_parts[i].mbr_type != 0x83)) { /* Not containing Linux filesystem */ copy_gpt_to_new_mbr(i, new_mbr_part_count); @@ -282,7 +282,8 @@ static VOID generate_hybrid_mbr(VOID) { // Second, do Linux partitions. Note that we start from the END of the // partition list, so as to maximize the space covered by the 0xEE - // partition if there are several Linux partitions. + // 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) { if ((gpt_parts[i].start_lba > 0) && (gpt_parts[i].end_lba > 0) && @@ -377,7 +378,7 @@ static VOID generate_hybrid_mbr(VOID) { count_active++; } } - } + } // for } // VOID generate_hybrid_mbr() // Examine partitions and decide whether a rewrite is in order. diff --git a/libeg/image.c b/libeg/image.c index 8b6078d..9f22628 100644 --- a/libeg/image.c +++ b/libeg/image.c @@ -33,6 +33,14 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* + * Modifications copyright (c) 2012-2013 Roderick W. Smith + * + * Modifications distributed under the terms of the GNU General Public + * License (GPL) version 3 (GPLv3), a copy of which must be distributed + * with this source code or binaries made from it. + * + */ #include "libegint.h" #include "../refind/global.h" diff --git a/libeg/screen.c b/libeg/screen.c index 4b9c580..a10ee6b 100644 --- a/libeg/screen.c +++ b/libeg/screen.c @@ -34,7 +34,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* - * Modifications copyright (c) 2012 Roderick W. Smith + * Modifications copyright (c) 2012-2013 Roderick W. Smith * * Modifications distributed under the terms of the GNU General Public * License (GPL) version 3 (GPLv3), a copy of which must be distributed diff --git a/refind.inf b/refind.inf index 8619ec4..d555ce6 100644 --- a/refind.inf +++ b/refind.inf @@ -48,6 +48,7 @@ libeg/load_bmp.c libeg/load_icns.c libeg/lodepng.c + libeg/lodepng_extra.c libeg/screen.c libeg/text.c diff --git a/refind.spec b/refind.spec index 7f96a60..4fc1869 100644 --- a/refind.spec +++ b/refind.spec @@ -1,6 +1,6 @@ Summary: EFI boot manager software Name: refind -Version: 0.6.9 +Version: 0.6.9.2 Release: 1%{?dist} Summary: EFI boot manager software License: GPLv3 diff --git a/refind/config.c b/refind/config.c index 36f0464..30b3c1f 100644 --- a/refind/config.c +++ b/refind/config.c @@ -35,7 +35,7 @@ */ /* - * Modifications copyright (c) 2012 Roderick W. Smith + * Modifications copyright (c) 2012-2013 Roderick W. Smith * * Modifications distributed under the terms of the GNU General Public * License (GPL) version 3 (GPLv3), a copy of which must be distributed diff --git a/refind/config.h b/refind/config.h index af2b730..fd26572 100644 --- a/refind/config.h +++ b/refind/config.h @@ -35,7 +35,7 @@ */ /* - * Modifications copyright (c) 2012 Roderick W. Smith + * Modifications copyright (c) 2012-2013 Roderick W. Smith * * Modifications distributed under the terms of the GNU General Public * License (GPL) version 3 (GPLv3), a copy of which must be distributed diff --git a/refind/global.h b/refind/global.h index a4d8355..cfc5053 100644 --- a/refind/global.h +++ b/refind/global.h @@ -34,7 +34,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* - * Modifications copyright (c) 2012 Roderick W. Smith + * Modifications copyright (c) 2012-2013 Roderick W. Smith * * Modifications distributed under the terms of the GNU General Public * License (GPL) version 3 (GPLv3), a copy of which must be distributed diff --git a/refind/lib.c b/refind/lib.c index 601038c..d0262c1 100644 --- a/refind/lib.c +++ b/refind/lib.c @@ -34,12 +34,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* - * Modifications copyright (c) 2012 Roderick W. Smith + * Modifications copyright (c) 2012-2013 Roderick W. Smith * * Modifications distributed under the terms of the GNU General Public * License (GPL) version 3 (GPLv3), a copy of which must be distributed * with this source code or binaries made from it. - * + * */ #include "global.h" diff --git a/refind/main.c b/refind/main.c index 8679fd6..3c4f958 100644 --- a/refind/main.c +++ b/refind/main.c @@ -34,7 +34,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* - * Modifications copyright (c) 2012 Roderick W. Smith + * Modifications copyright (c) 2012-2013 Roderick W. Smith * * Modifications distributed under the terms of the GNU General Public * License (GPL) version 3 (GPLv3), a copy of which must be distributed @@ -326,13 +326,15 @@ static EFI_STATUS EfivarGetRaw(const EFI_GUID *vendor, CHAR16 *name, CHAR8 **buf CHAR8 *buf; UINTN l; EFI_STATUS err; + EFI_GUID vendor2; + CopyMem(&vendor2, vendor, sizeof(EFI_GUID)); l = sizeof(CHAR16 *) * EFI_MAXIMUM_VARIABLE_SIZE; buf = AllocatePool(l); if (!buf) return EFI_OUT_OF_RESOURCES; - err = uefi_call_wrapper(RT->GetVariable, 5, name, vendor, NULL, &l, buf); + err = refit_call5_wrapper(RT->GetVariable, name, &vendor2, NULL, &l, buf); if (EFI_ERROR(err) == EFI_SUCCESS) { *buffer = buf; if (size) @@ -345,12 +347,14 @@ static EFI_STATUS EfivarGetRaw(const EFI_GUID *vendor, CHAR16 *name, CHAR8 **buf // From gummiboot: Set an EFI variable static EFI_STATUS EfivarSetRaw(const EFI_GUID *vendor, CHAR16 *name, CHAR8 *buf, UINTN size, BOOLEAN persistent) { UINT32 flags; + EFI_GUID vendor2; + CopyMem(&vendor2, vendor, sizeof(EFI_GUID)); flags = EFI_VARIABLE_BOOTSERVICE_ACCESS|EFI_VARIABLE_RUNTIME_ACCESS; if (persistent) flags |= EFI_VARIABLE_NON_VOLATILE; - return uefi_call_wrapper(RT->SetVariable, 5, name, vendor, flags, size, buf); + return refit_call5_wrapper(RT->SetVariable, name, &vendor2, flags, size, buf); } // EFI_STATUS EfivarSetRaw() // From gummiboot: Reboot the computer into its built-in user interface @@ -371,7 +375,7 @@ static EFI_STATUS RebootIntoFirmware(VOID) { if (err != EFI_SUCCESS) return err; - uefi_call_wrapper(RT->ResetSystem, 4, EfiResetCold, EFI_SUCCESS, 0, NULL); + refit_call4_wrapper(RT->ResetSystem, EfiResetCold, EFI_SUCCESS, 0, NULL); Print(L"Error calling ResetSystem: %r", err); PauseForKey(); // uefi_call_wrapper(BS->Stall, 1, 3 * 1000 * 1000); @@ -1197,7 +1201,7 @@ static VOID ScanEfiFiles(REFIT_VOLUME *Volume) { } // if should scan Mac directory // check for Microsoft boot loader/menu - StrCpy(FileName, L"EFI\\Microsoft\\Boot\\Bootmgfw.efi"); + StrCpy(FileName, L"EFI\\Microsoft\\Boot\\bootmgfw.efi"); if (FileExists(Volume->RootDir, FileName) && ShouldScan(Volume, L"EFI\\Microsoft\\Boot") && !IsIn(L"bootmgfw.efi", GlobalConfig.DontScanFiles)) { AddLoaderEntry(FileName, L"Microsoft EFI boot", Volume); -- 2.39.2