-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fedora/RHEL Sauce doesn't work on the Surface Pro X #1
Comments
I dont know a lot about GRUB and even less about SPX / ARM, but random thought: The first commit you linked changes the I digged around a bit and found this, which might be related? torvalds/linux@5b94046 The version numbers seem to line up with the 5.13 kernel that seems to be the most current one for the SPX. |
Yeah, haven't looked into it in detail yet but I gathered that it replaces the default Linux image loading mechanism with some custom loader from the commit message. Thanks for that pointer! Looks like that could indeed be the cause of this issue. I definitely need to test this. |
So cherry picking that commit onto my v5.13 branch didn't work. I should probably finally update the patches to v5.17 already... Before that I'll probably set up a build for a known good GRUB image so that we have something (more or less) reliable to start with. |
I've set up an automated build system at https://github.com/linux-surface/grub-image-aarch64. See releases/packages and README for details. |
Turns out memory for the kernel code pages is allocated as "data" and not "code", and the SPX seems to be pretty much the only aarch64 device that cares about that... Fixed with 55b95a3, and I've opened up a PR in rhboot/grub2. |
The Surface Pro X seems to be a bit picky about GRUB modifications.
What works
Upstream
grub-2.06
works using the following procedure to cross-compile from a non-ARM host:./bootstrap ./configure --with-platform=efi --target=aarch64-linux-gnu make make DESTDIR="${PWD}../grub-install install"
This creates modules for
aarch64
as well as host-tools that will run on the current host architecture (e.g.x86_64
). Those can then be used to generate a self-containedbootaa64.efi
image as follows (from../grub-install
directory):using
grubmodules.txt
from https://github.com/SMFloris/acer-spin7-linux/blob/main/grub/grubmodules.txt. I've tested this both on an Arch Linux host and a Fedora 35 container usingaarch64-linux-gnu-gcc
(orgcc-aarch64-linux-gnu
on Fedora).What doesn't
The same procedure using
fedora-36
(or any other Fedora branch that I've tested). Failures start with include and other errors during compilation compilation, which can be fixed by changing the configure command toSimilarly, using the precompiled
aarch64
modules from either Fedora OpenSuse (similar to https://github.com/SMFloris/acer-spin7-linux) doesn't work. I assume OpenSuse uses the same Fedora/RHEL patches.Unfortunately,
git bisect
is pretty much impossible on the Fedora/RHEL patches as about 90% of them seem to introduce some new build failure. I've narrowed the problem down to the following four commits (applied on top ofgrub-2.06
):The text was updated successfully, but these errors were encountered: