[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 16/33] configure, meson: move symlinking of ROMs to meson
From: |
Alex Bennée |
Subject: |
[PATCH v1 16/33] configure, meson: move symlinking of ROMs to meson |
Date: |
Fri, 27 May 2022 16:35:46 +0100 |
From: Paolo Bonzini <pbonzini@redhat.com>
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>
Message-Id: <20220517092616.1272238-6-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
configure | 15 ---------------
pc-bios/meson.build | 17 ++++++++++++-----
2 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/configure b/configure
index 7a071c161a..2138f61e54 100755
--- a/configure
+++ b/configure
@@ -2097,21 +2097,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..41ba1c0ec7 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.30.2
- Re: [PATCH v1 23/33] configure: move symlink configuration earlier, (continued)
- [PATCH v1 25/33] configure: enable cross-compilation of optionrom, Alex Bennée, 2022/05/27
- [PATCH v1 13/33] build: clean up ninja invocation, Alex Bennée, 2022/05/27
- [PATCH v1 11/33] tests/docker: update debian-amd64 with lcitool, Alex Bennée, 2022/05/27
- [PATCH v1 33/33] docs/devel: clean-up the CI links in the docs, Alex Bennée, 2022/05/27
- [PATCH v1 24/33] configure: enable cross-compilation of s390-ccw, Alex Bennée, 2022/05/27
- [PATCH v1 16/33] configure, meson: move symlinking of ROMs to meson,
Alex Bennée <=
- [PATCH v1 28/33] gitlab: introduce a common base job template, Alex Bennée, 2022/05/27
- [PATCH v1 22/33] configure: include more binutils in tests/tcg makefile, Alex Bennée, 2022/05/27
- [PATCH v1 32/33] gitlab: don't run CI jobs in forks by default, Alex Bennée, 2022/05/27
- [PATCH v1 30/33] gitlab: convert static checks to .base_job_template, Alex Bennée, 2022/05/27
- [PATCH v1 31/33] gitlab: convert build/container jobs to .base_job_template, Alex Bennée, 2022/05/27