Message ID | 20210323155132.238193-5-f4bug@amsat.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | blobs: Only install required (system emulation) files | expand |
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') >
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'] 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')
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(-)