How Can I Create a Custom Installation Image and BSP Package for My Custom Jetson Nano Board?

I am working with a custom-designed board for the Jetson Nano. Since the camera interfaces on my hardware use different I²C addresses than the standard Jetson Nano configuration, I have updated the DTS files accordingly. Additionally, I wrote drivers for some sensors, and everything is functioning correctly.

However, I plan to commercialize the product, and I want to avoid any potential licensing issues. Therefore, I need guidance on the following:

  • How can I properly integrate my DTS modifications and custom drivers into a BSP package?

  • What should I pay attention to regarding open-source licenses when distributing these files or embedding them into my product?

  • What is the recommended workflow or toolset provided by NVIDIA for creating custom installation images for custom Jetson Nano boards?

In summary, I would like to understand the correct process and key steps for generating a custom installation image and BSP package tailored to my hardware.

Could you provide guidance on how to approach this?

Hi,
For information, do you use Jetpack 4.6.6 r32.7.6:
Jetson Linux R32.7.6 | NVIDIA Developer

This is the latest release for Jetson Nano. Would like to confirm whether you use this version.

1 Like

Hi,
Here are the version details from my Jetson Nano as requested.

cat /etc/nv_tegra_release

# Output
# R32 (release), REVISION: 7.2, GCID: 30192233, BOARD: t210ref, EABI: aarch64, DATE: Wed Apr 20 21:34:48 UTC 2022

cat /proc/device-tree/model

# Output
NVIDIA Jetson Nano Developer Kit
cat /boot/extlinux/extlinux.conf
# Output
FDT /boot/kernel_tegra210-nano-cti-NGX004-RPI-IMX219-2CAM.dtb
nvcc --version
#Output 
Cuda compilation tools, release 10.2, V10.2.300
dpkg-query --show nvidia-l4t-core
# Output
nvidia-l4t-core	32.7.2-20220420143418
uname -a
Linux ubuntu 4.9.253-tegra 

@DaneLLL Can I create my own BSP if I follow this documentation?

Here are the steps I have followed so far. Since my host machine is running Ubuntu 22.04, I set up an Ubuntu 18.04 based Docker container to ensure compatibility with the L4T tools. Inside the Docker environment, I downloaded the following packages from the NVIDIA developer website:


Jetson-210_Linux_R32.7.6_aarch64.tbz2
Tegra_Linux_Sample-Root-Filesystem_R32.7.6_aarch64.tbz2
Linux_for_Tegra/

Then I executed the steps described in the official documentation:

tar xf ${L4T_RELEASE_PACKAGE}
cd Linux_for_Tegra/rootfs/
sudo tar xpf ../../${SAMPLE_FS_PACKAGE}
cd ..
sudo ./apply_binaries.sh

However, during the execution of sudo ./flash.sh lectron-custom-board mmcblk0p1, the process gets stuck at the following output:

[   1.6601 ] tegrarcm --boot recovery
[   1.6606 ] Applet version 00.01.0000
[   1.6872 ] 
[   1.6872 ] Retrieving storage infomation
[   1.6891 ] tegrarcm --oem platformdetails storage storage_info.bin

From this point on, it does not progress any further.
Could you advise why this might be happening or how to troubleshoot this issue?

Hi,
You may refer to the section in developer guide:

https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3276/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/flashing.html#wwpID0E0OQ0HA
To clone a Jetson device and flash

I successfully generated and flashed the image, and I confirmed that my custom DTS file is being applied correctly. The Jetson recognizes the board and boots without issues. However, I have encountered an additional problem:

The custom drivers I wrote (two C source files) were not included during the image build process. As a result, although the DTS is loaded, the driver entries referenced by the DTS are not functional because the corresponding kernel modules are missing in the system.

So my question is:

How can I integrate my custom C-based drivers into the image build process?
What is the proper method to compile these drivers as kernel modules and include them in the rootfs or build them directly into the kernel?

Essentially, I need guidance on how to ensure my custom drivers are correctly compiled and embedded into the L4T / BSP environment so they become operational at runtime.

Hi,
Please check the Kernel Customization section:
https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3276/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/kernel_custom.html#

The default files are under Linux_for_Tegra. Please follow the steps to overwrite the files with your self-built files.

I am trying to build the Jetson Nano kernel for R32.7.6 with my own DTS and driver changes.
My build directory is:

~/workspace/l4t_32_7_6/Linux_for_Tegra/sources/kernel/kernel-4.9

In the first stage, I hit an error on the dtbs target.
Inside arch/arm64/boot/dts/Makefile there is the following rule:

dtbs: $(DTB_OBJS) $(DTBO_OBJS) FORCE
	cp -u $(DTB_OBJS) $(DTBO_OBJS) arch/arm64/boot/dts/

When I run make dtbs, I get:

cp: missing destination file operand after 'arch/arm64/boot/dts/'

So the cp command is not being formed correctly (source/destination arguments are wrong or empty), and the build stops in the DTB copy stage. Because of that, I suspected this line and temporarily commented out the cp line for testing.

After commenting that line, the DTB stage passes, but then the kernel build fails in GPU (nvgpu) and core driver code. For example:

drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c: In function ‘gp10b_tegra_probe’:
... error: ‘ret’ undeclared (first use in this function)

drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c:277:17: error:
‘struct gk20a_platform’ has no member named ‘reset_control’

drivers/gpu/nvgpu/os/linux/platform_gk20a_tegra.c:170:13: error:
implicit declaration of function ‘clk_get_rate’

drivers/gpu/nvgpu/os/linux/platform_gk20a_tegra.c:492:7: error:
implicit declaration of function ‘clk_get_sys’

drivers/base/dma-coherent.c:973:12: error: ‘shrink_thread’ defined but not used [-Werror=unused-function]
drivers/base/dma-coherent.c:280:12: error: ‘declare_coherent_heap’ defined but not used [-Werror=unused-function]
drivers/base/dma-coherent.c:96:13: error: ‘dma_debugfs_init’ defined but not used [-Werror=unused-function]
cc1: all warnings being treated as errors

In summary:

  • The first issue is the dtbs step failing on cp -u $(DTB_OBJS) $(DTBO_OBJS) arch/arm64/boot/dts/ with cp: missing destination.

  • After commenting that out, the build proceeds but then fails with multiple errors in nvgpu and dma-coherent (undeclared variables, missing struct members, implicit declarations, and unused functions treated as errors due to -Werror).

At this point I would appreciate guidance on:

  • The correct way to fix the dtbs copy rule for R32.7.6, and

  • Whether these nvgpu / dma-coherent errors indicate a configuration/environment mismatch or if there is a known patch/workaround for this release.