summaryrefslogtreecommitdiffstats
path: root/src/boot
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/boot/efi/boot.c6
-rw-r--r--src/boot/efi/cpio.c2
-rw-r--r--src/boot/efi/meson.build5
-rw-r--r--src/boot/efi/stub.c8
4 files changed, 13 insertions, 8 deletions
diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c
index 5c0f0ab..a3d5607 100644
--- a/src/boot/efi/boot.c
+++ b/src/boot/efi/boot.c
@@ -2250,9 +2250,9 @@ static EFI_STATUS initrd_prepare(
assert(ret_initrd_size);
if (entry->type != LOADER_LINUX || !entry->initrd) {
- ret_options = NULL;
- ret_initrd = NULL;
- ret_initrd_size = 0;
+ *ret_options = NULL;
+ *ret_initrd = NULL;
+ *ret_initrd_size = 0;
return EFI_SUCCESS;
}
diff --git a/src/boot/efi/cpio.c b/src/boot/efi/cpio.c
index 5b90e17..c4f803c 100644
--- a/src/boot/efi/cpio.c
+++ b/src/boot/efi/cpio.c
@@ -65,7 +65,7 @@ static EFI_STATUS pack_cpio_one(
char *a;
assert(fname);
- assert(contents_size || contents_size == 0);
+ assert(contents || contents_size == 0);
assert(target_dir_prefix);
assert(inode_counter);
assert(cpio_buffer);
diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
index c95132e..43727ef 100644
--- a/src/boot/efi/meson.build
+++ b/src/boot/efi/meson.build
@@ -404,6 +404,11 @@ foreach efi_elf_binary : efi_elf_binaries
if name == 'addon@0@.efi.stub'.format(efi_arch)
efi_addon = exe.full_path()
endif
+
+ test('check-alignment-@0@'.format(name),
+ check_efi_alignment_py,
+ args : exe.full_path(),
+ suite : 'efi')
endforeach
alias_target('systemd-boot', boot_targets)
diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c
index 7ef3e76..0d9df7e 100644
--- a/src/boot/efi/stub.c
+++ b/src/boot/efi/stub.c
@@ -540,6 +540,10 @@ static EFI_STATUS run(EFI_HANDLE image) {
CLEANUP_ARRAY(dt_filenames_addons_global, n_dts_addons_global, dt_filenames_free);
CLEANUP_ARRAY(dt_filenames_addons_uki, n_dts_addons_uki, dt_filenames_free);
+ if (szs[UNIFIED_SECTION_UNAME] > 0)
+ uname = xstrndup8((char *)loaded_image->ImageBase + addrs[UNIFIED_SECTION_UNAME],
+ szs[UNIFIED_SECTION_UNAME]);
+
/* Now that we have the UKI sections loaded, also load global first and then local (per-UKI)
* addons. The data is loaded at once, and then used later. */
err = load_addons(
@@ -614,10 +618,6 @@ static EFI_STATUS run(EFI_HANDLE image) {
/* Show splash screen as early as possible */
graphics_splash((const uint8_t*) loaded_image->ImageBase + addrs[UNIFIED_SECTION_SPLASH], szs[UNIFIED_SECTION_SPLASH]);
- if (szs[UNIFIED_SECTION_UNAME] > 0)
- uname = xstrndup8((char *)loaded_image->ImageBase + addrs[UNIFIED_SECTION_UNAME],
- szs[UNIFIED_SECTION_UNAME]);
-
if (use_load_options(image, loaded_image, szs[UNIFIED_SECTION_CMDLINE] > 0, &cmdline)) {
/* Let's measure the passed kernel command line into the TPM. Note that this possibly
* duplicates what we already did in the boot menu, if that was already used. However, since