-
Notifications
You must be signed in to change notification settings - Fork 169
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
fix kernel compile problem for arm64 #137
Conversation
taocy001
commented
May 25, 2020
•
edited
Loading
edited
- generate .config files for armhf, arm64, amd64 in turn.
- Compile the kernel with the corresponding environment variable.
- rely on updates to the sonic-slave-buster, see PR Arm64 buster build sonic-buildimage#4639.
can you check the build failure? |
These changes rely on updates to the sonic-slave-buster.
|
retest this please |
the build image pr has been merged. can you check the build failure? |
@antony-rheneus, can you take a look at this pr? |
Makefile
Outdated
@@ -52,6 +52,16 @@ DSC_FILE_URL = "http://security.debian.org/debian-security/pool/updates/main/l/l | |||
DEBIAN_FILE_URL = "http://security.debian.org/debian-security/pool/updates/main/l/linux/linux_4.19.67-2+deb10u2.debian.tar.xz" | |||
ORIG_FILE_URL = "http://security.debian.org/debian-security/pool/updates/main/l/linux/linux_4.19.67.orig.tar.xz" | |||
|
|||
define dpkg-architecture-armhf | |||
$(shell dpkg-architecture -aarmhf) CROSS_COMPILE=arm-linux-gnueabihf- |
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.
No need of cross compilation, as multi arch is enabled
Makefile
Outdated
# fakeroot make -f debian/rules.gen setup_armhf_none_armmp | ||
# fakeroot make -f debian/rules.gen setup_arm64_none | ||
fakeroot make -f debian/rules.gen setup_amd64_none_amd64 | ||
$(call dpkg-architecture-armhf) fakeroot make -f debian/rules.gen setup_armhf_none_armmp |
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.
The one mentioned in this comment also does the job
#121 (comment)
Makefile
Outdated
ifeq ($(CONFIGURED_ARCH), armhf) | ||
fakeroot make -f debian/rules.gen -j $(shell nproc) binary-arch_$(CONFIGURED_ARCH)_none_armmp | ||
$(call dpkg-architecture-armhf) DO_DOCS=False fakeroot make -f debian/rules -j $(shell nproc) binary-indep |
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.
Can reduce multiple/else by.
-
DO_DOCS=False ARCH=$(CONFIGURED_ARCH) DEB_HOST_ARCH=$(CONFIGURED_ARCH) fakeroot make -f debian/rules -j $(shell nproc) binary-indep
Makefile
Outdated
else | ||
ifeq ($(CONFIGURED_ARCH), arm64) | ||
$(call dpkg-architecture-arm64) DO_DOCS=False fakeroot make -f debian/rules -j $(shell nproc) binary-indep | ||
$(call dpkg-architecture-arm64) fakeroot make -f debian/rules.gen -j $(shell nproc) binary-arch_$(CONFIGURED_ARCH)_none |
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.
Can reduce arch check if else by,
ARCH=$(CONFIGURED_ARCH) DEB_HOST_ARCH=$(CONFIGURED_ARCH) fakeroot make -f debian/rules.gen -j
multi-arch docker usage is to get rid of cross compilation. without cross building multi-arch uses native(ARM) (not the host) gcc tools |
I would rather propose below change.
|
@taocy001 , can you look at the suggestion from @antony-rheneus |
This should be a better way to modify it. |
thanks, can you update the pr then? |
Ok, I'll update the PR after reworking and testing. |
@lguohan @antony-rheneus |