To build NVIDIA Yocto Project based components
- 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
-
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. -
Extract the contents of
nvidia-layer.tgz
andoss-packages.tgz
with the following command:tar xzf nvidia-layer.tgz tar xzf oss-packages.tgz
-
Export
TEMPLATECONF
to use templates from themeta-drive5
layer with the following command:export TEMPLATECONF=$PWD/layers/meta-drive6/conf
-
Initialize the Yocto project build environment with the following command:
source oss/dunfell/poky/oe-init-build-env
-
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.
-
Enable network with Yocto build and download sources from upstream by setting
BB_NO_NETWORK as follows:
export BB_NO_NETWORK='0'
-
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
.