I’m trying to build a camera driver kernel module out-of-tree for the Jetson, I’m using the Nano for now to be exactly but other variants with the same kernel will be necessary. I used this example.
SRC_TREE=/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64 KERNEL_PATH=/lib/modules/4.9.140-l4t-r32.4.2 ccflags-y += -I$(SRC_TREE)/drivers/media/platform/tegra/ obj-m += ar0521.o ar0521: make -C $(KERNEL_PATH) M=$(PWD) modules clean: make -C $(KERNEL_PATH) M=$(PWD) clean
To begin is the KERNEL_PATH right? Because I don’t think there is a kernel binary at that location, but most guides say there should be one with the name ‘build’. Where is the kernel binary located on Balena firmware?
Then the SRC_TREE is not the real one received from Balena, I additionally installed these headers from NVIDIA because the one from Balena were missing some headers. Is this a bug or am I looking at the wrong location?