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).
This commit is contained in:
Дамјан Георгиевски
2018-01-15 18:08:11 +01:00
parent 1aa15defbf
commit 34412f79e6

View File

@@ -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);