This allows starting systemd-boot from \EFI\Linux for easier testing
and bisection without risking an unbootable system as the user does not
need to replace their working loader.
/* 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,
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,