nano@jetson-nano:~$ uname -a
Linux jetson-nano 4.9.253-test #1 SMP PREEMPT Wed Jun 22 21:54:13 BST 2022 aarch64 aarch64 aarch64 GNU/Linux
I attach the only file in the kernel source that I changed (as a result of one of the two patches - as I say, the other patch had no effect):
imx219_mode_tbls.h (8.9 KB)
I believe that you now have a replica of my setup. And I assume you have not got 120fps working on your Nano?
For completeness, I list the steps I made to compile this kernel:
1. Log in here: https://developer.nvidia.com/embedded/downloads
2. Check the “Jetson Nano” filter checkbox and follow the link to the latest “Jetson Linux Driver Package (L4T)” package.
3. Download “L4T Driver Package (BSP) Sources” and extract the downloaded “public sources.tbz2” file.
4. With the extracted file the file kernel_src.tbz2 should be extracted which will create a new folder named “kernel_src”.
5. Apply imx219_mode_tbls.h.patch (other patch, even after modifying for tegra210, has no effect):
patch -p0 < imx219_mode_tbls.h.patch
6. Do the following to build the kernel:
export L4TK=$PWD
export SRC=$L4TK/kernel/kernel-4.9
export STAGE=$L4TK/build
rm -rf ${STAGE}
mkdir ${STAGE}
export TEGRA_KERNEL_OUT=${STAGE}/kernel
mkdir $TEGRA_KERNEL_OUT
export TEGRA_MODULES_OUT=${STAGE}/modules
mkdir $TEGRA_MODULES_OUT
sudo /usr/bin/jetson_clocks
cd $SRC
export LOCALVERSION=-test
make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j6
make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=${TEGRA_MODULES_OUT}/
sudo rm -rf /lib/modules/4.9.253${LOCALVERSION}
sudo cp -R ${TEGRA_MODULES_OUT}/lib/modules/4.9.253${LOCALVERSION} /lib/modules
sudo cp $TEGRA_KERNEL_OUT/arch/arm64/boot/Image /boot/Image-4.9.253${LOCALVERSION}
7. Find out which device tree is being used on the current board, then use this to copy the appropriate DTB file into place (tegra210-p3448-0002-p3449-0000-a02.dtb does NOT work):
cat /proc/device-tree/nvidia,dtsfilename
sudo cp ${L4TK}/build/kernel/arch/arm64/boot/dts/tegra210-p3448-0000-p3449-0000-a02.dtb /boot/test.dtb
8. As root, create a new entry in /boot/extlinux/extlinux.conf, first copying your working default entry and in new entry modifying LABEL, MENU, LINUX for the new kernel image, adding FDT line for device tree, keeping INITRD and APPEND unchanged such as:
LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image-4.9.253-test
FDT /boot/test.dtb
INITRD /boot/initrd
APPEND ${cbootargs etc etc etc