-
Notifications
You must be signed in to change notification settings - Fork 325
WIP: Add riscv64 support #778
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
Draft
andreabolognani
wants to merge
14
commits into
rhboot:main
Choose a base branch
from
andreabolognani:riscv64
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replace the shim-specific fork with the upstream version, specifically the most recent release. Some adjustment to shim's code are necessary to adapt to this change. Signed-off-by: Andrea Bolognani <abologna@redhat.com>
shim is a standalone EFI application so it shouldn't be necessary to look at the glibc headers when building it, and in fact attempting to do so results in a build failure. Signed-off-by: Andrea Bolognani <abologna@redhat.com>
We could theoretically set GNU_EFI_USE_REALLOCATEPOOL_ABI=0 to keep using the legacy ABI, but since gnu-efi uses the modern ABI internally and we call into its build systemd directly, doing that messes things up. Switching to the new ABI is just a matter of changing the order of arguments. Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Jason Montleon <jason@montleon.com>
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Upstream gnu-efi doesn't implement the AsciiSPrint() function. Drop its only user. This reverts commit 77a2922 Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Add what is needed to build on riscv64. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> This is an update to rhboot#420 which brings it in alignment with the current upstream. Signed-off-by: Brian 'redbeard' Harrington <redbeard@dead-city.org> (cherry picked from commit 5031a99)
@davidlt and @xypron pointed out prior changed to binutils 2.42 which added support for RISC-V EFI objects. This reflects the upstream preference to avoid adding additional architectures which are emitting flat binary files via `objcopy` (i.e. `-O binary` architectures). (cherry picked from commit 9f9813b)
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
Signed-off-by: Jason Montleon <jason@montleon.com>
Tagging @xypron, @brianredbeard and @jmontleon since some of the changes come from them. |
This was referenced Sep 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is part of an attempt to bring riscv64 support into shim.
See #420 and #641 for previous discussion, as well as #777 which is a prerequisite of this PR.
Using this branch I was able to successfully build shim on both x86_64 and riscv64, and I was able to use the resulting binaries to boot Fedora 42 cloud images for both architectures, replacing the stock ones.