NVIDIA DRIVE 5.0 Foundation SDK

Development Guide Release

Building the Flashing Kernel
This topic provides instructions on building the flashing kernel sources.
To build the flashing kernel
1. Extract the flashing kernel sources using the following commands on the host:
cd <top>/drive-t186ref-foundation_src/kernel
tar xvf drive-oss-t186-flashing_kernel-src.tar.bz2
cd drive-oss-t186-flashing_kernel-src/drive-oss-src
2. Set up the environment macros:
export ARCH=arm64
export CROSS_COMPILE=<top>/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/aarch64-gnu-linux-
export CROSS32CC=<top>/toolchains/gcc-arm-none-eabi-4_8-2014q3/bin/arm-none-eabi-gcc
3. Create an output directory, and then configure the kernel for the board:
mkdir -p out-t186-linux/out
make -C kernel O=${PWD}/out-t186-linux/out clean
4. Add the following command:
make -C kernel O=${PWD}/out-t186-linux/out tegra_t186ref_gnu_linux_defconfig
5. Build the kernel:
make -C kernel O=${PWD}/out-t186-linux/out -j4
If the above command fails, enter the make command without the j<number> option.
6. Copy the uncompressed kernel image with the following command:
cp ${PWD}/out-t186-linux/out/arch/arm64/boot/Image <top>/drive-t186ref-foundation/tools/host/flashtools/flash/t18x/rcmkernel
7. Copy the flashing kernel DTB file with the following command:
cp ${PWD}/out-t186-linux/out/arch/arm64/boot/dts/tegra186-vcm31-p3407-flashing-base.dtb <top>/drive-t186ref-foundation/tools/host/flashtools/flash/t18x/rcmkernel