diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index 296efdd4892..5992a28cdd0 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -31,6 +31,12 @@ /* magic string to find in the binary image */ _used_ _section_(".sdmagic") static const char magic[] = "#### LoaderInfo: systemd-boot " GIT_VERSION " ####"; +/* Makes systemd-boot available from \EFI\Linux\ for testing purposes. */ +_used_ _section_(".osrel") static const char osrel[] = + "ID=systemd-boot\n" + "VERSION=\"" GIT_VERSION "\"\n" + "NAME=\"systemd-boot " GIT_VERSION "\"\n"; + enum loader_type { LOADER_UNDEFINED, LOADER_EFI, diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index 40b0ab0dbd8..cdf31c7fd85 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -323,14 +323,15 @@ if have_gnu_efi input : so, output : tuple[1], command : [objcopy, - '-j', '.text', - '-j', '.sdata', - '-j', '.sbat', - '-j', '.sdmagic', '-j', '.data', '-j', '.dynamic', '-j', '.dynsym', + '-j', '.osrel', '-j', '.rel*', + '-j', '.sbat', + '-j', '.sdata', + '-j', '.sdmagic', + '-j', '.text', efi_format, '@INPUT@', '@OUTPUT@'], install : true,