diff mbox series

[v2,1/2] configure: Only decompress EDK2 blobs for X86/ARM targets

Message ID 20191108114531.21518-2-philmd@redhat.com (mailing list archive)
State New, archived
Headers show
Series configure: Only decompress EDK2 blobs and check for bzip2 for X86/ARM | expand

Commit Message

Philippe Mathieu-Daudé Nov. 8, 2019, 11:45 a.m. UTC
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(+)

Comments

Daniel P. Berrangé Nov. 8, 2019, 11:47 a.m. UTC | #1
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
Philippe Mathieu-Daudé Nov. 8, 2019, 11:49 a.m. UTC | #2
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
>
Wainer dos Santos Moschetta Nov. 8, 2019, 1:32 p.m. UTC | #3
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
Luc Michel Nov. 8, 2019, 2:02 p.m. UTC | #4
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>
Laszlo Ersek Nov. 8, 2019, 5:38 p.m. UTC | #5
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
diff mbox series

Patch

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