-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Improving BaseTools for ARM/ARM64 systems #5953
base: master
Are you sure you want to change the base?
Conversation
Tested on Ubuntu 24.04 with gcc 13.2.0 and with clang ( |
@@ -30,6 +30,10 @@ ifeq ($(CYGWIN), CYGWIN) | |||
endif | |||
|
|||
ifeq ($(LINUX), Linux) | |||
ifndef CROSS_LIB_UUID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which tool defines CROSS_LIB_UUID? Does gcc compiler define it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lgao4 thanks for catching that. It was meant to be declared in the python script: see example here: https://github.com/microsoft/mu_basecore/blob/d9c18c384889d0c445865f96ac660f6abee6115f/BaseTools/Edk2ToolsBuild.py#L263
This is done because the in-box uuid library will not work for cross compilation so that we need to pull down uuid source and build from scratch. But please let me know if you prefer other methods in doing so, otherwise I will include the python script change in the next push.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bcran , how do you resolve this problem? Do you also pull UUID source code and compile it? I don't want user to compile UUID source. Could we upload the pre-built UUID lib file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lgao4 I'm not sure we want to support cross-building BaseTools - do we support that on Linux?
Why not just build BaseTools on an ARM version of Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because there is no pipeline support of Windows on ARM :(
Do you test on ARM ubuntun? |
BaseTools have been buildable on ARM/AArch64 since at least e0ba625, merged in September 2014. Please update the description to reflect what this set actually does. |
In fact, having looked at the actual set, I feel this should be reworked after the description has been corrected, since it seems to be confusing several unrelated changes with misleading description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please update the PR to describe what it is intended to do.
- Please rework as at least three commits:
- Enable support for building BaseTools for Arm/AArch64 using visual studio.
- Enable support for crossbuilding BaseTools using Visual Studio.
- Enable support for linking against custom libraries instead of those provided with the system.
- Clean up patches so we're not importing random project MU comments only to subsequently delete them.
I tested it on x86 Ubuntu 24.04, aarch64 openSUSE Tumbleweed and aarch64 FreeBSD 15-CURRENT. |
This PR has been automatically marked as stale because it has not had activity in 60 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
@kuqin12 I see this PR is still marked as having changes requested by @leiflindholm. Are you still working on it? |
Sorry for the delay. Yes, I made the change shortly after the feedback was provided. But then got distracted by some other items. I will get back to this in the next week. Please keep this open. Thanks. |
20edc2d
to
4ec98bb
Compare
This change focuses on the support of building basetool natively for Windows ARM/ARM64 host system, which will enable the ARM based platforms to build UEFI and unit tests. Note that the warnings due to integer conversions are suppressed for this specific target to avoid too much local changes carried in MU. The formal change should drop all these binaries and move to pythonic scripts. The binary output is tested on Windows ARM based hardware systems. Cc: Rebecca Cran <[email protected]> Cc: Liming Gao <[email protected]> Cc: Bob Feng <[email protected]> Cc: Yuwei Chen <[email protected]> Signed-off-by: Kun Qin <[email protected]>
This change adds the support of crossbuilding basetool for Windows ARM/ ARM64 systems, which will enable the generally available pipeline agents to build binary tools and make releases as they see fit. The EDK2 base tools build script is also updated to support cross compilation using this script. The crossbuilt binary output is tested on Windows ARM based hardware systems. Cc: Rebecca Cran <[email protected]> Cc: Liming Gao <[email protected]> Cc: Bob Feng <[email protected]> Cc: Yuwei Chen <[email protected]> Signed-off-by: Kun Qin <[email protected]>
This change added the build script to cross compile the base tool binaries for Linux ARM/AARCH64 systems. The needed libuuid system library is pulled from source file and rebuilt to support the corresponding library dependencies. Individual tools' makefiles are also updated to link the cross compiled library as well. The EDK2 base tool build script was also updated to support such change. This was tested functional on Linux ARM host system. Cc: Rebecca Cran <[email protected]> Cc: Liming Gao <[email protected]> Cc: Bob Feng <[email protected]> Cc: Yuwei Chen <[email protected]> Signed-off-by: Kun Qin <[email protected]>
The PR is updated with suggested changes. Could you please re-review? |
Description
This patch series is made to be able to build base tools for ARM/AARCH64 systems using Visual Studio. The change also covers the support for cross compilation of BaseTools using Visual Studio.
In addition, the change also updated the building process to link custom library instead of system inbox ones to support cross compilation on Linux systems.
How This Was Tested
This built output was tested on Windows ARM and Linux ARM systems, and used for building UEFI firmware.
Integration Instructions
N/A