Hello Ard,
In patch 'efi/libstub: arm64: Double check image alignment at entry'
(c32ac11da3f83bb42b986702a9b92f0a14ed4182) you added the following check:
if (!IS_ALIGNED((u64)_text, EFI_KIMG_ALIGN))
efi_err("FIRMWARE BUG: kernel image not aligned on %ldk boundary\n", +
EFI_KIMG_ALIGN >> 10);
Unfortunatelly the kernel is aligned at SEGMENT_SIZE and this is the size
populated in the PE headers:
arch/arm64/kernel/efi-header.S: .long SEGMENT_ALIGN
// SectionAlignment
EFI_KIMG_ALIGN is defined as: (SEGMENT_ALIGN > THREAD_ALIGN ? SEGMENT_ALIGN
: THREAD_ALIGN)
So it depends on THREAD_ALIGN. On newer builds these message started to
appear even though the loader (Grub) is taking into account the PE header
(which is stating 64K).
Did you want to also modify the alignment in the headers/linkers or may be
check against SEGMENT_ALIGN?
Thank you,
Mihai