kernel build make error

I’m trying to build the kernel per instructions here:

But I get the following error after running

make -j3 -C kernel O=${PWD}/out-t186ref-linux

…/vibrante-oss-src/kernel/./Kbuild:80: recipe for target ‘arch/arm64/kernel/asm-offsets.s’ failed
make[2]: *** [arch/arm64/kernel/asm-offsets.s] Error 1
…/vibrante-oss-src/kernel/Makefile:1019: recipe for target ‘prepare0’ failed
make[1]: *** [prepare0] Error 2
make[1]: Leaving directory ‘/home/sam/nvidia/VibranteSDK/vibrante-oss-src/out-t186ref-linux’
Makefile:150: recipe for target ‘sub-make’ failed
make: *** [sub-make] Error 2
make: Leaving directory ‘/home/sam/nvidia/VibranteSDK/vibrante-oss-src/kernel’

Dear samrustan,

Could you please let us know how you got to this point in detail? Thanks.

  1. Set up the environment macros: The LOCAL_VERSION environment variable appends -tegra to the kernel version and modules. This makes them compatible with the yocto build.
export ARCH=arm64
export CROSS_COMPILE=/home/sam/nvidia/VibranteSDK/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/aarch64-gnu-linux-
export CROSS32CC=/home/sam/nvidia/VibranteSDK//toolchains/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc
export LOCALVERSION="-tegra"
  1. Set the kernel source directory as the current working directory:
cd /home/sam/nvidia/VibranteSDK/vibrante-oss-src
  1. Enter the following command to apply the rt-patches.
bash kernel/scripts/ apply-patches
  1. Create an output directory, and then configure the kernel for the board:
mkdir out-t186ref-linux
make -C kernel O=/home/sam/nvidia/VibranteSDK/vibrante-oss-src/out-t186ref-linux/ clean
  1. Add the following command:
make -C kernel O=/home/sam/nvidia/VibranteSDK/vibrante-oss-src/out-t186ref-linux  tegra_t186ref_gnu_linux_defconfig
  1. Build the kernel:
make -j9 -C kernel O=/home/sam/nvidia/VibranteSDK/vibrante-oss-src/out-t186ref-linux

Dear samrustan,

Thank you for your reply.

Could you try this CROSS32CC toolchain path: export CROSS32CC=$top/toolchains/arm-eabi-4.8/bin/arm-eabi-gcc? Thanks.

I re-installed everything, re-iterated the original steps and it then worked. I don’t know what the root cause of the problem I was experiencing.