Here is tested solution on JetPack 6.2.2:
You need public_sources and installed kernel headers to build driver on Jetson:
sudo apt-get install linux-kernel-headers*
https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v5.0/sources/public_sources.tbz2
Unzip 3 archives: kernel_src.tbz2, kernel_oot_modules.tbz2, nvidia_kernel_display_driver_source.tbz2 and then:
cp -r source/* /path/to/Linux_for_Tegra/source/
cd /path/to/Linux_for_Tegra/source
export KERNEL_HEADERS=/usr/src/linux-headers-$(uname -r)-ubuntu22.04_aarch64/3rdparty/canonical/linux-jammy/kernel-source
make modules # -> nvidia-oot/drivers/media/i2c/nv_imx296.ko
make dtbs # -> kernel-devicetree/generic-dts/dtbs/tegra234-p3767-camera-p3768-imx296-{A,C,dual}.dtbo
For nano super you need base: /boot/tegra234-p3768-0000+p3767-0005-nv-super.dtb, compiled dtbo and nv_imx296.ko.
Fix /boot/extlinux/extlinux.conf as described.
Put nv_imx296.ko to headers extra folder /usr/src/linux-headers-$(uname -r)/extra and then sudo depmod -a and reboot.
Then nvgstcapture or argus_camera or gstreamer pipeline to preview.

