Skip to content

Commit f07f74f

Browse files
taocy001taocy
and
taocy
authored
fix kernel compile problem for arm64 (#137)
- 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 sonic-net/sonic-buildimage#4639. Co-authored-by: taocy <[email protected]>
1 parent e2dbd4c commit f07f74f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Makefile

+8-8
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
7474
debian/bin/gencontrol.py
7575

7676
# generate linux build file for amd64_none_amd64
77-
# fakeroot make -f debian/rules.gen setup_armhf_none_armmp
78-
# fakeroot make -f debian/rules.gen setup_arm64_none
79-
fakeroot make -f debian/rules.gen setup_amd64_none_amd64
77+
fakeroot make -f debian/rules.gen DEB_HOST_ARCH=armhf setup_armhf_none_armmp
78+
fakeroot make -f debian/rules.gen DEB_HOST_ARCH=arm64 setup_arm64_none
79+
fakeroot make -f debian/rules.gen DEB_HOST_ARCH=amd64 setup_amd64_none_amd64
8080

8181
# Applying patches and configuration changes
82-
# git add debian/build/build_armhf_none_armmp/.config -f
83-
# git add debian/build/build_arm64_none_arm64/.config -f
82+
git add debian/build/build_armhf_none_armmp/.config -f
83+
git add debian/build/build_arm64_none_arm64/.config -f
8484
git add debian/build/build_amd64_none_amd64/.config -f
8585
git add debian/config.defines.dump -f
8686
git add debian/control -f
@@ -93,11 +93,11 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
9393
stg import -s ../patch/series
9494

9595
# Building a custom kernel from Debian kernel source
96-
DO_DOCS=False fakeroot make -f debian/rules -j $(shell nproc) binary-indep
96+
ARCH=$(CONFIGURED_ARCH) DEB_HOST_ARCH=$(CONFIGURED_ARCH) DO_DOCS=False fakeroot make -f debian/rules -j $(shell nproc) binary-indep
9797
ifeq ($(CONFIGURED_ARCH), armhf)
98-
fakeroot make -f debian/rules.gen -j $(shell nproc) binary-arch_$(CONFIGURED_ARCH)_none_armmp
98+
ARCH=$(CONFIGURED_ARCH) DEB_HOST_ARCH=$(CONFIGURED_ARCH) fakeroot make -f debian/rules.gen -j $(shell nproc) binary-arch_$(CONFIGURED_ARCH)_none_armmp
9999
else
100-
fakeroot make -f debian/rules.gen -j $(shell nproc) binary-arch_$(CONFIGURED_ARCH)_none
100+
ARCH=$(CONFIGURED_ARCH) DEB_HOST_ARCH=$(CONFIGURED_ARCH) fakeroot make -f debian/rules.gen -j $(shell nproc) binary-arch_$(CONFIGURED_ARCH)_none
101101
endif
102102
popd
103103

0 commit comments

Comments
 (0)