Yocto DRIVE OS Linux Boot KPI
- Follow the instructions in the “Disabling Foundation Logs” and “Disabling BPMP Logs” sections in DRIVE Linux Boot KPI.
-
Modify
<TOP>/drive-linux/kernel/source/oss_src/kernel/arch/arm64/configs/tegra_defconfig
-
Replace
CONFIG_DEBUG_FS=y
withCONFIG_DEBUG_FS=m”
-
Refer to Building the Yocto Project Components for DRIVE Orin and follow the steps to build Yocto.
-
Flash the board following instructions in Flashing Yocto DRIVE OS Filesystem and Running the Samples on Target.
-
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
- 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
- Reboot the board. The
nvsys_init_time
application runs beforesystemd
. - Run the following command to get the profiling
data:
sudo cat /sys/kernel/tegra_bootloader/profiler
- Post where the boot KPI logs will be generated (in /var/log/syslog).
For additional information, refer to DRIVE Linux Boot KPI.