From: Дамјан Георгиевски Date: Mon, 15 Jan 2018 17:08:11 +0000 (+0100) Subject: EFI stub: add StubInfo if non-existant X-Git-Tag: v237~56^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34412f79e6ad439d3fa99de6d97d8322e08c1e45;p=thirdparty%2Fsystemd.git EFI stub: add StubInfo if non-existant currently if a stub image is directly booted, bootctl reports: ``` Current Loader: Product: n/a ESP: /dev/disk/by-partuuid/b0a0807d-0592-40e9-adac-3bb724e9e305 File: └─/EFI/Secure/secure-boot-4.14.8+.efi ``` Let's add a StubInfo which will be displayed by bootctl too (in a later patch). --- diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c index cf525790864..ff45cebd456 100644 --- a/src/boot/efi/stub.c +++ b/src/boot/efi/stub.c @@ -124,6 +124,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { FreePool(loader_firmware_type); } + /* add StubInfo */ + if (efivar_get_raw(&global_guid, L"StubInfo", &b, &size) != EFI_SUCCESS) + efivar_set(L"StubInfo", L"systemd-stub " PACKAGE_VERSION, FALSE); if (szs[3] > 0) graphics_splash((UINT8 *)((UINTN)loaded_image->ImageBase + addrs[3]), szs[3], NULL);