diff --git a/meson.build b/meson.build index a3548a0278..9faa6583a0 100644 --- a/meson.build +++ b/meson.build @@ -599,10 +599,8 @@ env = find_program('env') perl = find_program('perl', required : false) rsync = find_program('rsync', required : false) meson_make_symlink = project_source_root + '/tools/meson-make-symlink.sh' -test_efi_create_disk_sh = find_program('test/test-efi-create-disk.sh') mkdir_p = 'mkdir -p $DESTDIR/@0@' -splash_bmp = files('test/splash.bmp') # If -Dxxx-path option is found, use that. Otherwise, check in $PATH, # /usr/sbin, /sbin, and fall back to the default from middle column. diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index b6bf6af21b..20b0c4bf7c 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -401,7 +401,6 @@ systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(efi_arch[0]) stub_elf_name = 'linux@0@.elf.stub'.format(efi_arch[0]) stub_efi_name = 'linux@0@.efi.stub'.format(efi_arch[0]) -efi_stubs = [] foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects, false], [stub_elf_name, stub_efi_name, stub_objects, true]] so = custom_target( @@ -419,7 +418,7 @@ foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects install : tuple[3], install_dir : bootlibdir) - stub = custom_target( + custom_target( tuple[1], input : so, output : tuple[1], @@ -439,14 +438,4 @@ foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects '@INPUT@', '@OUTPUT@'], install : true, install_dir : bootlibdir) - - efi_stubs += [[so, stub]] endforeach - -############################################################ - -test_efi_disk_img = custom_target( - 'test-efi-disk.img', - input : [efi_stubs[0][0], efi_stubs[1][1]], - output : 'test-efi-disk.img', - command : [test_efi_create_disk_sh, '@OUTPUT@','@INPUT@', splash_bmp]) diff --git a/test/splash.bmp b/test/splash.bmp deleted file mode 100644 index 27247f7a22..0000000000 Binary files a/test/splash.bmp and /dev/null differ diff --git a/test/test-efi-create-disk.sh b/test/test-efi-create-disk.sh deleted file mode 100755 index 46062e46e7..0000000000 --- a/test/test-efi-create-disk.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: LGPL-2.1-or-later -set -eo pipefail - -out="${1:?}" -systemd_efi="${2:?}" -boot_stub="${3:?}" -splash_bmp="${4:?}" - -efi_dir="$(bootctl -p)" -entry_dir="${efi_dir}/$(cat /etc/machine-id)/$(uname -r)" - -# create GPT table with EFI System Partition -rm -f "$out" -dd if=/dev/null of="$out" bs=1M seek=512 count=1 status=none -parted --script "$out" "mklabel gpt" "mkpart ESP fat32 1MiB 511MiB" "set 1 boot on" - -# create FAT32 file system -LOOP="$(losetup --show -f -P "$out")" -mkfs.vfat -F32 "${LOOP}p1" -mkdir -p mnt -mount "${LOOP}p1" mnt - -mkdir -p mnt/EFI/{BOOT,systemd} -cp "$systemd_efi" mnt/EFI/BOOT/BOOTX64.efi - -if [ -e /boot/shellx64.efi ]; then - cp /boot/shellx64.efi mnt/ -fi - -mkdir mnt/EFI/Linux -echo -n "foo=yes bar=no root=/dev/fakeroot debug rd.break=initqueue" >mnt/cmdline.txt -objcopy \ - --add-section .osrel=/etc/os-release --change-section-vma .osrel=0x20000 \ - --add-section .cmdline=mnt/cmdline.txt --change-section-vma .cmdline=0x30000 \ - --add-section .splash="$splash_bmp" --change-section-vma .splash=0x40000 \ - --add-section .linux="${entry_dir}/linux" --change-section-vma .linux=0x2000000 \ - --add-section .initrd="${entry_dir}/initrd" --change-section-vma .initrd=0x3000000 \ - "$boot_stub" mnt/EFI/Linux/linux-test.efi - -# install entries -mkdir -p mnt/loader/entries -echo -e "timeout 3\n" > mnt/loader/loader.conf -echo -e "title Test\nefi /test\n" > mnt/loader/entries/test.conf -echo -e "title Test2\nlinux /test2\noptions option=yes word number=1000 more\n" > mnt/loader/entries/test2.conf -echo -e "title Test3\nlinux /test3\n" > mnt/loader/entries/test3.conf -echo -e "title Test4\nlinux /test4\n" > mnt/loader/entries/test4.conf -echo -e "title Test5\nefi /test5\n" > mnt/loader/entries/test5.conf -echo -e "title Test6\nlinux /test6\n" > mnt/loader/entries/test6.conf - -sync -umount mnt -rmdir mnt -losetup -d "$LOOP"