Sudo ./tools/l4t_update_initrd.sh error

I am using Jetson Orin Nano (JetPack 6.1, Ubuntu 22.04) for robot development, and I need to connect the robot chassis through USB-CAN. However, when I tried to enable the gs_usb kernel module by running sudo modprobe gs_usb, I encountered the following error:
“modprobe: FATAL: Module gs_usb not found in directory /lib/modules/5.15.122-tegra”.

I found a solution on the NVIDIA forum, which suggests rebuilding a custom kernel. Therefore, I started rebuilding the kernel with support for gs_usb. Following the steps in the developer guide, I proceeded to the step where I need to update the initramfs by running the following commands:
$ cd /Linux_for_Tegra
$ sudo ./tools/l4t_update_initrd.sh
However, an error occurred, and the output is as follows:
~/nvidia/nvidia_sdk/JetPack_6.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra$ sudo ./tools/l4t_update_initrd.sh
Set LDK_DIR to /home/user/nvidia/nvidia_sdk/JetPack_6.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra
Using rootfs directory: /home/user/nvidia/nvidia_sdk/JetPack_6.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/rootfs
Updating the initrd: /home/user/nvidia/nvidia_sdk/JetPack_6.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/l4t_initrd.img
Copy /home/user/nvidia/nvidia_sdk/JetPack_6.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/l4t_initrd.img to /home/user/nvidia/nvidia_sdk/JetPack_6.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/rootfs/boot/initrd
Preparing virtual env
Include /etc/nv-update-initrd/list.d/binlist
Include /etc/nv-update-initrd/list.d/modules
nv-update-initrd: Updating /boot/initrd from /etc/nv-update-initrd/list.d for kernel version 5.15.122-rt-tegra…
Add /usr/sbin/nvluks-srv-app
Error: /lib/modules/5.15.122-rt-tegra/updates/drivers/net/ethernet/nvidia/nvethernet/nvethernet.ko not found
Cleaning up the temporary directory for updating the initrd…
ERROR: nv-update-initrd failed!
Cleaning up virtual env
What should I do?

Hi 929842867,

Are you using the devkit or custom board for Orin Nano?

5.15.122 seems not from JP6.1(R36.4.0).

Please share the result of cat /etc/nv_tegra_release for further check.

Do you refer to the steps in Kernel Customization — NVIDIA Jetson Linux Developer Guide 1 documentation to build kernel and apply the change?

Do you configure CONFIG_CAN_GS_USB as y or m in kernel config?

Please also check if Uefi assert and broken again - #12 by JerryChang can help for your case.

Hello, thank you for your help.
I am using a Jetson Orin Nano 8GB, but I am not sure if version 5.15.122 comes from JP6.1 (R36.4.0). I was just following a method I found on the forums.
Yesterday, I skipped the step:
$ sudo ./tools/l4t_update_initrd.sh
and attempted flashing using the following command:
Jetson Orin Nano Developer Kit (NVMe):
$ 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 jetson-orin-nano-devkit internal
However, during the process, the Jetson Orin Nano booted up but failed at the following step:
/home/user/nvidia/nvidia_sdk/JetPack_6.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra


Step 3: Start the flashing process


Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
… …
Waiting for target to boot-up…
Waiting for target to boot-up…
Timeout
Device failed to boot to the initrd flash kernel. Please retrive the serial log during flashing to debug further.
Cleaning up…

Is the step sudo ./tools/l4t_update_initrd.sh mandatory? How should I proceed with the flashing process? Thank you for your help.

Sorry, I just confirmed that my error output is: modprobe: FATAL: Module gs_usb not found in directory /lib/modules/5.15.136-tegra. not 5.15.122-tegra,5.15.122-tegra is the version mentioned by someone in another forum thread with a similar issue to mine. I forgot to change it when copying.

For this timeout issue, please check the full serial console log to check where it gets stuck during boot.

Do you enable related kernel config like CONFIG_CAN_GS_USB?

Thank you for your reply。
How can I check the serial console log?
I referred to this solution (https://forums.developer.nvidia.com/t/missing-gs-usb-kernel-module-for-jetpack-6/275287/7)
and added the following configurations to the current defconfig file:
CONFIG_INPUT_UINPUT=y
CONFIG_INPUT_JOYDEV=y
CONFIG_CAN_GS_USB=y
CONFIG_CAN_USB=y
CONFIG_USB_GADGET=y

Please refer to Jetson Nano & NX Style - Serial Debug Console - JetsonHacks to capture serial console log.

Hello, I bought a USB-to-TTL cable online and have configured the serial console, but I don’t know how to use it. Should I open Minicom and then proceed with flashing the Jetson? However, it seems that after I short the REC and GND pins to enter recovery mode, Minicom no longer displays any information. I’m sorry, I’m a beginner, could you please tell me what I should do?

Above link should include the instruction to setup serial console.
You can run ls /dev/tty* from your host before connecting the serial console cable and run this command again after connecting the cable to check which node is used for your serial console from host.
Normally, it should be /dev/ttyUSB0 if you don’t have other similar devices connected.

Correct! There should be the serial console log output during flash.

It is expected since there’s no log when you are in force recovery state, but there’re logs during flash.
Please just keep doing the process to run the flash command from your host.

Thank you for your patient guidance. I tried re-flashing, but it still stops at Step 3: Start the flashing process. Below is the serial console log output at the point where it stops.

Please share the log as file instead of the screenshot.
Are you working on a custom board or the devkit board?

Sorry, this is the log file. I am using a laptop with Ubuntu 22.04 to flash the Jetson Orin Nano Developer Kit.
jetson_flash_log.txt (60.9 KB)

It seems some modules missing in your rt-kernel.
Is the issue specific to rt-kernel or you would hit the similar issue if you use default kernel image?

When I use SDKmanager (graphical interface) for flash the Jetpack6.1, this problem does not occur.But the gs_usb module cannot be enabled.

Have you tried this to build normal kernel with this kernel config enabled?

Sorry, I don’t quite understand what you mean. After enabling this kernel config, isn’t it only possible to build a customized kernel and flash it again?

Yes, you have to build a custom kernel and flash the board to apply the change.

I deleted all previous configurations and started customizing the kernel again. However, I encountered an error at this stephttps://docs.nvidia.com/jetson/archives/r36.4/DeveloperGuide/SD/Kernel/KernelCustomization.html#building-the-jetson-linux-kernel.


Because my Linux_for_Tegra/ directory only has a source folder, should I manually create a rootfs/boot/ directory under Linux_for_Tegra/, or is there a step I missed?

I created the folder myself, but later I encountered a similar error again.