how to fix cross compiling ftrace error for 4.1.2 kernel

I run into this error when trying to cross compile:

`

crelloc@neoGenerationwork ~/omap/linux $ make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-




arch/arm/kernel/ftrace.c: In function ‘ftrace_arch_code_modify_post_process’:
arch/arm/kernel/ftrace.c:93:2: error: implicit declaration of function ‘flush_tlb_all’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[1]: *** [arch/arm/kernel/ftrace.o] Error 1
make: *** [arch/arm/kernel] Error 2

`

I grabbed the kernel from https://github.com/beagleboard/linux:

`
git clone -b 4.1.2-ti-r4 https://github.com/beagleboard/linux --depth=1

`

How do I fix this error to successfully cross compile my custom kernel? Any suggestions would greatly help, Thanks

Which version of gcc? And did you use the default bb.org_defconfig?

A couple of the patches aren’t fully ‘random’ config safe…

`

crelloc@neoGenerationwork ~/linux $ cat /proc/version
Linux version 3.13.0-37-generic (buildd@kapok) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014

`

Also, i do indeed us the default bb.org_defconfig

Okay, then grab a "good" cross compiler:

https://releases.linaro.org/15.05/components/toolchain/binaries/

Regards,

I’m still receiving the same error when trying to compile:

crelloc@neoGenerationwork ~/linux $ make ARCH=arm CROSS_COMPILE=${CC}

where ${CC} is:

`

crelloc@neoGenerationwork ~/linux $ echo ${CC}
/home/crelloc/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-

`

Okay.. no idea then... Patches welcome...

Well let us know if you figure it out, as so far "4.1.6-ti-r14" as
been succesfully built native against:

ubuntu:
14.04: gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04)
15.04: gcc version 4.9.2 (Ubuntu/Linaro 4.9.2-10ubuntu13)
15.10gcc version 5.2.1 20150825 (Ubuntu 5.2.1-15ubuntu5)

debian:
wheezy: gcc version 4.6.3 (Debian 4.6.3-14)
jessie: gcc version 4.9.2 (Debian 4.9.2-10)
stretch: gcc version 4.9.3 (Debian 4.9.3-4)
sid: gcc version 5.2.1 20150808 (Debian 5.2.1-15)

Regards,