[systemd-devel] [EFI-Stub][ARM64] Cannot load unified-kernel.efi using systemd EFI stub

Venkata.Pyla at toshiba-tsip.com Venkata.Pyla at toshiba-tsip.com
Tue May 10 18:16:39 UTC 2022


Hi system-devl team,

Nice to meet you.

I am having trouble to boot the unified-kernel image when using systemd's EFI stub loader, I wanted to check in this community if I can get some help to fix this problem.

Here are steps I followed:
I am using Debian package versions while checking this.
Systemd:  251~rc1
Bintutils(objcopy): 2.38
Kernel versio: 5.10

I built the kernel image for arm64:
kernel_image_file= linux_src/arch/arm64/boot/Image

Created unified kernel image using objcopy as below 	
(on arm64 machine)
```	
objcopy \
	--add-section .osrel="${os_release_file}" --change-section-vma .osrel=0x20000 \
	--add-section .cmdline="${kernel_cmd_line_file}" --change-section-vma .cmdline=0x30000 \
	--add-section .linux="${kernel_image_file}" --change-section-vma .linux=0x2000000 \
	--add-section .initrd="${initrd_image_file}" --change-section-vma .initrd=0x3000000 \
	/usr/lib/systemd/boot/efi/linuxaa64.efi.stub unified-kernel.efi ```

I tried to boot this unified-kernel image in EFI Shell environment and got the below error ``` EFI shell> fs0:
FS0:\> unified-kernel.efi
call the kernel
EFI stub: Booting Linux Kernel...
EFI stub: Generating empty DTB
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path EFI stub: Exiting boot services and installing virtual address map...
```
Looks like the kernel image file (Image) is loaded and went through kernel EFI stub and then stuck, I didn’t any clue why this is stuck.

When I use uncompressed version of linux image (vmlinux) in objcopy, then it got the error much earlier probably at EFI stub loader ``` EFI shell> fs0:
FS0:\> unified-kernel.efi
Command Error Status: Load Error
```
Can anyone suggest me how can I solve this?

Thanks,
Venkata.



More information about the systemd-devel mailing list