Re: [PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars
Oskari Pirhonen <[email protected]> Tue, 18 Oct 2022 01:35:35 -0500
| Newsgroups | gmane.linux.debian.ports.bsd,gmane.comp.boot-loaders.grub.devel,gmane.comp.emulators.xen.devel |
|---|---|
| Message-ID | <Y05JN1zyh/++s5RA@dj3ntoo> |
On Mon, Oct 17, 2022 at 03:35:32 -0700, Denton Liu wrote: > A user may wish to use an image that is not sorted as the "latest" > version as the top-level entry. For example, in Arch Linux, if a user > has the LTS and regular kernels installed, `/boot/vmlinuz-linux-lts` > gets sorted as the "latest" compared to `/boot/vmlinuz-linux`. However, > a user may wish to use the regular kernel as the default with the LTS > only existing as a backup. > > Introduce the GRUB_TOP_LEVEL, GRUB_TOP_LEVEL_XEN and > GRUB_TOP_LEVEL_OS_PROBER variables to allow users to specify the > top-level entry. > > Create grub_move_to_front() as a helper function which moves entries to > the front of a list. This function does the heavy lifting of moving > the menu entry to the front in each script. > > In 10_netbsd, since there isn't an explicit list variable, extract the > items that are being iterated through into a list so that we can > optionally apply grub_move_to_front() to the list before the loop. > > Signed-off-by: Denton Liu <[email protected]> Reviewed-by: Oskari Pirhonen <[email protected]> I've tested it on Linux, but the other platforms and os-prober are still untested. - Oskari
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQfOU+JeXjo4uxN6vCp8he9GGIfEQUCY05JMQAKCRCp8he9GGIf EQ0WAP0ZQxLfKP72sWT44WYI+U+sA+CLj0HtNgBM7y1Re5wnBwD8DVQv8NcQ8mkW qUNttUu8qfwYls2ccVNpvEHPvu9jGQE= =gtWi -----END PGP SIGNATURE-----