Kernel customization for minimal flavor rootfs

I’m currently exploring kernel customization and have been following the NVIDIA kernel customization instructions. These steps worked perfectly when using the desktop flavor of the root file system. However, when I tried applying the same instructions to the minimal root file system, it didn’t work as expected, and the device failed to boot.

I’m using BSP version 36.4.0. Has anyone faced a similar issue or have any suggestions for adding kernel modules to a minimal setup?

Any help would be greatly appreciated. Thanks in advance! 😊 Please pardon any mistakes in my post—I’m still learning.

Hi,
Please share uart log for reference. Would like to check and see where it gets stuck.

And does it work if you use default Jetpack 6.1 with minimum rootfs on Orin Nano developer kit?

minimal rootfs

So, I have used these commands below to set up minimal rootfs first, and it is working perfectly.

sudo ./nv_build_samplefs.sh --abi aarch64 --distro ubuntu --flavor minimal --version jammy
sudo tar -xpf /path/to/sample_fs.tbz2 -C Linux_for_Tegra/rootfs/
sudo ./apply_binaries.sh
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 \
  -c tools/kernel_flash/flash_l4t_t234_nvme.xml -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" \
  --showlogs --network usb0 p3509-a02-p3767-0000 internal

Flashing with modified defconfig

Then, I have changed defconfig from the source file of kernel and followed the additional commands as below,

./generic_rt_build.sh "enable"

$ export CROSS_COMPILE=<toolchain-path>/bin/aarch64-buildroot-linux-gnu-
$ make -C kernel
$ export INSTALL_MOD_PATH=<install-path>/Linux_for_Tegra/rootfs/
$ sudo -E make install -C kernel
$ cp kernel/kernel-jammy-src/arch/arm64/boot/Image \
  <install-path>/Linux_for_Tegra/kernel/Image

And for the next part, I followed steps from the Building the NVIDIA Out-of-Tree Modules and updated the initramfs by the command,

$ cd <install-path>/Linux_for_Tegra
$ sudo ./tools/l4t_update_initrd.sh

Then, Flashed nvidia with the same command used before.

Interestingly, I can see login prompt when the device connected via uart to my PC.
But the monitor connected to it via HDMI is stuck on the boot page.

If I am doing mistake in the process while flashing with the kernel customization please point me out where the mistake is.

The bootlog is attached for your better understanding of the issue.
Thanks… :-)
bootlogMinimalOS.log (155.8 KB)

I have used another hdmi cable and another display, looks like its not a problem with hardware. Just for more info to identify the display issue, I have attached dmesg here. please check this as well, if necessary.
dmesg_display.log (55.6 KB)

Hi,
Do you use our Orin Nano developer kit? It is DP output on our developer kit instead of HDMI output. Not sure why you mention HDMI.

sorry about that, I made a mistake during selection of the topic. I am using Orin NX 16GB module on a carrier board (ref: p3509-a02-p3767-0000) and it has HDMI port instead of DP like nano dev kit.

Hi,
Orin NX module + p3509 carrier board is not supported. Please use Orin Nano carrier board.

Board is not supported kernel customization for minimal OS, this is what you meant?
Then how it’s working for regular desktop flavor OS with customization. please clarify.
Thanks :)

Hi,
We suggest do kernel customization based on default Jetpack release. Orin NX module + p3509 carrier board is not supported on default release. Would suggest use Orin NX module + Orin Nano carrier board.

Thank you for your response. Would you at least give me any hint of direction for which the device is accessible via UART with the changes made in kernel but device not even boot with the display connected to it.

Thanks again :)

Hi,
Please check if your issue is similar to
Booting Issue on Jetson Orin Nano with Minimal Root Filesystem - PARTUUID Mount Fail - #32 by WayneWWW

If yes, please try the quick solution. Please note certain functions may not work prolerly on Orin NX module + Xavier NX carrier board(p3509). Would suggest use Orin Nano carrier board.