summaryrefslogtreecommitdiff
path: root/src/boot/efi/stub.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2015-02-26 18:33:37 +0100
committerKay Sievers <kay@vrfy.org>2015-02-26 18:58:30 +0100
commit37fa369066c2db1ecc6c7046192503aedc2431f6 (patch)
treec883a3410dd3716c58e2de24ee5d2b8f5f73710e /src/boot/efi/stub.c
parent03455c2879699852b691903343e378c28992ff6a (diff)
boot: efi - support embedded splash image
Diffstat (limited to 'src/boot/efi/stub.c')
-rw-r--r--src/boot/efi/stub.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c
index e18faac669..bd391965bc 100644
--- a/src/boot/efi/stub.c
+++ b/src/boot/efi/stub.c
@@ -18,10 +18,11 @@
#include "util.h"
#include "pefile.h"
+#include "graphics.h"
#include "linux.h"
/* magic string to find in the binary image */
-static const char __attribute__((used)) magic[] = "#### LoaderInfo: stub " VERSION " ####";
+static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-stub " VERSION " ####";
static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE;
@@ -36,6 +37,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
(UINT8 *)".cmdline",
(UINT8 *)".linux",
(UINT8 *)".initrd",
+ (UINT8 *)".splash",
NULL
};
UINTN addrs[ELEMENTSOF(sections)-1] = {};
@@ -96,10 +98,14 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
cmdline = line;
}
+ if (szs[3] > 0)
+ graphics_splash((UINT8 *)((UINTN)loaded_image->ImageBase + addrs[3]), szs[3], NULL);
+
err = linux_exec(image, cmdline, cmdline_len,
(UINTN)loaded_image->ImageBase + addrs[1],
(UINTN)loaded_image->ImageBase + addrs[2], szs[2]);
+ graphics_mode(FALSE);
Print(L"Execution of embedded linux image failed: %r\n", err);
uefi_call_wrapper(BS->Stall, 1, 3 * 1000 * 1000);
return err;