To build NVIDIA Yocto Project based components

  1. Install the dependent packages:
    • Ensure the host system is connected to the Internet.
    • On the host, enter the following commands:
    sudo add-apt-repository ppa:openjdk-r/ppa; sudo apt-get update; sudo apt-get install openjdk-8-jdk
    sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat xterm make xsltproc docbook-utils fop dblatex xmlto manpages-pl manpages-fr-extra qemu-user libpulse-dev xxd python3-distutils
  2. Change to the build directory on the host system with the following command:
    cd <top>/drive-linux_src/yocto

    Where <top> is the directory on the host where the release is installed.

  3. Extract the contents of nvidia-layer.tgz and oss-packages.tgz with the following command:
    tar xzf nvidia-layer.tgz
    tar xzf oss-packages.tgz
  4. Export TEMPLATECONF to use templates from the meta-drive5 layer with the following command:
    export TEMPLATECONF=$PWD/layers/meta-drive6/conf
  5. Initialize the Yocto project build environment with the following command:
    source oss/dunfell/poky/oe-init-build-env 
  6. Select the type of Image by setting the value of IMAGE_TYPE:
    export IMAGE_TYPE=<full|minimal|samples|debug-utils>
    • minimal : Rootfs with upstream OSS (baseline Yocto distro) and Tegra SW libraries.
    • samples : Rootfs with contents of minimal, plus DRIVE OS samples (NVmedia, Gfx etc. samples).
    • debug-utils : Rootfs with contents of minimal, plus utilities to support debug and profiling (OSS and NV-proprietary debug utils).
    • full : Superset rootfs with everything in minimal, samples and debug-utils packaged.
      Note: Default image type is set to full.
  7. Enable network with Yocto build and download sources from upstream by setting BB_NO_NETWORK as follows:
    export BB_NO_NETWORK='0'
  8. Build component, image, or SDK/PDK depending on the recipe with the following command:
    bitbake <recipe>

    Recipes of interest are:

    bitbake <recipe>

    Function / Remarks

    tegra-drive-os-av-image

    Yocto DRIVE OS AV rootfs

    tegra-initramfs-boot

    Cold boot initramfs

    tegra-initramfs-recovery Recovery initramfs
    Note: PDK packages must be installed before launching bitbake for recovery initramfs.

    SELinux support is enabled in Yocto with default mode as permissive. If you need to begin testing system behavior in enforcing mode, you must modify the DEFAULT_ENFORCING to "enforcing" in <top>/drive-linux_yocto/yocto/layers/meta-drive6/recipes-security/refpolicy/refpolicy-minimum_%.bbappend.