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

RISC-V objcopy + variable fixes + ARM32 split header #106

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

gmbr3
Copy link
Contributor

@gmbr3 gmbr3 commented Sep 26, 2024

No description provided.

I finally figured out how to best achieve this without breaking GNU ld

* Force code to be at known dest of 4096
* Move _start into .text
* Load the _start symbol address and then minus 4096 to get the load address

This should make the binary more PE32 compatible

Change in ncroxon/gnu-efi#45

Signed-off-by: Callum Farmer <[email protected]>
* Prefer what was given in the default meson options instead of the arbitrary /usr/lib

Signed-off-by: Callum Farmer <[email protected]>
* Add system lds file so we can add the SBAT and SBOM sections
* RISC-V requires objcopy 2.42

Change made in ncroxon/gnu-efi@353984b

Signed-off-by: Callum Farmer <[email protected]>
* Remove the arbitrary /usr/include/efi

Signed-off-by: Callum Farmer <[email protected]>
@gmbr3 gmbr3 force-pushed the gnu-efi-4_0 branch 3 times, most recently from 36dafbc to 0e6c675 Compare September 26, 2024 15:49
Meson defaults to /usr/local
Set prefix to /usr
Set efi-libdir to /usr/lib on Fedora (until GNU-EFI 4.0 hits)

Signed-off-by: Callum Farmer <[email protected]>
Temporary fix until GNU-EFI 4.0 fixes variable setting

Signed-off-by: Callum Farmer <[email protected]>
@hughsie
Copy link
Member

hughsie commented Sep 27, 2024

FWIW, I'd have no problem hard depending on GNU-EFI 4.0

@gmbr3
Copy link
Contributor Author

gmbr3 commented Sep 28, 2024

FWIW, I'd have no problem hard depending on GNU-EFI 4.0

That would allow us to remove the compat flag for CompareGuid but CI would still need fixes until everyone fixes packaging to have correct variables (me thinks I need to doc it in gnu-efi just in case). Switch to all pkgconfig variables to force this?? (it would be supported by 3.0.18+)

Weirdly, the libdir issue only occurs for me on openSUSE RISC-V likely to do with whatever gcc is returning as the platform directory

@superm1
Copy link
Member

superm1 commented Sep 28, 2024

Switch to all pkgconfig variables to force this?? (it would be supported by 3.0.18+)

I think it's a good idea too, but this PR will probably need to wait to merge until it's released and we'll have CI coverage against it.

@gmbr3
Copy link
Contributor Author

gmbr3 commented Sep 28, 2024

The new packaging info is included in ncroxon/gnu-efi#45
All info included applies to gnu-efi before 4.0 aswell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants