third_party/efistub: init
Adds the EFI stub from systemd-boot, built using our new EFI toolchain.
This allows us to bundle kernels, command lines and other data into
single EFI payloads and also sign them later.
A rules to build these unified EFI payloads is coming later.
Change-Id: I789e893ff88541f3dc9e7400ccd2565ae414e554
Reviewed-on: https://review.monogon.dev/c/monogon/+/335
Reviewed-by: Sergiusz Bazanski <serge@monogon.tech>
diff --git a/third_party/efistub/patches/remove-wrong-cmdline-assertion.patch b/third_party/efistub/patches/remove-wrong-cmdline-assertion.patch
new file mode 100644
index 0000000..216c5e9
--- /dev/null
+++ b/third_party/efistub/patches/remove-wrong-cmdline-assertion.patch
@@ -0,0 +1,26 @@
+From 8f0fa4ec981e6c22013949f551ef1b2d7b7dc0e3 Mon Sep 17 00:00:00 2001
+From: Lorenz Brun <lorenz@monogon.tech>
+Date: Wed, 29 Sep 2021 19:10:17 +0200
+Subject: [PATCH] Remove wrong assertion that a cmdline exists
+
+All uses of cmdline are gated behind an if statement, it is perfectly
+acceptable for cmdline to not be passed.
+---
+ src/boot/efi/linux.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/boot/efi/linux.c b/src/boot/efi/linux.c
+index 0d58f39ff6..ad82ade019 100644
+--- a/src/boot/efi/linux.c
++++ b/src/boot/efi/linux.c
+@@ -40,7 +40,6 @@ EFI_STATUS linux_exec(EFI_HANDLE image,
+ EFI_STATUS err;
+
+ assert(image);
+- assert(cmdline);
+
+ image_params = (const struct boot_params *) linux_addr;
+
+--
+2.25.1
+