Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shim fails to boot on some (older) Aarch64 laptops #670

Open
lumag opened this issue Jul 22, 2024 · 0 comments · May be fixed by #673
Open

shim fails to boot on some (older) Aarch64 laptops #670

lumag opened this issue Jul 22, 2024 · 0 comments · May be fixed by #673

Comments

@lumag
Copy link

lumag commented Jul 22, 2024

The shim binaries are being built with relaxed file alignment
requirements. This makes some of UEFI implementations reject shim
binaries. For example Lenovo Miix 630 boots grubaa64.efi, but rejects
shimaa64.efi. Most likely this is because of the header differences.
Compare:

objdump -p shimaa64.efi:
...
BaseOfCode 000000000001e000
ImageBase 0000000000000000
SectionAlignment 00001000
FileAlignment 00000200
...

vs

objdump -p grubaa64.efi:
...
AddressOfEntryPoint 0000000000001000
BaseOfCode 0000000000001000
ImageBase 0000000000000000
SectionAlignment 00001000
FileAlignment 00001000
...

Reference for the alignment story:

lumag added a commit to lumag/shim that referenced this issue Jul 28, 2024
Although file alignment for EFI apps is not clear, most of the UEFI
accept defaulf file alignment (0x200). Nevertheless some of the UEFI
bootloaders require file alignment to be 0x1000 (e.g. Lenovo Miix 630,
Lenovo Yoga C630, etc). Increase file alignment to the desired value.

Fixes rhboot#670

Signed-off-by: Dmitry Baryshkov <[email protected]>
@lumag lumag linked a pull request Jul 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant