aboutsummaryrefslogtreecommitdiffstats
path: root/include/kernel.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-12-12 18:28:03 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-12-12 18:28:03 +0000
commitbdee115c44e36d2d8f5f1f0377dfa486fb1a0ebb (patch)
treedb0e5fbb8d9de2893ba492d94982435fbedca5bc /include/kernel.mk
parent71906dea62558731f3fed96903626204eeae535c (diff)
downloadupstream-bdee115c44e36d2d8f5f1f0377dfa486fb1a0ebb.tar.gz
upstream-bdee115c44e36d2d8f5f1f0377dfa486fb1a0ebb.tar.bz2
upstream-bdee115c44e36d2d8f5f1f0377dfa486fb1a0ebb.zip
kernel.mk: Refactor LINUX_KARCH affectation
Switch to a dumber implementation that will be easier to maintain in the long run, with only if statements instead of having nested subst calls. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43671 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/kernel.mk')
-rw-r--r--include/kernel.mk15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/kernel.mk b/include/kernel.mk
index d2754abe44..b905cb9e19 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -64,13 +64,20 @@ endif
ifneq (,$(findstring uml,$(BOARD)))
LINUX_KARCH=um
+else ifneq (,$(findstring $(ARCH), aarch64 aarch64_be))
+ LINUX_KARCH := arm64
+else ifneq (,$(findstring $(ARCH), armeb))
+ LINUX_KARCH := arm
+else ifneq (,$(findstring $(ARCH), mipsel mips64 mips64el))
+ LINUX_KARCH := mips
+else ifneq (,$(findstring $(ARCH), sh2 sh3 sh4))
+ LINUX_KARCH := sh
+else ifneq (,$(findstring $(ARCH), i386))
+ LINUX_KARCH := x86
else
- ifeq (,$(LINUX_KARCH))
- LINUX_KARCH=$(strip $(subst i386,x86,$(subst armeb,arm,$(subst mipsel,mips,$(subst mips64,mips,$(subst mips64el,mips,$(subst sh2,sh,$(subst sh3,sh,$(subst sh4,sh,$(subst aarch64,arm64,$(subst aarch64_be,arm64,$(ARCH))))))))))))
- endif
+ LINUX_KARCH := $(ARCH)
endif
-
define KernelPackage/Defaults
FILES:=
AUTOLOAD:=