Yocto DRIVE OS Linux Boot KPI

  1. Follow the instructions in the “Disabling Foundation Logs” and “Disabling BPMP Logs” sections in the DRIVE Linux Boot KPI chapter in the NVIDIA DRIVE OS 6.0 PDK Developer Guide.
  2. Modify <TOP>/drive-linux/kernel/source/oss_src/kernel/arch/arm64/configs/tegra_defconfig

  3. Replace CONFIG_DEBUG_FS=y with CONFIG_DEBUG_FS=​​​m”

  4. Refer to Building the Yocto Project Components for NVIDIA DRIVE Orin and follow the steps to build Yocto.

  5. Flash the board following instructions in Flashing Yocto Image and Running the Samples on Target.

  6. When the board is flashed and successfully booted, on the target side replace the file /usr/bin/nv_camera_display.sh with the following:

For IMX728

#!/bin/bash

# Copyright (c) 2022, NVIDIA CORPORATION.  All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto.  Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.

set -x

linux=$(uname -r);
display=false;

mkdir -m 0755 -p /root
mkdir -p /tmp
mkdir -p /dev/shm/

/sbin/insmod /lib/modules/$linux/kernel/drivers/platform/tegra/tegra_bootloader_debug.ko

echo "modprobe cdi_mgr cdi_tsc" > /sys/kernel/tegra_bootloader/add_profiler_record
/sbin/modprobe -a cdi_mgr cdi_tsc

echo "insmod nvmap.ko" > /sys/kernel/tegra_bootloader/add_profiler_record
/sbin/insmod /lib/modules/$linux/kernel/drivers/video/tegra/nvmap/nvmap.ko

if [ "$display" = true ]; then
    echo "insmod nvidia.ko" > /sys/kernel/tegra_bootloader/add_profiler_record;/sbin/insmod /lib/modules/$linux/extra/opensrc-disp/nvidia.ko rm_firmware_active="all";echo "insmod nvidia-modeset.ko" > /sys/kernel/tegra_bootloader/add_profiler_record;/sbin/insmod /lib/modules/$linux/extra/opensrc-disp/nvidia-modeset.ko;echo "insmod nvidia-drm.ko" > /sys/kernel/tegra_bootloader/add_profiler_record;/sbin/insmod /lib/modules/$linux/extra/opensrc-disp/nvidia-drm.ko modeset=1;echo "insmod nvgpu.ko" > /sys/kernel/tegra_bootloader/add_profiler_record;/sbin/insmod /lib/modules/$linux/kernel/drivers/gpu/nvgpu/nvgpu.ko;echo "launching app" > /sys/kernel/tegra_bootloader/add_profiler_record;/usr/bin/nvsys_init_time -c "F008A120RM0A_CPHY_x4_s" -r 1 -d 1 --disableISP2Output > /home/nvidia/nvsys_init_time_out.txt
else
    echo "launching app" > /sys/kernel/tegra_bootloader/add_profiler_record;/usr/bin/nvsys_init_time -c "V1SIM728S1RU3120NB20_CPHY_x4" -m "0x0001 0x0000 0x0000 0x0000" -r 1 > /home/nvidia/nvsys_init_time_out.txt
fi

echo "starting systemd" > /sys/kernel/tegra_bootloader/add_profiler_record
exec /lib/systemd/systemd

For AR0820 Camera Config

#!/bin/bash

# Copyright (c) 2022, NVIDIA CORPORATION.  All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto.  Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.

set -x

linux=$(uname -r);
display=false;

mkdir -m 0755 -p /root
mkdir -p /tmp
mkdir -p /dev/shm/

/sbin/insmod /lib/modules/$linux/kernel/drivers/platform/tegra/tegra_bootloader_debug.ko

echo "modprobe cdi_mgr cdi_tsc" > /sys/kernel/tegra_bootloader/add_profiler_record
/sbin/modprobe -a cdi_mgr cdi_tsc

echo "insmod nvmap.ko" > /sys/kernel/tegra_bootloader/add_profiler_record
/sbin/insmod /lib/modules/$linux/kernel/drivers/video/tegra/nvmap/nvmap.ko

if [ "$display" = true ]; then
    echo "insmod nvidia.ko" > /sys/kernel/tegra_bootloader/add_profiler_record;/sbin/insmod /lib/modules/$linux/extra/opensrc-disp/nvidia.ko rm_firmware_active="all";echo "insmod nvidia-modeset.ko" > /sys/kernel/tegra_bootloader/add_profiler_record;/sbin/insmod /lib/modules/$linux/extra/opensrc-disp/nvidia-modeset.ko;echo "insmod nvidia-drm.ko" > /sys/kernel/tegra_bootloader/add_profiler_record;/sbin/insmod /lib/modules/$linux/extra/opensrc-disp/nvidia-drm.ko modeset=1;echo "insmod nvgpu.ko" > /sys/kernel/tegra_bootloader/add_profiler_record;/sbin/insmod /lib/modules/$linux/kernel/drivers/gpu/nvgpu/nvgpu.ko;echo "launching app" > /sys/kernel/tegra_bootloader/add_profiler_record;/usr/bin/nvsys_init_time -c "F008A120RM0A_CPHY_x4_s" -r 1 -d 1 --disableISP2Output > /home/nvidia/nvsys_init_time_out.txt
else
    echo "launching app" > /sys/kernel/tegra_bootloader/add_profiler_record;/usr/bin/nvsys_init_time -c "F008A120RM0A_CPHY_x4_s" -r 1 > /home/nvidia/nvsys_init_time_out.txt
fi

echo "starting systemd" > /sys/kernel/tegra_bootloader/add_profiler_record
exec /lib/systemd/systemd

Create a Symbolic Link and Modify Permission

  1. Create a symlink and modify file permissions to 777.
    sudo ln -sf /usr/bin/nv_camera_display.sh /sbin/init
    sudo chmod 777 /usr/bin/nv_camera_display.sh
    
  2. Reboot the board. The nvsys_init_time application runs before systemd.
  3. Run the following command to get the profiling data:
    sudo cat /sys/kernel/tegra_bootloader/profiler
  4. Post where the​​​​​ boot KPI logs will be generated (in /var/log/syslog).