@@ -2100,21 +2100,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`
@@ -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')