[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/16] configure, meson: move symlinking of ROMs to meson
From: |
Paolo Bonzini |
Subject: |
[PATCH 05/16] configure, meson: move symlinking of ROMs to meson |
Date: |
Tue, 17 May 2022 11:26:05 +0200 |
This is useful because pc-bios/meson.build already has a list of all ROM
files, and thus does not need to use wildcards. The problems with
wildcards are mentioned above the definition of the LINKS variable,
but then the recommendation is disattended.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 15 ---------------
pc-bios/meson.build | 18 +++++++++++++-----
2 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/configure b/configure
index 4c8954feea..d87b110aa2 100755
--- a/configure
+++ b/configure
@@ -2115,21 +2115,6 @@ LINKS="$LINKS tests/avocado tests/data"
LINKS="$LINKS tests/qemu-iotests/check"
LINKS="$LINKS python"
LINKS="$LINKS contrib/plugins/Makefile "
-for bios_file in \
- $source_path/pc-bios/*.bin \
- $source_path/pc-bios/*.elf \
- $source_path/pc-bios/*.lid \
- $source_path/pc-bios/*.rom \
- $source_path/pc-bios/*.dtb \
- $source_path/pc-bios/*.img \
- $source_path/pc-bios/openbios-* \
- $source_path/pc-bios/u-boot.* \
- $source_path/pc-bios/palcode-* \
- $source_path/pc-bios/qemu_vga.ndrv
-
-do
- LINKS="$LINKS pc-bios/$(basename $bios_file)"
-done
for f in $LINKS ; do
if [ -e "$source_path/$f" ]; then
mkdir -p `dirname ./$f`
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index c86dedf7df..8ba81f5518 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -23,7 +23,7 @@ if unpack_edk2_blobs
endforeach
endif
-blobs = files(
+blobs = [
'bios.bin',
'bios-256k.bin',
'bios-microvm.bin',
@@ -83,11 +83,18 @@ blobs = files(
'npcm7xx_bootrom.bin',
'vof.bin',
'vof-nvram.bin',
-)
+]
-if get_option('install_blobs')
- install_data(blobs, install_dir: qemu_datadir)
-endif
+ln_s = [find_program('ln', required: true), '-sf']
+foreach f : blobs
+ roms += custom_target(f,
+ build_by_default: have_system,
+ output: f,
+ input: files('meson.build'), # dummy input
+ install: get_option('install_blobs'),
+ install_dir: qemu_datadir,
+ command: [ ln_s, meson.project_source_root() / 'pc-bios' / f,
'@OUTPUT@' ])
+endforeach
subdir('descriptors')
subdir('keymaps')
--
2.36.0
- [PATCH 00/16] Cross compilation of embedded firmware, Paolo Bonzini, 2022/05/17
- [PATCH 01/16] configure: do not define or use the CPP variable, Paolo Bonzini, 2022/05/17
- [PATCH 02/16] build: clean up ninja invocation, Paolo Bonzini, 2022/05/17
- [PATCH 03/16] build: add a more generic way to specify make->ninja dependencies, Paolo Bonzini, 2022/05/17
- [PATCH 04/16] build: do a full build before running TCG tests, Paolo Bonzini, 2022/05/17
- [PATCH 06/16] tests/tcg: correct target CPU for sparc32, Paolo Bonzini, 2022/05/17
- [PATCH 05/16] configure, meson: move symlinking of ROMs to meson,
Paolo Bonzini <=
- [PATCH 07/16] tests/tcg: merge configure.sh back into main configure script, Paolo Bonzini, 2022/05/17
- [PATCH 09/16] configure: handle host compiler in probe_target_compiler, Paolo Bonzini, 2022/05/17
- [PATCH 10/16] configure: introduce --cross-prefix-*=, Paolo Bonzini, 2022/05/17
- [PATCH 11/16] configure: include more binutils in tests/tcg makefile, Paolo Bonzini, 2022/05/17
- [PATCH 08/16] configure: add missing cross compiler fallbacks, Paolo Bonzini, 2022/05/17
- [PATCH 12/16] configure: move symlink configuration earlier, Paolo Bonzini, 2022/05/17
- [PATCH 14/16] configure: enable cross-compilation of optionrom, Paolo Bonzini, 2022/05/17