-
Notifications
You must be signed in to change notification settings - Fork 180
fix kernel compile problem for arm64 #137
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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- | ||
endef | ||
define dpkg-architecture-arm64 | ||
$(shell dpkg-architecture -aarm64) CROSS_COMPILE=aarch64-linux-gnu- | ||
endef | ||
define dpkg-architecture-amd64 | ||
$(shell dpkg-architecture -aamd64) CROSS_COMPILE= | ||
endef | ||
|
||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
# Obtaining the Debian kernel source | ||
rm -rf $(BUILD_DIR) | ||
|
@@ -74,13 +84,13 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | |
debian/bin/gencontrol.py | ||
|
||
# generate linux build file for amd64_none_amd64 | ||
# 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 commentThe reason will be displayed to describe this comment to others. Learn more. The one mentioned in this comment also does the job |
||
$(call dpkg-architecture-arm64) fakeroot make -f debian/rules.gen setup_arm64_none | ||
$(call dpkg-architecture-amd64) fakeroot make -f debian/rules.gen setup_amd64_none_amd64 | ||
|
||
# Applying patches and configuration changes | ||
# git add debian/build/build_armhf_none_armmp/.config -f | ||
# git add debian/build/build_arm64_none_arm64/.config -f | ||
git add debian/build/build_armhf_none_armmp/.config -f | ||
git add debian/build/build_arm64_none_arm64/.config -f | ||
git add debian/build/build_amd64_none_amd64/.config -f | ||
git add debian/config.defines.dump -f | ||
git add debian/control -f | ||
|
@@ -93,11 +103,17 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | |
stg import -s ../patch/series | ||
|
||
# Building a custom kernel from Debian kernel source | ||
DO_DOCS=False fakeroot make -f debian/rules -j $(shell nproc) binary-indep | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Can reduce multiple/else by.
|
||
$(call dpkg-architecture-armhf) fakeroot make -f debian/rules.gen -j $(shell nproc) binary-arch_$(CONFIGURED_ARCH)_none_armmp | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Can reduce arch check if else by, |
||
else | ||
fakeroot make -f debian/rules.gen -j $(shell nproc) binary-arch_$(CONFIGURED_ARCH)_none | ||
$(call dpkg-architecture-amd64) DO_DOCS=False fakeroot make -f debian/rules -j $(shell nproc) binary-indep | ||
$(call dpkg-architecture-amd64) fakeroot make -f debian/rules.gen -j $(shell nproc) binary-arch_$(CONFIGURED_ARCH)_none | ||
endif | ||
endif | ||
popd | ||
|
||
|
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