Compare commits

..

2 Commits

Author SHA1 Message Date
Adrian Vovk 7d7045da7a
Merge be7d9867ed into bbec1c87d3 2024-11-26 21:47:06 +00:00
Adrian Vovk be7d9867ed
bootspec: Look at /loader/addons in XBOOTLDR
The bootspec util-lib's handling of global addons didn't previously
match the behavior of sd-stub, and this commit corrects that.

First, bootspec didn't load global addons from the XBOOTLDR dir, but the
stub does. So, bootspec now enumerates addons in XBOOTLDR, not just ESP

Second, the stub only loads resources (including addons) from the
partition that it was found on. Thus, we must keep track of which
partition the global addons come from, and which partition each boot
entry comes from. In other words: global addons found on the ESP will
NOT apply to UKIs found in XBOOTLDR, and bootspec now reflects that.
2024-11-26 16:46:34 -05:00
1 changed files with 0 additions and 2 deletions

View File

@ -1558,7 +1558,6 @@ int boot_config_augment_from_loader(
char **found_by_loader,
bool only_auto) {
static const BootEntryAddons no_addons = (BootEntryAddons) {};
static const char *const title_table[] = {
/* Pretty names for a few well-known automatically discovered entries. */
"auto-osx", "macOS",
@ -1616,7 +1615,6 @@ int boot_config_augment_from_loader(
.reported_by_loader = true,
.tries_left = UINT_MAX,
.tries_done = UINT_MAX,
.global_addons = &no_addons,
};
}