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.
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(
install : tuple[3],
install_dir : bootlibdir)
- stub = custom_target(
+ custom_target(
tuple[1],
input : so,
output : tuple[1],
'@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])
+++ /dev/null
-#!/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"