Kernel build can't find e-CAM50_CUNANO

Hi,
I’m trying to build a linux kernel to flash onto out Jetson Tx2 board. Essentially following the same process as we used in the past with L4T 32.2.1, but trying to use the newer 32.5.1.

I downloaded and extracted the L4T board support package “tegra186_linux_r32.5.1_aarch64.tbz2” into the Linux_for_Tegra directory.
I downloaded and extracted the L4T sample root filesystem “tegra_linux_sample-root-filesystem_r32.5.1_aarch64.tbz2” into the Linux_for_Tegra/rootfs directory.

I then ran ./source_sync.sh -t tegra-l4t-r32.5.1

I setup the recommended gcc toolchain.

I uncompress the board support package for our ConnectTech carrier board

I then attempt to build the kernel source, using

mkdir -p $BUILD_PATH
export CROSS_COMPILE=$ROOT_PATH/toolchain/bin/aarch64-linux-gnu-
export LOCALVERSION=-tegra
cd Linux_for_Tegra/sources/kernel/kernel-4.9
make ARCH=arm64 O=$BUILD_PATH tegra_defconfig
make ARCH=arm64 O=$BUILD_PATH

The build progresses for a long time, but finally fails, giving the following errors:

/opt/tegra/l4t_build/toolchain/bin/aarch64-linux-gnu-ld: cannot find drivers/media/i2c/e-CAM50_CUNANO/built-in.o: No such file or directory
make[4]: *** [/opt/tegra/l4t_build/Linux_for_Tegra/sources/kernel/kernel-4.9/scripts/Makefile.build:509: drivers/media/i2c/built-in.o] Error 1
make[3]: *** [/opt/tegra/l4t_build/Linux_for_Tegra/sources/kernel/kernel-4.9/scripts/Makefile.build:649: drivers/media/i2c] Error 2
make[2]: *** [/opt/tegra/l4t_build/Linux_for_Tegra/sources/kernel/kernel-4.9/scripts/Makefile.build:649: drivers/media] Error 2

I’m confused, as this e-CAM50_CUNANO should have nothing to do with anything I’m doing, but that implies the sources made available are not able to be compiled into a kernel without making modifications or searching for 3rd party files to bring into it.

Any thoughts on what is happening, and how to approach solving this problem?

Thanks!

Hi @scrawford

I have faced this error in the past on other similar BSP sources too, and I can’t give you an answer on why this happens, a quick workaround for this is just disable it from the makefile in kernel/kernel-4.9/drivers/media/i2c/Makefile. If I’m not mistaken, it should be the last line that you should comment:

obj-y += e-CAM50_CUNANO/

Again, I’m not 100% sure on why this problem is so common, maybe there exists a better fix than disabling it or a real reason behind it.

Best regards,
Roberto Gutierrez
Embedded Software Engineer

1 Like

Hi,
Thanks, I too thought of commenting that line, but when I did so, it made it further into the build then had another error

drivers/built-in.o: In function ‘imx390_write_table_1cam’:
/opt/tegra/l4t_build/Linux_for_Tegra/sources/kernel/nvidia/drivers/media/i2c/imx390.c:235: undefined reference to ‘max929x_write_reg_Dser’

so I figured maybe there were deeper issues that needed addressing rather than hacking out each one as I came to them.

Hi,

Yes sadly for those sources I also had in the past to remove support for both e-CAM50_CUNANO and imx390, by either commenting it too from the kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig configuration or the configuration you are using, or disabling it doing the following:

make ARCH=arm64 O=$BUILD_PATH menuconfig

It should open the configuration menu to disable imx390 driver:

-> Device Drivers
  -> Multimedia support (MEDIA_SUPPORT [=y])
    -> NVIDIA overlay Encoders, decoders, sensors and other helper chips
       < > IMX390 camera sensor support

After disabling it, press save, and exit, and then:
make ARCH=arm64 O=$BUILD_PATH

This uses a custom config instead of a tegra_defconfig.

Again, you can do this if you don’t have any problems with removing support for both of them, hopefully is the same symptom that I had and only those two are causing problems, hope it helps.

Best Regards,
Roberto

1 Like

Thanks, I had the e-CAM50_CUNANO commented out like in your suggestion, and have edited
Linux_for_Tegra/sources/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig
and set

CONFIG_VIDEO_IMX390=y

to

CONFIG_VIDEO_IMX390=n

and this has solved the problem, there were no further errors .

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.