* [PATCH v2 0/2] configure: Only decompress EDK2 blobs and check for bzip2 for X86/ARM
@ 2019-11-08 11:45 Philippe Mathieu-Daudé
2019-11-08 11:45 ` [PATCH v2 1/2] configure: Only decompress EDK2 blobs for X86/ARM targets Philippe Mathieu-Daudé
2019-11-08 11:45 ` [PATCH v2 2/2] configure: Check bzip2 is available Philippe Mathieu-Daudé
0 siblings, 2 replies; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-11-08 11:45 UTC (permalink / raw)
To: qemu-devel, Laszlo Ersek
Cc: qemu-trivial, Philippe Mathieu-Daudé,
Thomas Huth, Daniel P . Berrange, Wainer dos Santos Moschetta
This series fixes a bug reported by Thomas: bzip2 is (only) required
to decompress the EDK2 blobs, which target the ARM/X86 archs.
First restrict the blobs decompression to their targets (we don't
need to decompress them when not building X86/ARM).
Then check bzip2 is available.
Philippe Mathieu-Daudé (2):
configure: Only decompress EDK2 blobs for X86/ARM targets
configure: Check bzip2 is available
Makefile | 2 ++
configure | 17 +++++++++++++++++
2 files changed, 19 insertions(+)
--
2.21.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/2] configure: Only decompress EDK2 blobs for X86/ARM targets
2019-11-08 11:45 [PATCH v2 0/2] configure: Only decompress EDK2 blobs and check for bzip2 for X86/ARM Philippe Mathieu-Daudé
@ 2019-11-08 11:45 ` Philippe Mathieu-Daudé
2019-11-08 11:47 ` Daniel P. Berrangé
` (4 more replies)
2019-11-08 11:45 ` [PATCH v2 2/2] configure: Check bzip2 is available Philippe Mathieu-Daudé
1 sibling, 5 replies; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-11-08 11:45 UTC (permalink / raw)
To: qemu-devel, Laszlo Ersek
Cc: qemu-trivial, Philippe Mathieu-Daudé,
Thomas Huth, Daniel P . Berrange, Wainer dos Santos Moschetta
The EDK2 firmware blobs only target the X86/ARM architectures.
Define the DECOMPRESS_EDK2_BLOBS variable and only decompress
the blobs when the variable exists.
Fixes: 536d2173b2b
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
v2: new
---
Makefile | 2 ++
configure | 13 +++++++++++++
2 files changed, 15 insertions(+)
diff --git a/Makefile b/Makefile
index aa9d1a42aa..3430eca532 100644
--- a/Makefile
+++ b/Makefile
@@ -480,7 +480,9 @@ $(SOFTMMU_ALL_RULES): $(chardev-obj-y)
$(SOFTMMU_ALL_RULES): $(crypto-obj-y)
$(SOFTMMU_ALL_RULES): $(io-obj-y)
$(SOFTMMU_ALL_RULES): config-all-devices.mak
+ifdef DECOMPRESS_EDK2_BLOBS
$(SOFTMMU_ALL_RULES): $(edk2-decompressed)
+endif
.PHONY: $(TARGET_DIRS_RULES)
# The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
diff --git a/configure b/configure
index efe165edf9..9b322284c3 100755
--- a/configure
+++ b/configure
@@ -427,6 +427,7 @@ softmmu="yes"
linux_user="no"
bsd_user="no"
blobs="yes"
+edk2_blobs="no"
pkgversion=""
pie=""
qom_cast_debug="yes"
@@ -2146,6 +2147,14 @@ case " $target_list " in
;;
esac
+for target in $target_list; do
+ case "$target" in
+ arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
+ edk2_blobs="yes"
+ ;;
+ esac
+done
+
feature_not_found() {
feature=$1
remedy=$2
@@ -7526,6 +7535,10 @@ if test "$libudev" != "no"; then
echo "LIBUDEV_LIBS=$libudev_libs" >> $config_host_mak
fi
+if test "$edk2_blobs" = "yes" ; then
+ echo "DECOMPRESS_EDK2_BLOBS=y" >> $config_host_mak
+fi
+
# use included Linux headers
if test "$linux" = "yes" ; then
mkdir -p linux-headers
--
2.21.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 2/2] configure: Check bzip2 is available
2019-11-08 11:45 [PATCH v2 0/2] configure: Only decompress EDK2 blobs and check for bzip2 for X86/ARM Philippe Mathieu-Daudé
2019-11-08 11:45 ` [PATCH v2 1/2] configure: Only decompress EDK2 blobs for X86/ARM targets Philippe Mathieu-Daudé
@ 2019-11-08 11:45 ` Philippe Mathieu-Daudé
2019-11-08 11:48 ` Daniel P. Berrangé
2019-11-08 14:04 ` Luc Michel
1 sibling, 2 replies; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-11-08 11:45 UTC (permalink / raw)
To: qemu-devel, Laszlo Ersek
Cc: qemu-trivial, Philippe Mathieu-Daudé,
Thomas Huth, Daniel P . Berrange, Wainer dos Santos Moschetta
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 <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
v2: use better English (Daniel)
(Not taking Daniel Reviewed-by because logic changed)
---
configure | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
index 9b322284c3..2b419a8039 100755
--- a/configure
+++ b/configure
@@ -2147,6 +2147,7 @@ case " $target_list " in
;;
esac
+# Some firmware binaries are compressed with bzip2
for target in $target_list; do
case "$target" in
arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
@@ -2154,6 +2155,9 @@ for target in $target_list; do
;;
esac
done
+if test "$edk2_blobs" = "yes" && ! has bzip2; then
+ error_exit "The bzip2 program is required for building QEMU"
+fi
feature_not_found() {
feature=$1
--
2.21.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/2] configure: Only decompress EDK2 blobs for X86/ARM targets
2019-11-08 11:45 ` [PATCH v2 1/2] configure: Only decompress EDK2 blobs for X86/ARM targets Philippe Mathieu-Daudé
@ 2019-11-08 11:47 ` Daniel P. Berrangé
2019-11-08 11:49 ` Philippe Mathieu-Daudé
` (3 subsequent siblings)
4 siblings, 0 replies; 13+ messages in thread
From: Daniel P. Berrangé @ 2019-11-08 11:47 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-trivial, Thomas Huth, Laszlo Ersek, qemu-devel,
Wainer dos Santos Moschetta
On Fri, Nov 08, 2019 at 12:45:30PM +0100, Philippe Mathieu-Daudé wrote:
> The EDK2 firmware blobs only target the X86/ARM architectures.
> Define the DECOMPRESS_EDK2_BLOBS variable and only decompress
> the blobs when the variable exists.
>
> Fixes: 536d2173b2b
> Suggested-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> v2: new
> ---
> Makefile | 2 ++
> configure | 13 +++++++++++++
> 2 files changed, 15 insertions(+)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/2] configure: Check bzip2 is available
2019-11-08 11:45 ` [PATCH v2 2/2] configure: Check bzip2 is available Philippe Mathieu-Daudé
@ 2019-11-08 11:48 ` Daniel P. Berrangé
2019-11-08 13:33 ` Wainer dos Santos Moschetta
2019-11-08 17:43 ` Laszlo Ersek
2019-11-08 14:04 ` Luc Michel
1 sibling, 2 replies; 13+ messages in thread
From: Daniel P. Berrangé @ 2019-11-08 11:48 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-trivial, Thomas Huth, Laszlo Ersek, qemu-devel,
Wainer dos Santos Moschetta
On Fri, Nov 08, 2019 at 12:45:31PM +0100, 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 <thuth@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> v2: use better English (Daniel)
> (Not taking Daniel Reviewed-by because logic changed)
> ---
> configure | 4 ++++
> 1 file changed, 4 insertions(+)
> diff --git a/configure b/configure
> index 9b322284c3..2b419a8039 100755
> --- a/configure
> +++ b/configure
> @@ -2147,6 +2147,7 @@ case " $target_list " in
> ;;
> esac
>
> +# Some firmware binaries are compressed with bzip2
Squash into previous patch
> for target in $target_list; do
> case "$target" in
> arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
> @@ -2154,6 +2155,9 @@ for target in $target_list; do
> ;;
> esac
> done
> +if test "$edk2_blobs" = "yes" && ! has bzip2; then
> + error_exit "The bzip2 program is required for building QEMU"
> +fi
>
> feature_not_found() {
> feature=$1
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/2] configure: Only decompress EDK2 blobs for X86/ARM targets
2019-11-08 11:45 ` [PATCH v2 1/2] configure: Only decompress EDK2 blobs for X86/ARM targets Philippe Mathieu-Daudé
2019-11-08 11:47 ` Daniel P. Berrangé
@ 2019-11-08 11:49 ` Philippe Mathieu-Daudé
2019-11-08 13:32 ` Wainer dos Santos Moschetta
` (2 subsequent siblings)
4 siblings, 0 replies; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-11-08 11:49 UTC (permalink / raw)
To: qemu-devel, Laszlo Ersek
Cc: qemu-trivial, Thomas Huth, Daniel P . Berrange,
Wainer dos Santos Moschetta
On 11/8/19 12:45 PM, Philippe Mathieu-Daudé wrote:
> The EDK2 firmware blobs only target the X86/ARM architectures.
> Define the DECOMPRESS_EDK2_BLOBS variable and only decompress
> the blobs when the variable exists.
>
> Fixes: 536d2173b2b
> Suggested-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> v2: new
> ---
> Makefile | 2 ++
> configure | 13 +++++++++++++
Oops sorry, new workspace, I hadn't installed scripts/git.orderfile.
> 2 files changed, 15 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index aa9d1a42aa..3430eca532 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -480,7 +480,9 @@ $(SOFTMMU_ALL_RULES): $(chardev-obj-y)
> $(SOFTMMU_ALL_RULES): $(crypto-obj-y)
> $(SOFTMMU_ALL_RULES): $(io-obj-y)
> $(SOFTMMU_ALL_RULES): config-all-devices.mak
> +ifdef DECOMPRESS_EDK2_BLOBS
> $(SOFTMMU_ALL_RULES): $(edk2-decompressed)
> +endif
>
> .PHONY: $(TARGET_DIRS_RULES)
> # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
> diff --git a/configure b/configure
> index efe165edf9..9b322284c3 100755
> --- a/configure
> +++ b/configure
> @@ -427,6 +427,7 @@ softmmu="yes"
> linux_user="no"
> bsd_user="no"
> blobs="yes"
> +edk2_blobs="no"
> pkgversion=""
> pie=""
> qom_cast_debug="yes"
> @@ -2146,6 +2147,14 @@ case " $target_list " in
> ;;
> esac
>
> +for target in $target_list; do
> + case "$target" in
> + arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
> + edk2_blobs="yes"
> + ;;
> + esac
> +done
> +
> feature_not_found() {
> feature=$1
> remedy=$2
> @@ -7526,6 +7535,10 @@ if test "$libudev" != "no"; then
> echo "LIBUDEV_LIBS=$libudev_libs" >> $config_host_mak
> fi
>
> +if test "$edk2_blobs" = "yes" ; then
> + echo "DECOMPRESS_EDK2_BLOBS=y" >> $config_host_mak
> +fi
> +
> # use included Linux headers
> if test "$linux" = "yes" ; then
> mkdir -p linux-headers
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/2] configure: Only decompress EDK2 blobs for X86/ARM targets
2019-11-08 11:45 ` [PATCH v2 1/2] configure: Only decompress EDK2 blobs for X86/ARM targets Philippe Mathieu-Daudé
2019-11-08 11:47 ` Daniel P. Berrangé
2019-11-08 11:49 ` Philippe Mathieu-Daudé
@ 2019-11-08 13:32 ` Wainer dos Santos Moschetta
2019-11-08 14:02 ` Luc Michel
2019-11-08 17:38 ` Laszlo Ersek
4 siblings, 0 replies; 13+ messages in thread
From: Wainer dos Santos Moschetta @ 2019-11-08 13:32 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel, Laszlo Ersek
Cc: qemu-trivial, Thomas Huth, Daniel P . Berrange
On 11/8/19 9:45 AM, Philippe Mathieu-Daudé wrote:
> The EDK2 firmware blobs only target the X86/ARM architectures.
> Define the DECOMPRESS_EDK2_BLOBS variable and only decompress
> the blobs when the variable exists.
>
> Fixes: 536d2173b2b
> Suggested-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> v2: new
> ---
> Makefile | 2 ++
> configure | 13 +++++++++++++
> 2 files changed, 15 insertions(+)
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
- Wainer
>
> diff --git a/Makefile b/Makefile
> index aa9d1a42aa..3430eca532 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -480,7 +480,9 @@ $(SOFTMMU_ALL_RULES): $(chardev-obj-y)
> $(SOFTMMU_ALL_RULES): $(crypto-obj-y)
> $(SOFTMMU_ALL_RULES): $(io-obj-y)
> $(SOFTMMU_ALL_RULES): config-all-devices.mak
> +ifdef DECOMPRESS_EDK2_BLOBS
> $(SOFTMMU_ALL_RULES): $(edk2-decompressed)
> +endif
>
> .PHONY: $(TARGET_DIRS_RULES)
> # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
> diff --git a/configure b/configure
> index efe165edf9..9b322284c3 100755
> --- a/configure
> +++ b/configure
> @@ -427,6 +427,7 @@ softmmu="yes"
> linux_user="no"
> bsd_user="no"
> blobs="yes"
> +edk2_blobs="no"
> pkgversion=""
> pie=""
> qom_cast_debug="yes"
> @@ -2146,6 +2147,14 @@ case " $target_list " in
> ;;
> esac
>
> +for target in $target_list; do
> + case "$target" in
> + arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
> + edk2_blobs="yes"
> + ;;
> + esac
> +done
> +
> feature_not_found() {
> feature=$1
> remedy=$2
> @@ -7526,6 +7535,10 @@ if test "$libudev" != "no"; then
> echo "LIBUDEV_LIBS=$libudev_libs" >> $config_host_mak
> fi
>
> +if test "$edk2_blobs" = "yes" ; then
> + echo "DECOMPRESS_EDK2_BLOBS=y" >> $config_host_mak
> +fi
> +
> # use included Linux headers
> if test "$linux" = "yes" ; then
> mkdir -p linux-headers
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/2] configure: Check bzip2 is available
2019-11-08 11:48 ` Daniel P. Berrangé
@ 2019-11-08 13:33 ` Wainer dos Santos Moschetta
2019-11-08 17:43 ` Laszlo Ersek
1 sibling, 0 replies; 13+ messages in thread
From: Wainer dos Santos Moschetta @ 2019-11-08 13:33 UTC (permalink / raw)
To: Daniel P. Berrangé, Philippe Mathieu-Daudé
Cc: qemu-trivial, Thomas Huth, Laszlo Ersek, qemu-devel
On 11/8/19 9:48 AM, Daniel P. Berrangé wrote:
> On Fri, Nov 08, 2019 at 12:45:31PM +0100, 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 <thuth@redhat.com>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> v2: use better English (Daniel)
>> (Not taking Daniel Reviewed-by because logic changed)
>> ---
>> configure | 4 ++++
>> 1 file changed, 4 insertions(+)
>> diff --git a/configure b/configure
>> index 9b322284c3..2b419a8039 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2147,6 +2147,7 @@ case " $target_list " in
>> ;;
>> esac
>>
>> +# Some firmware binaries are compressed with bzip2
> Squash into previous patch
Ditto.
>
>> for target in $target_list; do
>> case "$target" in
>> arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
>> @@ -2154,6 +2155,9 @@ for target in $target_list; do
>> ;;
>> esac
>> done
>> +if test "$edk2_blobs" = "yes" && ! has bzip2; then
>> + error_exit "The bzip2 program is required for building QEMU"
>> +fi
>>
>> feature_not_found() {
>> feature=$1
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
- Wainer
>
>
> Regards,
> Daniel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/2] configure: Only decompress EDK2 blobs for X86/ARM targets
2019-11-08 11:45 ` [PATCH v2 1/2] configure: Only decompress EDK2 blobs for X86/ARM targets Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2019-11-08 13:32 ` Wainer dos Santos Moschetta
@ 2019-11-08 14:02 ` Luc Michel
2019-11-08 17:38 ` Laszlo Ersek
4 siblings, 0 replies; 13+ messages in thread
From: Luc Michel @ 2019-11-08 14:02 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel, Laszlo Ersek
Cc: qemu-trivial, Thomas Huth, Daniel P . Berrange,
Wainer dos Santos Moschetta
On 11/8/19 12:45 PM, Philippe Mathieu-Daudé wrote:
> The EDK2 firmware blobs only target the X86/ARM architectures.
> Define the DECOMPRESS_EDK2_BLOBS variable and only decompress
> the blobs when the variable exists.
>
> Fixes: 536d2173b2b
> Suggested-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> v2: new
> ---
> Makefile | 2 ++
> configure | 13 +++++++++++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index aa9d1a42aa..3430eca532 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -480,7 +480,9 @@ $(SOFTMMU_ALL_RULES): $(chardev-obj-y)
> $(SOFTMMU_ALL_RULES): $(crypto-obj-y)
> $(SOFTMMU_ALL_RULES): $(io-obj-y)
> $(SOFTMMU_ALL_RULES): config-all-devices.mak
> +ifdef DECOMPRESS_EDK2_BLOBS
> $(SOFTMMU_ALL_RULES): $(edk2-decompressed)
> +endif
>
> .PHONY: $(TARGET_DIRS_RULES)
> # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
> diff --git a/configure b/configure
> index efe165edf9..9b322284c3 100755
> --- a/configure
> +++ b/configure
> @@ -427,6 +427,7 @@ softmmu="yes"
> linux_user="no"
> bsd_user="no"
> blobs="yes"
> +edk2_blobs="no"
> pkgversion=""
> pie=""
> qom_cast_debug="yes"
> @@ -2146,6 +2147,14 @@ case " $target_list " in
> ;;
> esac
>
> +for target in $target_list; do
> + case "$target" in
> + arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
> + edk2_blobs="yes"
> + ;;
> + esac
> +done
> +
> feature_not_found() {
> feature=$1
> remedy=$2
> @@ -7526,6 +7535,10 @@ if test "$libudev" != "no"; then
> echo "LIBUDEV_LIBS=$libudev_libs" >> $config_host_mak
> fi
>
> +if test "$edk2_blobs" = "yes" ; then
> + echo "DECOMPRESS_EDK2_BLOBS=y" >> $config_host_mak
> +fi
> +
> # use included Linux headers
> if test "$linux" = "yes" ; then
> mkdir -p linux-headers
>
Reviewed-by: Luc Michel <luc.michel@greensocs.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/2] configure: Check bzip2 is available
2019-11-08 11:45 ` [PATCH v2 2/2] configure: Check bzip2 is available Philippe Mathieu-Daudé
2019-11-08 11:48 ` Daniel P. Berrangé
@ 2019-11-08 14:04 ` Luc Michel
1 sibling, 0 replies; 13+ messages in thread
From: Luc Michel @ 2019-11-08 14:04 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel, Laszlo Ersek
Cc: qemu-trivial, Thomas Huth, Daniel P . Berrange,
Wainer dos Santos Moschetta
On 11/8/19 12:45 PM, 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 <thuth@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> v2: use better English (Daniel)
> (Not taking Daniel Reviewed-by because logic changed)
> ---
> configure | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/configure b/configure
> index 9b322284c3..2b419a8039 100755
> --- a/configure
> +++ b/configure
> @@ -2147,6 +2147,7 @@ case " $target_list " in
> ;;
> esac
>
> +# Some firmware binaries are compressed with bzip2
With this comment squashed in previous commit:
Reviewed-by: Luc Michel <luc.michel@greensocs.com>
> for target in $target_list; do
> case "$target" in
> arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
> @@ -2154,6 +2155,9 @@ for target in $target_list; do
> ;;
> esac
> done
> +if test "$edk2_blobs" = "yes" && ! has bzip2; then
> + error_exit "The bzip2 program is required for building QEMU"
> +fi
>
> feature_not_found() {
> feature=$1
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/2] configure: Only decompress EDK2 blobs for X86/ARM targets
2019-11-08 11:45 ` [PATCH v2 1/2] configure: Only decompress EDK2 blobs for X86/ARM targets Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2019-11-08 14:02 ` Luc Michel
@ 2019-11-08 17:38 ` Laszlo Ersek
4 siblings, 0 replies; 13+ messages in thread
From: Laszlo Ersek @ 2019-11-08 17:38 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: qemu-trivial, Thomas Huth, Daniel P . Berrange,
Wainer dos Santos Moschetta
On 11/08/19 12:45, Philippe Mathieu-Daudé wrote:
> The EDK2 firmware blobs only target the X86/ARM architectures.
> Define the DECOMPRESS_EDK2_BLOBS variable and only decompress
> the blobs when the variable exists.
>
> Fixes: 536d2173b2b
> Suggested-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> v2: new
> ---
> Makefile | 2 ++
> configure | 13 +++++++++++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index aa9d1a42aa..3430eca532 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -480,7 +480,9 @@ $(SOFTMMU_ALL_RULES): $(chardev-obj-y)
> $(SOFTMMU_ALL_RULES): $(crypto-obj-y)
> $(SOFTMMU_ALL_RULES): $(io-obj-y)
> $(SOFTMMU_ALL_RULES): config-all-devices.mak
> +ifdef DECOMPRESS_EDK2_BLOBS
> $(SOFTMMU_ALL_RULES): $(edk2-decompressed)
> +endif
>
> .PHONY: $(TARGET_DIRS_RULES)
> # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that
> diff --git a/configure b/configure
> index efe165edf9..9b322284c3 100755
> --- a/configure
> +++ b/configure
> @@ -427,6 +427,7 @@ softmmu="yes"
> linux_user="no"
> bsd_user="no"
> blobs="yes"
> +edk2_blobs="no"
> pkgversion=""
> pie=""
> qom_cast_debug="yes"
> @@ -2146,6 +2147,14 @@ case " $target_list " in
> ;;
> esac
>
> +for target in $target_list; do
> + case "$target" in
> + arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
> + edk2_blobs="yes"
> + ;;
> + esac
> +done
> +
> feature_not_found() {
> feature=$1
> remedy=$2
> @@ -7526,6 +7535,10 @@ if test "$libudev" != "no"; then
> echo "LIBUDEV_LIBS=$libudev_libs" >> $config_host_mak
> fi
>
> +if test "$edk2_blobs" = "yes" ; then
> + echo "DECOMPRESS_EDK2_BLOBS=y" >> $config_host_mak
> +fi
> +
> # use included Linux headers
> if test "$linux" = "yes" ; then
> mkdir -p linux-headers
>
Impressively surgical & simple.
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Thank you!
Laszlo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/2] configure: Check bzip2 is available
2019-11-08 11:48 ` Daniel P. Berrangé
2019-11-08 13:33 ` Wainer dos Santos Moschetta
@ 2019-11-08 17:43 ` Laszlo Ersek
2019-11-11 13:38 ` Thomas Huth
1 sibling, 1 reply; 13+ messages in thread
From: Laszlo Ersek @ 2019-11-08 17:43 UTC (permalink / raw)
To: Daniel P. Berrangé, Philippe Mathieu-Daudé
Cc: qemu-trivial, Thomas Huth, qemu-devel, Wainer dos Santos Moschetta
On 11/08/19 12:48, Daniel P. Berrangé wrote:
> On Fri, Nov 08, 2019 at 12:45:31PM +0100, 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 <thuth@redhat.com>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> v2: use better English (Daniel)
>> (Not taking Daniel Reviewed-by because logic changed)
>> ---
>> configure | 4 ++++
>> 1 file changed, 4 insertions(+)
>
>> diff --git a/configure b/configure
>> index 9b322284c3..2b419a8039 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2147,6 +2147,7 @@ case " $target_list " in
>> ;;
>> esac
>>
>> +# Some firmware binaries are compressed with bzip2
>
> Squash into previous patch
>
>> for target in $target_list; do
>> case "$target" in
>> arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
>> @@ -2154,6 +2155,9 @@ for target in $target_list; do
>> ;;
>> esac
>> done
>> +if test "$edk2_blobs" = "yes" && ! has bzip2; then
>> + error_exit "The bzip2 program is required for building QEMU"
>> +fi
>>
>> feature_not_found() {
>> feature=$1
>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
I don't feel too strongly about this, but how about a different improvement:
- keep the comment in this patch, but move it right before the "has
bzip2" check
- instead of "some firmware binaries", clearly state "edk2 blobs".
Something like:
+# Edk2 blobs are compressed with bzip2.
+if test "$edk2_blobs" = "yes" && ! has bzip2; then
+ error_exit "The bzip2 program is required for building QEMU"
+fi
So... now we have three variants: the one posted by Phil (v2), the one
recommended by Dan (as an update to v2), and the one I suggest above (as
a different update to v2). For simplicity, I'm fine with any one of the
three variants going in.
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Thanks!
Laszlo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/2] configure: Check bzip2 is available
2019-11-08 17:43 ` Laszlo Ersek
@ 2019-11-11 13:38 ` Thomas Huth
0 siblings, 0 replies; 13+ messages in thread
From: Thomas Huth @ 2019-11-11 13:38 UTC (permalink / raw)
To: Laszlo Ersek, Daniel P. Berrangé, Philippe Mathieu-Daudé
Cc: qemu-trivial, qemu-devel, Wainer dos Santos Moschetta
On 08/11/2019 18.43, Laszlo Ersek wrote:
> On 11/08/19 12:48, Daniel P. Berrangé wrote:
>> On Fri, Nov 08, 2019 at 12:45:31PM +0100, 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 <thuth@redhat.com>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>> ---
>>> v2: use better English (Daniel)
>>> (Not taking Daniel Reviewed-by because logic changed)
>>> ---
>>> configure | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>
>>> diff --git a/configure b/configure
>>> index 9b322284c3..2b419a8039 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -2147,6 +2147,7 @@ case " $target_list " in
>>> ;;
>>> esac
>>>
>>> +# Some firmware binaries are compressed with bzip2
>>
>> Squash into previous patch
>>
>>> for target in $target_list; do
>>> case "$target" in
>>> arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
>>> @@ -2154,6 +2155,9 @@ for target in $target_list; do
>>> ;;
>>> esac
>>> done
>>> +if test "$edk2_blobs" = "yes" && ! has bzip2; then
>>> + error_exit "The bzip2 program is required for building QEMU"
>>> +fi
>>>
>>> feature_not_found() {
>>> feature=$1
>>
>> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>
> I don't feel too strongly about this, but how about a different improvement:
>
> - keep the comment in this patch, but move it right before the "has
> bzip2" check
> - instead of "some firmware binaries", clearly state "edk2 blobs".
>
> Something like:
>
> +# Edk2 blobs are compressed with bzip2.
> +if test "$edk2_blobs" = "yes" && ! has bzip2; then
> + error_exit "The bzip2 program is required for building QEMU"
> +fi
>
> So... now we have three variants: the one posted by Phil (v2), the one
> recommended by Dan (as an update to v2), and the one I suggest above (as
> a different update to v2). For simplicity, I'm fine with any one of the
> three variants going in.
I'll add the two patches to my "qtest + misc" PULL request that I'm
planning to send out tomorrow - and use Laszlo's suggestion for moving
the comment. I hope that's fine for everybody, if not please complain.
Thomas
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2019-11-11 13:39 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 11:45 [PATCH v2 0/2] configure: Only decompress EDK2 blobs and check for bzip2 for X86/ARM Philippe Mathieu-Daudé
2019-11-08 11:45 ` [PATCH v2 1/2] configure: Only decompress EDK2 blobs for X86/ARM targets Philippe Mathieu-Daudé
2019-11-08 11:47 ` Daniel P. Berrangé
2019-11-08 11:49 ` Philippe Mathieu-Daudé
2019-11-08 13:32 ` Wainer dos Santos Moschetta
2019-11-08 14:02 ` Luc Michel
2019-11-08 17:38 ` Laszlo Ersek
2019-11-08 11:45 ` [PATCH v2 2/2] configure: Check bzip2 is available Philippe Mathieu-Daudé
2019-11-08 11:48 ` Daniel P. Berrangé
2019-11-08 13:33 ` Wainer dos Santos Moschetta
2019-11-08 17:43 ` Laszlo Ersek
2019-11-11 13:38 ` Thomas Huth
2019-11-08 14:04 ` Luc Michel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.