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.
This commit is contained in:
Adrian Vovk
2024-11-26 22:25:29 -05:00
parent ef370a3c30
commit f2751d757f
4 changed files with 77 additions and 30 deletions
-1
View File
@@ -92,7 +92,6 @@ static int status_entries(
r = show_boot_entry(
boot_config_default_entry(config),
&config->global_addons,
/* show_as_default= */ false,
/* show_as_selected= */ false,
/* show_discovered= */ false);