VIM3 Kernel compile failure

Hi
I follow below step to build Android AOSP 5.4 kernel.
But find some error.

export AOSP_TOPDIR=/path/to/your/aosp/source
cd ${AOSP_TOPDIR}
git clone https://android.googlesource.com/kernel/hikey-linaro -b android-amlogic-bmeson-5.4

export PATH=${AOSP_TOPDIR}/prebuilts/clang/host/linux-x86/clang-r399163b/bin:$PATH
export PATH=${AOSP_TOPDIR}/prebuilts/gas/linux-x86:$PATH
export PATH=${AOSP_TOPDIR}/prebuilts/misc/linux-x86/lz4:$PATH
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
export LLVM=1

cd hikey-linaro
make meson_defconfig → this step is ok
make DTC_FLAGS="-@" -j24 → this step find error.

Below for error message :
CALL scripts/atomic/check-atomics.sh
CALL scripts/checksyscalls.sh
LD arch/arm64/kernel/vdso/vdso.so.dbg
ld.lld: error: unknown argument: -n
arch/arm64/kernel/vdso/Makefile:60: recipe for target ‘arch/arm64/kernel/vdso/vdso.so.dbg’ failed
make[1]: *** [arch/arm64/kernel/vdso/vdso.so.dbg] Error 1
arch/arm64/Makefile:173: recipe for target ‘vdso_prepare’ failed
make: *** [vdso_prepare] Error 2

@Jack_Wu
Modify hikey-linaro/Makefile, try it.

diff --git a/Makefile b/Makefile
index 8dcbf17..e4cea65 100644
--- a/Makefile
+++ b/Makefile
@@ -410,7 +410,7 @@ KBUILD_HOSTLDLIBS   := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
 
 # Make variables (CC, etc...)
 CPP            = $(CC) -E
-ifneq ($(LLVM),)
+ifeq ($(LLVM),)
 CC             = clang
 LD             = ld.lld
 AR             = llvm-ar
1 Like

@tenk.wang

ok , I will try tommorrow.
thanks.

@tenk.wang
感謝 ,可以work