qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [RFC PATCH 04/13] blobs: Only install PALcode blob if alpha system target is built
Date: Tue, 23 Mar 2021 17:29:15 +0100	[thread overview]
Message-ID: <03ca4200-2f64-37a8-f3d3-6df86074326a@redhat.com> (raw)
In-Reply-To: <20210323155132.238193-5-f4bug@amsat.org>

On 23/03/21 16:51, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> Cc: Richard Henderson <richard.henderson@linaro.org>
> ---
>   meson.build         | 2 ++
>   pc-bios/meson.build | 7 ++++++-
>   2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index 5c85a15364d..b5b8892fe7a 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -93,9 +93,11 @@
>   
>   edk2_targets = [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_64-softmmu' ]
>   install_edk2_blobs = false
> +install_blobs_alpha = false
>   if get_option('install_blobs')
>     foreach target : target_dirs
>       install_edk2_blobs = install_edk2_blobs or target in edk2_targets
> +    install_blobs_alpha = install_blobs_alpha or target in ['alpha-softmmu']
What if you had something like

blob_targets = {
   ...,
   'palcode-clipper': ['alpha-softmmu'],
   'npcm7xx_bootrom.bin': ['arm-softmmu', 'aarch64-softmmu'],
   ...
}

and then

if get_option('install_blobs')
   foreach file, targets: blob_targets
     if file.endswith('.bz2') and not install_edk2_blobs
       continue
     endif
     foreach target : targets
       if (target in target_dirs)
         if file.endswith('.bz2')
           custom_target(...)
         elif install_edk2_blobs
           install_data(file, install_dir: qemu_datadir)
         endif
         break
       endif
     endforeach
   endforeach
endif

This simplifies the per-arch patches noticeably, since they only have to 
add a single line.

Paolo

>     endforeach
>   endif
>   
> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> index 007cf9d2afb..29085912d7d 100644
> --- a/pc-bios/meson.build
> +++ b/pc-bios/meson.build
> @@ -73,7 +73,6 @@
>     's390-netboot.img',
>     'slof.bin',
>     'skiboot.lid',
> -  'palcode-clipper',
>     'u-boot.e500',
>     'u-boot-sam460-20100605.bin',
>     'qemu_vga.ndrv',
> @@ -91,6 +90,12 @@
>     ))
>   endif
>   
> +if install_blobs_alpha
> +  blobs_ss.add(files(
> +    'palcode-clipper',
> +  ))
> +endif
> +
>   blobs_ss = blobs_ss.apply(config_host, strict: false)
>   
>   if get_option('install_blobs')
> 



  reply	other threads:[~2021-03-23 17:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
2021-03-23 15:51 ` [RFC PATCH 01/13] blobs: Use Meson source_set to store blob files Philippe Mathieu-Daudé
2021-03-23 16:22   ` Paolo Bonzini
2021-03-23 15:51 ` [RFC PATCH 02/13] blobs: Only install EDK2 license file if EDK2 blobs are installed Philippe Mathieu-Daudé
2021-03-23 16:15   ` Laszlo Ersek
2021-03-23 15:51 ` [RFC PATCH 03/13] blobs: Only install qemu-nsis.bmp on Windows host Philippe Mathieu-Daudé
2021-03-23 15:57   ` Stefan Weil
2021-03-23 15:51 ` [RFC PATCH 04/13] blobs: Only install PALcode blob if alpha system target is built Philippe Mathieu-Daudé
2021-03-23 16:29   ` Paolo Bonzini [this message]
2021-03-23 15:51 ` [RFC PATCH 05/13] blobs: Only install npcm7xx bootrom if ARM system targets are built Philippe Mathieu-Daudé
2021-03-23 16:29   ` Paolo Bonzini
2021-03-23 15:51 ` [RFC PATCH 06/13] blobs: Only install PA-RISC SeaBIOS if hppa system target is built Philippe Mathieu-Daudé
2021-03-23 23:09   ` Helge Deller
2021-03-23 15:51 ` [RFC PATCH 07/13] blobs: Only install DT blobs if microblaze system targets are built Philippe Mathieu-Daudé
2021-03-23 15:51 ` [RFC PATCH 08/13] blobs: Only install blobs if powerpc " Philippe Mathieu-Daudé
2021-03-23 23:09   ` David Gibson
2021-03-23 15:51 ` [RFC PATCH 09/13] blobs: Only install firmware blobs if riscv " Philippe Mathieu-Daudé
2021-03-23 21:28   ` Alistair Francis
2021-03-23 15:51 ` [RFC PATCH 10/13] blobs: Only install s390x firmwares if s390x system target is built Philippe Mathieu-Daudé
2021-03-24  5:52   ` Thomas Huth
2021-03-30 16:47   ` Cornelia Huck
2021-03-23 15:51 ` [RFC PATCH 11/13] blobs: Only install SPARC firmwares if sparc system targets are built Philippe Mathieu-Daudé
2021-03-23 15:51 ` [RFC PATCH 12/13] blobs: Only install x86 blobs if x86 " Philippe Mathieu-Daudé
2021-03-23 15:51 ` [RFC PATCH 13/13] meson: Only build ROM/BIOS when system emulation is built Philippe Mathieu-Daudé
2021-03-23 16:15   ` Thomas Huth

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=03ca4200-2f64-37a8-f3d3-6df86074326a@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).