summaryrefslogtreecommitdiff
path: root/src/boot/efi
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/efi')
-rw-r--r--src/boot/efi/boot.c10
-rw-r--r--src/boot/efi/disk.c2
-rw-r--r--src/boot/efi/disk.h2
-rw-r--r--src/boot/efi/linux.c4
-rw-r--r--src/boot/efi/meson.build8
-rw-r--r--src/boot/efi/stub.c4
6 files changed, 14 insertions, 16 deletions
diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c
index 4719eeaf4b..9bf6895831 100644
--- a/src/boot/efi/boot.c
+++ b/src/boot/efi/boot.c
@@ -17,7 +17,7 @@
#endif
/* magic string to find in the binary image */
-static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-boot " PACKAGE_VERSION " ####";
+static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-boot " GIT_VERSION " ####";
static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE;
@@ -361,7 +361,7 @@ static VOID print_status(Config *config, CHAR16 *loaded_image_path) {
uefi_call_wrapper(ST->ConOut->SetAttribute, 2, ST->ConOut, EFI_LIGHTGRAY|EFI_BACKGROUND_BLACK);
uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut);
- Print(L"systemd-boot version: " PACKAGE_VERSION "\n");
+ Print(L"systemd-boot version: " GIT_VERSION "\n");
Print(L"architecture: " EFI_MACHINE_TYPE_NAME "\n");
Print(L"loaded image: %s\n", loaded_image_path);
Print(L"UEFI specification: %d.%02d\n", ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0xffff);
@@ -804,7 +804,7 @@ static BOOLEAN menu_run(
break;
case KEYPRESS(0, 0, 'v'):
- status = PoolPrint(L"systemd-boot " PACKAGE_VERSION " (" EFI_MACHINE_TYPE_NAME "), UEFI Specification %d.%02d, Vendor %s %d.%02d",
+ status = PoolPrint(L"systemd-boot " GIT_VERSION " (" EFI_MACHINE_TYPE_NAME "), UEFI Specification %d.%02d, Vendor %s %d.%02d",
ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0xffff,
ST->FirmwareVendor, ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0xffff);
break;
@@ -1000,7 +1000,7 @@ skip:
value++;
/* unquote */
- if (value[0] == '\"' && line[linelen-1] == '\"') {
+ if (value[0] == '"' && line[linelen-1] == '"') {
value++;
line[linelen-1] = '\0';
}
@@ -2097,7 +2097,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
InitializeLib(image, sys_table);
init_usec = time_usec();
efivar_set_time_usec(L"LoaderTimeInitUSec", init_usec);
- efivar_set(L"LoaderInfo", L"systemd-boot " PACKAGE_VERSION, FALSE);
+ efivar_set(L"LoaderInfo", L"systemd-boot " GIT_VERSION, FALSE);
infostr = PoolPrint(L"%s %d.%02d", ST->FirmwareVendor, ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0xffff);
efivar_set(L"LoaderFirmwareInfo", infostr, FALSE);
diff --git a/src/boot/efi/disk.c b/src/boot/efi/disk.c
index a31b7bb478..49ee81b4d7 100644
--- a/src/boot/efi/disk.c
+++ b/src/boot/efi/disk.c
@@ -5,7 +5,7 @@
#include "util.h"
-EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, CHAR16 uuid[37]) {
+EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, CHAR16 uuid[static 37]) {
EFI_DEVICE_PATH *device_path;
/* export the device path this image is started from */
diff --git a/src/boot/efi/disk.h b/src/boot/efi/disk.h
index 2a0b8ff2a7..41c4cce434 100644
--- a/src/boot/efi/disk.h
+++ b/src/boot/efi/disk.h
@@ -1,4 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
-EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, CHAR16 uuid[37]);
+EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, CHAR16 uuid[static 37]);
diff --git a/src/boot/efi/linux.c b/src/boot/efi/linux.c
index d1605523d8..5b4c085880 100644
--- a/src/boot/efi/linux.c
+++ b/src/boot/efi/linux.c
@@ -52,7 +52,7 @@ struct SetupHeader {
#ifdef __x86_64__
typedef VOID(*handover_f)(VOID *image, EFI_SYSTEM_TABLE *table, struct SetupHeader *setup);
-static inline VOID linux_efi_handover(EFI_HANDLE image, struct SetupHeader *setup) {
+static VOID linux_efi_handover(EFI_HANDLE image, struct SetupHeader *setup) {
handover_f handover;
asm volatile ("cli");
@@ -61,7 +61,7 @@ static inline VOID linux_efi_handover(EFI_HANDLE image, struct SetupHeader *setu
}
#else
typedef VOID(*handover_f)(VOID *image, EFI_SYSTEM_TABLE *table, struct SetupHeader *setup) __attribute__((regparm(0)));
-static inline VOID linux_efi_handover(EFI_HANDLE image, struct SetupHeader *setup) {
+static VOID linux_efi_handover(EFI_HANDLE image, struct SetupHeader *setup) {
handover_f handover;
handover = (handover_f)((UINTN)setup->code32_start + setup->handover_offset);
diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
index aa897c62a1..2140151844 100644
--- a/src/boot/efi/meson.build
+++ b/src/boot/efi/meson.build
@@ -78,7 +78,6 @@ endif
if have_gnu_efi
efi_conf = configuration_data()
- efi_conf.set_quoted('PACKAGE_VERSION', meson.project_version())
efi_conf.set_quoted('EFI_MACHINE_TYPE_NAME', EFI_MACHINE_TYPE_NAME)
efi_conf.set10('ENABLE_TPM', get_option('tpm'))
efi_conf.set('SD_TPM_PCR', get_option('tpm-pcrindex'))
@@ -117,7 +116,8 @@ if have_gnu_efi
'-Wno-missing-field-initializers',
'-isystem', efi_incdir,
'-isystem', join_paths(efi_incdir, gnu_efi_path_arch),
- '-include', efi_config_h]
+ '-include', efi_config_h,
+ '-include', version_h]
if efi_arch == 'x86_64'
compile_args += ['-mno-red-zone',
'-mno-sse',
@@ -194,9 +194,7 @@ if have_gnu_efi
'-j', '.data',
'-j', '.dynamic',
'-j', '.dynsym',
- '-j', '.rel',
- '-j', '.rela',
- '-j', '.reloc']
+ '-j', '.rel*']
+ efi_format +
['@INPUT@', '@OUTPUT@'],
install : true,
diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c
index d11e555748..6b07879971 100644
--- a/src/boot/efi/stub.c
+++ b/src/boot/efi/stub.c
@@ -12,7 +12,7 @@
#include "util.h"
/* magic string to find in the binary image */
-static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-stub " PACKAGE_VERSION " ####";
+static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-stub " GIT_VERSION " ####";
static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE;
@@ -117,7 +117,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
/* add StubInfo */
if (efivar_get_raw(&global_guid, L"StubInfo", &b, &size) != EFI_SUCCESS)
- efivar_set(L"StubInfo", L"systemd-stub " PACKAGE_VERSION, FALSE);
+ efivar_set(L"StubInfo", L"systemd-stub " GIT_VERSION, FALSE);
if (szs[3] > 0)
graphics_splash((UINT8 *)((UINTN)loaded_image->ImageBase + addrs[3]), szs[3], NULL);