Compilation of kernel from sources

This section is intended to guide developers to compile kernel sources and device tree from sources and apply them to running target.

triangle-exclamation

Creating a working directory

  1. Create working directory using Nvidia SDK manager.

    • download and install NVIDIA SDK manager official webarrow-up-right

    • open SDK manager

    • choose "Target Hardware" and "Linux" according to which system is image intended for. (Jetson Xavier NX modules / JetPack4.6 used in this example)

    • continue through all the steps (with jetson unconnected)

    • if SDK Manager show flash dialog, click on "Skip".

    • if installation is complete, click on "FINISH AND EXIT".

    • now working directory for target is created in '/nvidia/nvidia_sdk/' folder. (JetPack_4.6_Linux_JETSON_XAVIER_NX_TARGETS in this example)

  2. Create working directory using cli command:

    • assumed sdkmanager is installed

    • execute: sdkmanager --cli install --logintype devzone --product Jetson --targetos Linux --version 4.6 --target JETSON_XAVIER_NX_TARGETS --deselect "Jetson SDK Components" --flash skip

Obtaining kernel sources

Clone github repository into working directory:

Branches matrix:

Jetson type
JetPack version
<branch>

xavier nx

J.P. 4.6.0

JP_46_L4T_3261_airvolute

Compilation

Assumed that working directory and kernel sources obtained successfully.

  1. Setup variables

  2. Download other dependencies

  3. Download and setup toolchain

  4. Setup compilation of kernel sources

  5. Compilation of sources

    Option A : compile kernel

    Option B : compile device tree

    Option C : compile modules

  6. Applying compiled files to working directory

  7. Deploying compiled outputs to runnning Jetson target

Connect Jetson target to host PC through configuration micro usb and execute following commands to deploy compilation outputs to running target.

  • Kernel image deployment

  • Device tree deployment

Last updated