i’m working with a carrier board from seed studio and i could get the jetpack 6.2 kernel working on the board after flashing with the sdk manager.
Now, i want to compile my own kernel. I got the kernel sources using the source_sync.sh script with tag as 36.4.3 appropriate for jetpack6.2.
did the following to compile kernel:
got correct compiler from the website and set the path appropriately
make ARCH=arm64 tegra_prod_defconfig menuconfig, select custom drivers
make ARCH=arm64
It did compile without errors.
However there are no dts files for my board in the boot directory: arm/arm64/boot/dts/nvidia/
“make ARCH=arm64 dtbs” doesn’t build for my board. I had to copy dts files and edit the Makefile to include:
tb-$(CONFIG_ARCH_TEGRA_234_SOC) += tegra234-p3768-0000+p3767-0000-nv.dtb
dtb-$(CONFIG_ARCH_TEGRA_234_SOC) += tegra234-p3768-0000+p3767-0001-nv.dtb
dtb-$(CONFIG_ARCH_TEGRA_234_SOC) += tegra234-p3768-0000+p3767-0003-nv.dtb
dtb-$(CONFIG_ARCH_TEGRA_234_SOC) += tegra234-p3768-0000+p3767-0004-nv.dtb
dtb-$(CONFIG_ARCH_TEGRA_234_SOC) += tegra234-p3768-0000+p3767-0005-nv.dtb
I copied dts and dtsi files from the path:
~/nvidia/nvidia_sdk/JetPack_6.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public
I tried compiling it and fixing many header missing errors enroute. Now, after i have resolved all the missing headers i get the following error:
DTC arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767-0000-nv.dtb
arch/arm64/boot/dts/nvidia/nv-soc/tegra234-base-overlay.dtsi:734.41-766.4: ERROR (duplicate_label): /mgbe-vm-irq-config: Duplicate label ‘mgbe_vm_irq_config’ on /mgbe-vm-irq-config and /bus@0/mgbe-vm-irq-config
ERROR: Input tree has errors, aborting (use -f to force output)
It looks like i have two dtsi files with the same label.
I wanted to know if what i’m doing is right ? Is this the right approach to build custom device tree for a board ? Is there a script which copies the necessary board files from the platform directory into kernel boot directory ?
The board is a replica of the development kit hence there should be no changes in the device tree.
The kernel booted correctly from SDK manager flashed image with original device tree files but it doesn’t boot when i replaced only the custom kernel image in the boot directory.
Thanks for replying. I’m aware of this page. As mentioned earlier the sources do not have the dts files for Orin nano board.
make dtbs builds fine but doesn’t build the dtb for Orin nano.
And that page says:
$ cp kernel-devicetree/generic-dts/dtbs/* /Linux_for_Tegra/kernel/dtb/
Where is the kernel-devicetree folder ? or where is generic-dts ?
From this error messages, it seems you’ve configured something wrong for mgbe-vm-irq-config node in device tree.
Have you confirm that your custom carrier board from SeeedStudio has the exact similar design as the devkit even they work with the same board config w/o any change?
Currently, I would suggest you referring to the instruction w/o any custom modification like updating kernel config.
make dtbs command should build the dtb files you need in the following path: <Linux_for_Tegra>/source/kernel-devicetree/generic-dts/dtbs/
If you don’t get the dtb files, please share the full log after you run make dtbs on your host.
Thanks Kevin. I took new source altogether <Linux_for_Tegra>
Synced the source and built the kernel as is without any customization. Just followed the steps in the [customization] page.
after all those steps i flash with the following command:
sudo ./flash.sh jetson-orin-nano-devkit-nvme nvme0n1p1
The kernel boots but it cannot find init while booting. I get the error chroot cannot find the file /sbin/init. kernel panic.
I did flash the initrd and didn’t miss on any steps in that page.
Any way i can debug this or you know of anything i’m missing ? Is the flash command correct for nvme ? Any ideas what i can try ?