Hello:
I am trying to built custom linux kernel based on JP6 on Orin Nx dev kit.
After changing the configs (tried to enable the kdbg features) and flashing the orin nx dev kit, the orin nx is not able to boot.
The SDK is able to flash and boot if I didn’t modify anything.
The way I compile my kernel is following [here(Kernel Customization — NVIDIA Jetson Linux Developer Guide 1 documentation)]
- Download the source code in here
- Build the kernel, oot modules, and dtbs:
Unzip public_source.tbz2 and mv them to seperate folder to avoid permission issues.
$ tree
.
├── kernel_oot_modules_src.tbz2
├── kernel_src.tbz2
└── nvidia_kernel_display_driver_source.tbz2
.
Tar them:
$ tar xf kernel_src.tbz2
$ tar xf kernel_oot_modules_src.tbz2
$ tar xf nvidia_kernel_display_driver_source.tbz2
Modify defconfig (config file attached, all modifications are at the bottom of the file) and ready to build:
$ ls
generic_rt_build.sh hwpm kernel_oot_modules_src.tbz2 kernel_src.tbz2 nvbuild.sh nvdisplay nvgpu nvidia-oot
hardware kernel kernel_src_build_env.sh Makefile nvcommon_build.sh nvethernetrm nvidia_kernel_display_driver_source.tbz2
$ export CROSS_COMPILE=/home/ceslab-onyx/jp6KernelSource/toolchain/bin/aarch64-buildroot-linux-gnu-
$ nano kernel/kernel-jammy-src/arch/arm64/configs/defconfig
$ make -C kernel
After the logs said “Kernel source compiled successfully.”, install the kernel:
$ export INSTALL_MOD_PATH=/home/ceslab-onyx/jetpack6/Linux_for_Tegra/rootfs
$ sudo -E make install -C kernel
$ cp kernel/kernel-jammy-src/arch/arm64/boot/Image \
/home/ceslab-onyx/jetpack6/Linux_for_Tegra/kernel/Image
Building Nvidia out-of-tree modules and dtbs:
$ cd source
$ export CROSS_COMPILE=/home/ceslab-onyx/jp6KernelSource/toolchain/bin/aarch64-buildroot-linux-gnu-
$ export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src
$ make modules
$ export INSTALL_MOD_PATH=/home/ceslab-onyx/jetpack6/Linux_for_Tegra/rootfs
$ sudo -E make modules_install
DTBs:
$ cd source
$ export CROSS_COMPILE=/home/ceslab-onyx/jp6KernelSource/toolchain/bin/aarch64-buildroot-linux-gnu-
$ export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src
$ make dtbs
$ cp nvidia-oot/device-tree/platform/generic-dts/dtbs/* \
/home/ceslab-onyx/jetpack6/Linux_for_Tegra/kernel/dtb/
- Flash Orin NX
Boot the NX to recovery mode and run the cmd:
$ cd Linux_for_tegra
$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -p "-c ./bootloader/generic/cfg/flash_t234_qspi.xml" -c ./tools/kernel_flash/flash_l4t_t234_nvme.xml --showlogs --network usb0 jetson-orin-nano-devkit nvme0n1p1
After flashing, NX will halt after the dmesg said:
...
[ 2.624032] hub 2-1:1.0: 4 ports detected
[ 2.728491] usb 1-3: new full-speed USB device number 3 using tegra-xusb
[ 5.336678] pcie_tegra194: disagrees about version of symbol module_layout
[ 5.338233] phy_tegra194_p2u: disagrees about version of symbol module_layout
[ 5.340332] nvme_core: disagrees about version of symbol module_layout
[ 5.342557] typec: disagrees about version of symbol module_layout
[ 5.344551] typec: disagrees about version of symbol module_layout
[ 5.346768] typec: disagrees about version of symbol module_layout
[ 5.348616] tegra_xudc: disagrees about version of symbol module_layout
[ 15.469723] ERROR: nvme0n1p1 not found
Full logs from NX serial uart and logs from initrd tools are also attached.
Using the same sdk, I can flash AGX orin dev kit and boot up successfully. But dmesg will also print disagrees about version of symbol module_layout
, not sure if it’s the root cause or not.
Please help. Many thanks.
flash_1-11.4_0_20240115-140440.log (51.7 KB)
defconfig.txt (31.0 KB)
flashNxSerialLogs.txt (136.7 KB)