This repository was archived by the owner on Aug 31, 2022. It is now read-only.
Ported Marvell armhf build on amd64 host for debian buster to use cross-comp…#80
Merged
lguohan merged 1 commit intosonic-net:masterfrom Oct 14, 2021
Merged
Ported Marvell armhf build on amd64 host for debian buster to use cross-comp…#80lguohan merged 1 commit intosonic-net:masterfrom
lguohan merged 1 commit intosonic-net:masterfrom
Conversation
…ilation instead of qemu emulation
hui-ma
reviewed
Jul 1, 2021
|
|
||
| sonic-telemetry: $(GO_DEPS) | ||
| ifeq ($(CROSS_BUILD_ENVIRON),y) | ||
| $(GO) build -o ${GOBIN}/telemetry -mod=vendor $(BLD_FLAGS) github.com/Azure/sonic-telemetry/telemetry |
Collaborator
There was a problem hiding this comment.
what is the difference between "go build -o
Contributor
Author
There was a problem hiding this comment.
For the build purpose these two commands are essentially the same. They both build the package and the result is placed in the same output directory. Somehow when cross-compiling "go install" command fails. So I replaced it with analogous build command that works fine.
Contributor
Author
|
Dear reviewers, Long time has passed since this PR was raised. Please make progress on the review. Thanks, Gregory |
Contributor
Author
|
Hi. Can anyone review and merge this PR asap. Gregory |
lguohan
approved these changes
Oct 14, 2021
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
…ilation instead of qemu emulation
Motivation:
Current armhf Sonic build on amd64 host uses qemu emulation. Due to the nature of the emulation it takes a very long time, about 22-24 hours to complete the build. The change I did to improve the building time ports Sonic armhf build on amd64 host for Marvell platform for debian buster to use cross-compilation on arm64 host for armhf target. The overall Sonic armhf building time using cross-compilation is about 6 hours.
The Sonic configure and build for the armhf cross-compilation is as following:
NOJESSIE=1 NOSTRETCH=1 BLDENV=buster CROSS_BLDENV=1 make configure PLATFORM=marvell-armhf PLATFORM_ARCH=armhf
NOJESSIE=1 NOSTRETCH=1 BLDENV=buster CROSS_BLDENV=1 make target/sonic-marvell-armhf.bin
Sonic module should check if $CROSS_BUILD_ENVIRON is 'y' to make sure that it is cross-compilation build.