All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org, richard.henderson@linaro.org
Subject: [RFC PATCH 06/12] configure, meson: move symlinking of ROMs to meson
Date: Fri, 29 Apr 2022 16:18:07 +0200	[thread overview]
Message-ID: <20220429141813.328975-7-pbonzini@redhat.com> (raw)
In-Reply-To: <20220429141813.328975-1-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.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure              | 15 ---------------
 pc-bios/meson.build    | 18 +++++++++++++-----
 tests/Makefile.include |  2 +-
 3 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/configure b/configure
index 8626989239..bdb0cc35a8 100755
--- a/configure
+++ b/configure
@@ -2449,21 +2449,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,19 @@ 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
+alias_target('emulator-firmware', roms)
 
 subdir('descriptors')
 subdir('keymaps')
diff --git a/tests/Makefile.include b/tests/Makefile.include
index bef96a775c..1fe7c8cd09 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -56,7 +56,7 @@ $(TCG_TESTS_TARGETS:%=build-tcg-tests-%): build-tcg-tests-%: $(BUILD_DIR)/tests/
         "BUILD","$* guest-tests")
 
 .PHONY: $(TCG_TESTS_TARGETS:%=run-tcg-tests-%)
-$(TCG_TESTS_TARGETS:%=run-tcg-tests-%): run-tcg-tests-%: build-tcg-tests-% $(if $(CONFIG_PLUGIN),test-plugins)
+$(TCG_TESTS_TARGETS:%=run-tcg-tests-%): run-tcg-tests-%: build-tcg-tests-% $(if $(CONFIG_PLUGIN),test-plugins) emulator-firmware
 	$(call quiet-command, \
            $(MAKE) -C tests/tcg/$* -f ../Makefile.target $(SUBDIR_MAKEFLAGS) \
                         TARGET="$*" SRC_PATH="$(SRC_PATH)" SPEED=$(SPEED) run, \
-- 
2.35.1




  parent reply	other threads:[~2022-04-29 14:22 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 14:18 [RFC PATCH 00/12] Cross compilation of embedded firmware Paolo Bonzini
2022-04-29 14:18 ` [RFC PATCH 01/12] tests/tcg: merge configure.sh back into main configure script Paolo Bonzini
2022-04-29 14:18 ` [RFC PATCH 02/12] configure: add missing cross compiler fallbacks Paolo Bonzini
2022-04-30 19:35   ` Richard Henderson
2022-04-29 14:18 ` [RFC PATCH 03/12] configure: handle host compiler in probe_target_compiler Paolo Bonzini
2022-04-29 14:18 ` [RFC PATCH 04/12] configure: introduce --cross-prefix-*= Paolo Bonzini
2022-04-30 19:42   ` Richard Henderson
2022-04-29 14:18 ` [RFC PATCH 05/12] configure: include more binutils in tests/tcg makefile Paolo Bonzini
2022-04-30 19:44   ` Richard Henderson
2022-04-29 14:18 ` Paolo Bonzini [this message]
2022-04-30 19:48   ` [RFC PATCH 06/12] configure, meson: move symlinking of ROMs to meson Richard Henderson
2022-04-29 14:18 ` [RFC PATCH 07/12] configure: move symlink configuration earlier Paolo Bonzini
2022-04-30 19:49   ` Richard Henderson
2022-04-29 14:18 ` [RFC PATCH 08/12] configure: enable cross-compilation of s390-ccw Paolo Bonzini
2022-04-30 19:55   ` Richard Henderson
2022-04-29 14:18 ` [RFC PATCH 09/12] pc-bios/optionrom: detect -fno-pie Paolo Bonzini
2022-04-30 19:56   ` Richard Henderson
2022-04-29 14:18 ` [RFC PATCH 10/12] pc-bios/optionrom: compile with -Wno-array-bounds Paolo Bonzini
2022-04-30 19:58   ` Richard Henderson
2022-05-02  7:37   ` Michael Tokarev
2022-05-02 10:01     ` Paolo Bonzini
2022-04-29 14:18 ` [RFC PATCH 11/12] configure: enable cross-compilation of optionrom Paolo Bonzini
2022-04-30 20:01   ` Richard Henderson
2022-04-29 14:18 ` [RFC PATCH 12/12] configure: enable cross compilation of vof Paolo Bonzini
2022-04-30 20:06   ` Richard Henderson

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=20220429141813.328975-7-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.