diff mbox series

[RFC,09/13] blobs: Only install firmware blobs if riscv system targets are built

Message ID 20210323155132.238193-10-f4bug@amsat.org (mailing list archive)
State New, archived
Headers show
Series blobs: Only install required (system emulation) files | expand

Commit Message

Philippe Mathieu-Daudé March 23, 2021, 3:51 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Cc: Sagar Karandikar <sagark@eecs.berkeley.edu>
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Cc: qemu-riscv@nongnu.org
---
 meson.build         |  2 ++
 pc-bios/meson.build | 13 +++++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

Comments

Alistair Francis March 23, 2021, 9:28 p.m. UTC | #1
On Tue, Mar 23, 2021 at 12:41 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Alistair Francis <Alistair.Francis@wdc.com>
> Cc: Sagar Karandikar <sagark@eecs.berkeley.edu>
> Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
> Cc: qemu-riscv@nongnu.org
> ---
>  meson.build         |  2 ++
>  pc-bios/meson.build | 13 +++++++++----
>  2 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 6f5561c2212..4b614b30ed9 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -98,6 +98,7 @@
>  install_blobs_hppa = false
>  install_blobs_microblaze = false
>  install_blobs_ppc = false
> +install_blobs_riscv = false
>  if get_option('install_blobs')
>    foreach target : target_dirs
>      install_edk2_blobs = install_edk2_blobs or target in edk2_targets
> @@ -106,6 +107,7 @@
>      install_blobs_hppa = install_blobs_hppa or target in ['hppa-softmmu']
>      install_blobs_microblaze = install_blobs_microblaze or target in ['microblaze-softmmu', 'microblazeel-softmmu']
>      install_blobs_ppc = install_blobs_ppc or (target.startswith('ppc') and target.endswith('softmmu'))
> +    install_blobs_riscv = install_blobs_riscv or target in ['riscv32-softmmu', 'riscv64-softmmu']
>    endforeach
>  endif
>
> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> index 73d02a57628..504f03ec925 100644
> --- a/pc-bios/meson.build
> +++ b/pc-bios/meson.build
> @@ -66,10 +66,6 @@
>    'pvh.bin',
>    's390-ccw.img',
>    's390-netboot.img',
> -  'opensbi-riscv32-generic-fw_dynamic.bin',
> -  'opensbi-riscv64-generic-fw_dynamic.bin',
> -  'opensbi-riscv32-generic-fw_dynamic.elf',
> -  'opensbi-riscv64-generic-fw_dynamic.elf',
>  ))
>
>  if host_machine.system() == 'windows'
> @@ -116,6 +112,15 @@
>    ))
>  endif
>
> +if install_blobs_riscv
> +  blobs_ss.add(files(
> +    'opensbi-riscv32-generic-fw_dynamic.bin',
> +    'opensbi-riscv64-generic-fw_dynamic.bin',
> +    'opensbi-riscv32-generic-fw_dynamic.elf',
> +    'opensbi-riscv64-generic-fw_dynamic.elf',
> +  ))
> +endif
> +
>  blobs_ss = blobs_ss.apply(config_host, strict: false)
>
>  if get_option('install_blobs')
> --
> 2.26.2
>
>
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index 6f5561c2212..4b614b30ed9 100644
--- a/meson.build
+++ b/meson.build
@@ -98,6 +98,7 @@ 
 install_blobs_hppa = false
 install_blobs_microblaze = false
 install_blobs_ppc = false
+install_blobs_riscv = false
 if get_option('install_blobs')
   foreach target : target_dirs
     install_edk2_blobs = install_edk2_blobs or target in edk2_targets
@@ -106,6 +107,7 @@ 
     install_blobs_hppa = install_blobs_hppa or target in ['hppa-softmmu']
     install_blobs_microblaze = install_blobs_microblaze or target in ['microblaze-softmmu', 'microblazeel-softmmu']
     install_blobs_ppc = install_blobs_ppc or (target.startswith('ppc') and target.endswith('softmmu'))
+    install_blobs_riscv = install_blobs_riscv or target in ['riscv32-softmmu', 'riscv64-softmmu']
   endforeach
 endif
 
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index 73d02a57628..504f03ec925 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -66,10 +66,6 @@ 
   'pvh.bin',
   's390-ccw.img',
   's390-netboot.img',
-  'opensbi-riscv32-generic-fw_dynamic.bin',
-  'opensbi-riscv64-generic-fw_dynamic.bin',
-  'opensbi-riscv32-generic-fw_dynamic.elf',
-  'opensbi-riscv64-generic-fw_dynamic.elf',
 ))
 
 if host_machine.system() == 'windows'
@@ -116,6 +112,15 @@ 
   ))
 endif
 
+if install_blobs_riscv
+  blobs_ss.add(files(
+    'opensbi-riscv32-generic-fw_dynamic.bin',
+    'opensbi-riscv64-generic-fw_dynamic.bin',
+    'opensbi-riscv32-generic-fw_dynamic.elf',
+    'opensbi-riscv64-generic-fw_dynamic.elf',
+  ))
+endif
+
 blobs_ss = blobs_ss.apply(config_host, strict: false)
 
 if get_option('install_blobs')