From: srs5694 Date: Tue, 21 Jul 2015 19:59:03 +0000 (-0400) Subject: Changes to enable rEFInd to build with GCC 5.1. Also some more X-Git-Url: https://code.delx.au/refind/commitdiff_plain/22024d99cdd226ab82566c7973c6a34a47d26c37 Changes to enable rEFInd to build with GCC 5.1. Also some more documentation additions. --- diff --git a/EfiLib/gnuefi-helper.c b/EfiLib/gnuefi-helper.c index 368246d..2c344b1 100644 --- a/EfiLib/gnuefi-helper.c +++ b/EfiLib/gnuefi-helper.c @@ -1,6 +1,6 @@ /* - * EfiLib/gnuefi.h - * GNU-EFI support in legacy boot code + * EfiLib/gnuefi-helper.c + * GNU-EFI support functions * * Copyright (c) 2014 Roderick W. Smith * With extensive borrowing from other sources (mostly Tianocore) diff --git a/EfiLib/gnuefi-helper.h b/EfiLib/gnuefi-helper.h index 1a17497..2a2fe07 100644 --- a/EfiLib/gnuefi-helper.h +++ b/EfiLib/gnuefi-helper.h @@ -23,7 +23,9 @@ #define UnicodeSPrint SPrint #define gRT RT #define gBS BS +#ifndef CONST #define CONST +#endif #define ASSERT_EFI_ERROR(status) ASSERT(!EFI_ERROR(status)) CHAR8 * @@ -50,4 +52,4 @@ GetNextDevicePathInstance ( OUT UINTN *Size ); -#endif \ No newline at end of file +#endif diff --git a/NEWS.txt b/NEWS.txt index a71278f..f9d10fd 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,6 +1,15 @@ -0.8.8 (6/??/2015): +0.9.0 (6/??/2015): ------------------ +- Added new "fold_linux_kernels" token to refind.conf. This option, when + active (the default) "folds" all Linux kernels in a directory into a + single entry on the rEFInd menu. The kernel with the most recent time + stamp is launched by default. To launch another kernel, you must press F2 + or Insert; additional kernels appear as options on the first kernel's + submenu. To see the pre-0.9.0 behavior, you must set "fold_linux_kernels + false" (or one of its synonyms, "off" or "0"). The point of this option + is to help de-clutter the rEFInd main menu. + - Added new Linux root (/) partition auto-discovery feature, based on Freedesktop.org's Discoverable Partitions Spec (DPS) (http://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/): diff --git a/docs/refind/linux.html b/docs/refind/linux.html index 9ce4ee9..95a8d9f 100644 --- a/docs/refind/linux.html +++ b/docs/refind/linux.html @@ -481,6 +481,8 @@ total 17943

rEFInd sorts boot loader entries within each directory by time stamp, so that the most recent entry comes first. Thus, if you specify a directory name (or a volume label, for loaders stored in a volume's root directory) as the default_selection, rEFInd will make the most recent loader in the directory the default. This can obviate the need to adjust this configuration parameter when you add a new kernel; chances are you want the most recently-added kernel to be the default, and rEFInd makes it so when you set the default_selection in this way. If you don't want the latest kernel to become the default, you can use touch to give the desired kernel (or other boot loader) in the directory a more recent time stamp, or you can set default_selection to a value that uniquely identifies your desired default loader. One caveat you should keep in mind is that the EFI and Windows interpret the hardware clock as local time, whereas Mac OS X uses Coordinated Universal Time (UTC). Linux can work either way. Thus, time stamps for boot loaders can be skewed by several hours depending on the environment in which they were created or last modified.

+

Prior to rEFInd 0.9.0, each Linux kernel appeared as a separate entry in the main rEFInd menu. This could make for a very crowded menu if you kept many old kernels and/or if you have several Linux distributions installed. rEFInd 0.9.0 adds a "folding" feature, in which multiple kernel entries in a single directory appear as a single entry in the main menu. Selecting that entry launches the kernel with the most recent time stamp. To launch an older kernel, you must press F2 or Insert; older kernels appear in the submenu shown earlier, but with the kernel filename prepended to the description. If you want to see all your kernels separated on the main menu, as in earlier versions of rEFInd, you should edit refind.conf: Uncomment the fold_linux_kernels option and set it to false, off, or 0.

+

On the whole, this method of configuration has a lot going for it. For distribution maintainers, if you place your Linux kernel files (with EFI stub support) on the ESP, with suitable filenames, matching initial RAM disk files, and a refind_linux.conf file, then any rEFInd 0.2.3 or later installation should detect your files, even if the user installs another distribution with another rEFInd that takes over from yours. (If the user, or this other rEFInd installation, disables auto-detection, this won't work.)

diff --git a/refind/menu.c b/refind/menu.c index a137b06..63bf9fc 100644 --- a/refind/menu.c +++ b/refind/menu.c @@ -1052,7 +1052,7 @@ static VOID PaintIcon(IN EG_EMBEDDED_IMAGE *BuiltInIcon, IN CHAR16 *ExternalFile } } // static VOID () -inline UINTN ComputeRow0PosY(VOID) { +UINTN ComputeRow0PosY(VOID) { return ((UGAHeight / 2) - TileSizes[0] / 2); } // UINTN ComputeRow0PosY() diff --git a/refind/menu.h b/refind/menu.h index 5724c4c..0b2db1f 100644 --- a/refind/menu.h +++ b/refind/menu.h @@ -94,7 +94,7 @@ struct _refit_menu_screen; VOID AddMenuInfoLine(IN REFIT_MENU_SCREEN *Screen, IN CHAR16 *InfoLine); VOID AddMenuEntry(IN REFIT_MENU_SCREEN *Screen, IN REFIT_MENU_ENTRY *Entry); -inline UINTN ComputeRow0PosY(VOID); +UINTN ComputeRow0PosY(VOID); VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINTN Function, IN CHAR16 *ParamText); UINTN RunMenu(IN REFIT_MENU_SCREEN *Screen, OUT REFIT_MENU_ENTRY **ChosenEntry); UINTN RunMainMenu(IN REFIT_MENU_SCREEN *Screen, IN CHAR16** DefaultSelection, OUT REFIT_MENU_ENTRY **ChosenEntry);