X Tutup
Skip to content

Commit b6167d9

Browse files
committed
meson: Use same name format for efi binary intermediates
1 parent b2ba851 commit b6167d9

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

src/boot/efi/meson.build

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -397,16 +397,12 @@ foreach file : fundamental_source_paths + common_sources + systemd_boot_sources
397397
endif
398398
endforeach
399399

400-
systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(efi_arch[0])
401-
stub_elf_name = 'linux@0@.elf.stub'.format(efi_arch[0])
402-
stub_efi_name = 'linux@0@.efi.stub'.format(efi_arch[0])
403-
404-
foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects, false],
405-
[stub_elf_name, stub_efi_name, stub_objects, true]]
406-
so = custom_target(
407-
tuple[0],
408-
input : tuple[2],
409-
output : tuple[0],
400+
foreach tuple : [['systemd-boot@0@.@1@', systemd_boot_objects, false],
401+
['linux@0@.@1@.stub', stub_objects, true]]
402+
elf = custom_target(
403+
tuple[0].format(efi_arch[0], 'elf'),
404+
input : tuple[1],
405+
output : tuple[0].format(efi_arch[0], 'elf'),
410406
command : [cc.cmd_array(),
411407
'-o', '@OUTPUT@',
412408
efi_cflags,
@@ -415,13 +411,13 @@ foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects
415411
'-lefi',
416412
'-lgnuefi',
417413
'-lgcc'],
418-
install : tuple[3],
414+
install : tuple[2],
419415
install_dir : bootlibdir)
420416

421417
custom_target(
422-
tuple[1],
423-
input : so,
424-
output : tuple[1],
418+
tuple[0].format(efi_arch[0], 'efi'),
419+
input : elf,
420+
output : tuple[0].format(efi_arch[0], 'efi'),
425421
command : [objcopy,
426422
'-j', '.bss*',
427423
'-j', '.data',

tools/debug-sd-boot.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ fi
3232
binary=$(realpath "${1}")
3333
if [[ "${1}" =~ systemd-boot([[:alnum:]]+).efi ]]; then
3434
target="systemd-boot"
35-
symbols=$(realpath "$(dirname "${1}")/systemd_boot.so")
35+
symbols=$(realpath "${1%efi}elf")
3636
elif [[ "${1}" =~ linux([[:alnum:]]+).efi.stub ]]; then
3737
target="systemd-stub"
38-
symbols=$(realpath "$(dirname "${1}")/linux${BASH_REMATCH[1]}.elf.stub")
38+
symbols=$(realpath "${1%efi.stub}elf.stub")
3939
else
4040
echo "Cannot detect EFI binary '${1}'."
4141
exit 1

0 commit comments

Comments
 (0)
X Tutup