From: Christian Melki <christian.melki@t2data.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] qemu: Add possibility to drop edk2 firmware.
Date: Thu, 3 Mar 2022 22:49:20 +0100 [thread overview]
Message-ID: <20220303214920.4084431-1-christian.melki@t2data.com> (raw)
EDK2 firmware files are large and very sparse ROM images.
The set currently borders 200M.
AFAIK, QEMU can't load compressed raw firmware files.
So add the possibility to drop EDK2 in case it's unused.
Signed-off-by: Christian Melki <christian.melki@t2data.com>
---
rules/qemu.in | 8 ++++++++
rules/qemu.make | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/rules/qemu.in b/rules/qemu.in
index eb689a188..30f1cc2f5 100644
--- a/rules/qemu.in
+++ b/rules/qemu.in
@@ -62,6 +62,14 @@ config QEMU_TOOLS
help
Say y here to include tools.
+config QEMU_EDK2_FIRMWARE
+ bool
+ prompt "Enable edk2 firmware"
+ default y
+ help
+ Say n here to drop the edk2 (UEFI) firmware files.
+ They can be substantial in size (> 100M).
+
config QEMU_SYS
bool
prompt "system emulation"
diff --git a/rules/qemu.make b/rules/qemu.make
index beaf1759c..fad87903f 100644
--- a/rules/qemu.make
+++ b/rules/qemu.make
@@ -235,11 +235,13 @@ ifneq ($(filter i386 x86_64,$(QEMU_TARGETS)),)
@$(call install_copy, qemu, 0, 0, 0644, -, /usr/share/qemu/bios-256k.bin)
@$(call install_copy, qemu, 0, 0, 0644, -, /usr/share/qemu/bios-microvm.bin)
@$(call install_copy, qemu, 0, 0, 0644, -, /usr/share/qemu/bios.bin)
+ifdef PTXCONF_QEMU_EDK2_FIRMWARE
@$(call install_copy, qemu, 0, 0, 0644, -, /usr/share/qemu/edk2-i386-code.fd)
@$(call install_copy, qemu, 0, 0, 0644, -, /usr/share/qemu/edk2-i386-secure-code.fd)
@$(call install_copy, qemu, 0, 0, 0644, -, /usr/share/qemu/edk2-i386-vars.fd)
@$(call install_copy, qemu, 0, 0, 0644, -, /usr/share/qemu/edk2-x86_64-code.fd)
@$(call install_copy, qemu, 0, 0, 0644, -, /usr/share/qemu/edk2-x86_64-secure-code.fd)
+endif
@$(call install_copy, qemu, 0, 0, 0644, -, /usr/share/qemu/linuxboot.bin)
@$(call install_copy, qemu, 0, 0, 0644, -, /usr/share/qemu/linuxboot_dma.bin)
@$(call install_copy, qemu, 0, 0, 0644, -, /usr/share/qemu/pxe-e1000.rom)
@@ -257,9 +259,11 @@ ifneq ($(filter i386 x86_64,$(QEMU_TARGETS)),)
endif
ifneq ($(filter arm aarch64,$(QEMU_TARGETS)),)
+ifdef PTXCONF_QEMU_EDK2_FIRMWARE
@$(call install_copy, qemu, 0, 0, 0644, -, /usr/share/qemu/edk2-aarch64-code.fd)
@$(call install_copy, qemu, 0, 0, 0644, -, /usr/share/qemu/edk2-arm-code.fd)
@$(call install_copy, qemu, 0, 0, 0644, -, /usr/share/qemu/edk2-arm-vars.fd)
+endif
@$(call install_glob, qemu, 0, 0, -, /usr/share/qemu/firmware, *arm*,)
@$(call install_glob, qemu, 0, 0, -, /usr/share/qemu/firmware, *aarch64*,)
endif
--
2.30.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
next reply other threads:[~2022-03-03 21:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 21:49 Christian Melki [this message]
2022-03-11 9:25 ` [ptxdist] [APPLIED] " Michael Olbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220303214920.4084431-1-christian.melki@t2data.com \
--to=christian.melki@t2data.com \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox