Compare commits

..

2 Commits

Author SHA1 Message Date
Adrian Vovk 547830bbe2
Merge f2751d757f into bbec1c87d3 2024-11-26 22:25:44 -05:00
Adrian Vovk f2751d757f
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 22:25:29 -05:00
1 changed files with 2 additions and 0 deletions

View File

@ -1558,6 +1558,7 @@ 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",
@ -1615,6 +1616,7 @@ int boot_config_augment_from_loader(
.reported_by_loader = true,
.tries_left = UINT_MAX,
.tries_done = UINT_MAX,
.global_addons = &no_addons,
};
}