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

zefi.py assumes host GCC is x86 #27047

Closed
galak opened this issue Jul 22, 2020 · 5 comments · Fixed by #31434 or #31595
Closed

zefi.py assumes host GCC is x86 #27047

galak opened this issue Jul 22, 2020 · 5 comments · Fixed by #31434 or #31595
Assignees
Labels
area: X86 x86 Architecture (32-bit) bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@galak
Copy link
Collaborator

galak commented Jul 22, 2020

zefi.py will fail if this assumption isn't meet. Which may be the case on either an arm64 host environment or on something like MacOS X.

Is it possible to use the x86 cross compiler that build zephyr here?

@galak galak added the bug The issue is a bug, or the PR is fixing a bug label Jul 22, 2020
@galak galak changed the title zefi.py assumes host GCC is x86 zefi.py assumes host GCC is not x86 Jul 22, 2020
@jhedberg
Copy link
Member

AFAIK the plan is to eventually move to using the same build environment as for the rest of Zephyr, as per #26737

I'll let @andyross comment if there's some quick/simple intermediate fix we could do to zefi.py to eliminate the x86 dependency.

@andyross
Copy link
Contributor

We could pass the compiler to the script via the environment or the command line for a quick fix. But note that there's been absolutely no thought given to non-x86 EFI environments. It's very much an arch-specific feature right now. The framework is there, I guess, but I'd expect significant changes would be needed to get the COFF linkage working on other platforms, etc...

I'd mostly view this as a duplicate of #26737, yeah.

@nashif nashif removed their assignment Jul 25, 2020
@pabigot pabigot added the area: X86 x86 Architecture (32-bit) label Jul 28, 2020
@MaureenHelm MaureenHelm added the priority: low Low impact/importance bug label Jul 28, 2020
@jenmwms jenmwms assigned jenmwms and unassigned andyross Sep 9, 2020
@jenmwms jenmwms changed the title zefi.py assumes host GCC is not x86 zefi.py assumes host GCC is x86 Sep 9, 2020
@github-actions
Copy link

github-actions bot commented Nov 9, 2020

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label Nov 9, 2020
@jhedberg jhedberg removed the Stale label Nov 9, 2020
@jenmwms
Copy link
Collaborator

jenmwms commented Nov 18, 2020

We could pass the compiler to the script via the environment or the command line for a quick fix. But note that there's been absolutely no thought given to non-x86 EFI environments. It's very much an arch-specific feature right now. The framework is there, I guess, but I'd expect significant changes would be needed to get the COFF linkage working on other platforms, etc...

I'd mostly view this as a duplicate of #26737, yeah.

@andyross I'll follow-up with you about this bug. @nashif clarified this is not a duplicate. I'll update this bug as I learn more.

@yerabolu yerabolu assigned yerabolu and unassigned jenmwms Jan 6, 2021
yerabolu added a commit to yerabolu/zephyr that referenced this issue Jan 20, 2021
Currently, zefi.py takes host GCC OBJCOPY as
default. Fixing the script to use CMAKE_C_COMPILER
and CMAKE_OBJCOPY.

Fixes: zephyrproject-rtos#27047

Signed-off-by: Spoorthy Priya Yerabolu <[email protected]>
nashif pushed a commit that referenced this issue Jan 20, 2021
Currently, zefi.py takes host GCC OBJCOPY as
default. Fixing the script to use CMAKE_C_COMPILER
and CMAKE_OBJCOPY.

Fixes: #27047

Signed-off-by: Spoorthy Priya Yerabolu <[email protected]>
@galak galak reopened this Jan 23, 2021
@galak
Copy link
Collaborator Author

galak commented Jan 23, 2021

Re-open this issue since we need an update to the SDK to enable EFI binary targets in binutils.

galak added a commit to galak/zephyr that referenced this issue Jan 25, 2021
With SDK 0.12.2 we have support to generation EFI binaries in binutils
which is needed by the zefi.py script.  Now that is there we can utilize
the SDK objcopy instead of assuming the host objcopy can do this (which
would only be the case on x86 linux host systems).

Fixes zephyrproject-rtos#27047

Signed-off-by: Kumar Gala <[email protected]>
nashif pushed a commit that referenced this issue Jan 25, 2021
With SDK 0.12.2 we have support to generation EFI binaries in binutils
which is needed by the zefi.py script.  Now that is there we can utilize
the SDK objcopy instead of assuming the host objcopy can do this (which
would only be the case on x86 linux host systems).

Fixes #27047

Signed-off-by: Kumar Gala <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: X86 x86 Architecture (32-bit) bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
8 participants