qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] configure: Check bzip2 is available


From: Thomas Huth
Subject: Re: [PATCH] configure: Check bzip2 is available
Date: Fri, 8 Nov 2019 13:03:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0

On 08/11/2019 12.39, Laszlo Ersek wrote:
On 11/08/19 11:42, Philippe Mathieu-Daudé wrote:
On 11/8/19 11:34 AM, Thomas Huth wrote:
On 08/11/2019 11.28, Philippe Mathieu-Daudé wrote:
The bzip2 tool is not included in default installations.
On freshly installed systems, ./configure succeeds but 'make'
might fail later:

      BUNZIP2 pc-bios/edk2-i386-secure-code.fd.bz2
    /bin/sh: bzip2: command not found
    make: *** [Makefile:305: pc-bios/edk2-i386-secure-code.fd] Error 127
    make: *** Deleting file 'pc-bios/edk2-i386-secure-code.fd'
    make: *** Waiting for unfinished jobs....

Add a check in ./configure to warn the user if bzip2 is missing.

Fixes: 536d2173b2b
Reported-by: Thomas Huth <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
   configure | 7 +++++++
   1 file changed, 7 insertions(+)

diff --git a/configure b/configure
index efe165edf9..9957e913e8 100755
--- a/configure
+++ b/configure
@@ -1851,6 +1851,13 @@ python_version=$($python -c 'import sys;
print("%d.%d.%d" % (sys.version_info[0]
   # Suppress writing compiled files
   python="$python -B"
+# Some firmware binaries are compressed with bzip2
+if has bzip2; then
+  :
+else
+  error_exit "bzip2 program not found. Please install it"
+fi

It's only required for the edk2 binaries, isn't it? So should this
maybe also check whether we build any of the i386-softmmu,
x86_64-softmmu arm-softmmu or aarch64-softmmu targets and pass otherwise?

I have this on my TODO somewhere, because we extract the edk2 firmwares
even if we only build MIPS/PowerPC.

But that applies to all of "BLOBS" in the root-level Makefile, doesn't
it? We also install, say, "vgabios-qxl.bin", when only the MIPS/PowerPC
system emulators are built.

IIRC there was another odd dependency that the PCI devices need their ROM also on non-x86 systems... but that's another story...

The only aspect that's specific to edk2
binaries is that they are kept compressed until installation time, to
save space in the git repo and in the source tarball.

I noticed that there are also some iotests that use bzip2 ... they are not used during the build process, but still, it might be better to simply always require bzip2, also in case some other architectures want to use it. So I'm also fine if we simply always require bzip2 for the build.

 Thomas

PS: Anybody interested in writing a patch to compress the other big binaries in the pc-bios folder, too? ... skiboot.lid ... openbios-sparc64 ... ppc_rom.bin ...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]