systemd-boot: build the EFI stub

Also build and deploy the EFI stub.  SYSTEMD_BOOT_EFI_ARCH can be dropped
as image-uefi.conf now sets EFI_ARCH.

Changes originally taken from meta-intel.

(From OE-Core rev: 00191504bd9321334a5c01b95179ed15b063f1b6)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton 2020-12-14 18:31:46 +00:00 committed by Richard Purdie
parent df50c8308b
commit 118f3a24f2

View File

@ -47,16 +47,14 @@ RDEPENDS_${PN} += "virtual/systemd-bootconf"
# Imported from the old gummiboot recipe # Imported from the old gummiboot recipe
TUNE_CCARGS_remove = "-mfpmath=sse" TUNE_CCARGS_remove = "-mfpmath=sse"
COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux" COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
COMPATIBLE_HOST_x86-x32 = "null" COMPATIBLE_HOST_x86-x32 = "null"
do_compile() { do_compile() {
SYSTEMD_BOOT_EFI_ARCH="ia32" ninja \
if [ "${TARGET_ARCH}" = "x86_64" ]; then src/boot/efi/${SYSTEMD_BOOT_IMAGE_PREFIX}${SYSTEMD_BOOT_IMAGE} \
SYSTEMD_BOOT_EFI_ARCH="x64" src/boot/efi/linux${EFI_ARCH}.efi.stub
fi
ninja src/boot/efi/${SYSTEMD_BOOT_IMAGE_PREFIX}${SYSTEMD_BOOT_IMAGE}
} }
do_install() { do_install() {
@ -66,5 +64,7 @@ do_install() {
do_deploy () { do_deploy () {
install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR} install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR}
install ${B}/src/boot/efi/linux*.efi.stub ${DEPLOYDIR}
} }
addtask deploy before do_build after do_compile addtask deploy before do_build after do_compile