Skip to content

Commit

Permalink
fix kernel compile problem for arm64 (#137)
Browse files Browse the repository at this point in the history
- 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 <taocy2@centecnetworks.com>
  • Loading branch information
taocy001 and taocy authored May 30, 2020
1 parent e2dbd4c commit f07f74f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,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
fakeroot make -f debian/rules.gen DEB_HOST_ARCH=armhf setup_armhf_none_armmp
fakeroot make -f debian/rules.gen DEB_HOST_ARCH=arm64 setup_arm64_none
fakeroot make -f debian/rules.gen DEB_HOST_ARCH=amd64 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
Expand All @@ -93,11 +93,11 @@ $(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
ARCH=$(CONFIGURED_ARCH) DEB_HOST_ARCH=$(CONFIGURED_ARCH) 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
ARCH=$(CONFIGURED_ARCH) DEB_HOST_ARCH=$(CONFIGURED_ARCH) fakeroot make -f debian/rules.gen -j $(shell nproc) binary-arch_$(CONFIGURED_ARCH)_none_armmp
else
fakeroot make -f debian/rules.gen -j $(shell nproc) binary-arch_$(CONFIGURED_ARCH)_none
ARCH=$(CONFIGURED_ARCH) DEB_HOST_ARCH=$(CONFIGURED_ARCH) fakeroot make -f debian/rules.gen -j $(shell nproc) binary-arch_$(CONFIGURED_ARCH)_none
endif
popd

Expand Down

0 comments on commit f07f74f

Please sign in to comment.