rk: Makefile set SUBLEVEL=0 and default CROSS_COMPILE and ARCH
authorHuang, Tao <huangtao@rock-chips.com>
Sat, 21 Nov 2015 11:59:55 +0000 (19:59 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Sat, 21 Nov 2015 12:03:38 +0000 (20:03 +0800)
Change-Id: Ic56c2d521c971ebd6dc425cfdb32258492234000
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Makefile

index 54698fb8396a52f213ba4db0f99c53ce5b581cf5..11c9ca74825ef763bf5370f6166c3bb9bf64eb6a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,8 @@ NAME = Blurry Fish Butt
 # Comments in this file are targeted only to the developer, do not
 # expect to learn how to build the kernel reading this file.
 
+SUBLEVEL = 0
+
 # o Do not use make's built-in rules and variables
 #   (this increases performance and avoids hard-to-debug behaviour);
 # o Look for make include files relative to root of kernel src
@@ -248,7 +250,13 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
 # "make" in the configured kernel build directory always uses that.
 # Default value for CROSS_COMPILE is not to prefix executables
 # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
+ARCH           ?= arm64
 ARCH           ?= $(SUBARCH)
+ifeq ($(ARCH),arm64)
+ifneq ($(wildcard $(srctree)/../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9),)
+CROSS_COMPILE  ?= $(srctree)/../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
+endif
+endif
 CROSS_COMPILE  ?= $(CONFIG_CROSS_COMPILE:"%"=%)
 
 # Architecture as present in compile.h