Kernel driver cannot be updated

Hello Wayne,

I’m using jetpack4.3 now.
Modify “CONFIG_VIDEO_OV5693 = y” in the tegra defconfig file. If the kernel is updated, you can use the following command to view CONFIG_VIDEO_OV5693
sudo zcat /proc/config.gz | grep OV5693
CONFIG_VIDEO_OV5693=y

The kernel is not updated
CONFIG_VIDEO_OV5693=m

Thanks.

Hi tianying414,

How about adding a print line in ov5693 sensor driver?
I saw there is this line in ov5693 probe function.

dev_info(dev, “probing v4l2 sensor.\n”);

If your ov5693 is still a kernel module, it shall not have this info if you don’t load the kernel module.

Also, you could really try to remove the /boot/Image and see if this is really the kernel image that system is loading.
Your boot log in cboot shall also tell you which kernel file is in use.

Thank you for reply.

I regenerated the image file, flashed the kernel, and Use the “uname -a” command to see that the kernel is up to date.

But there is no output ov5693_probe function “probing v4l2 sensor”.

TEGRA_KERNEL_OUT=~/kernelout
export CROSS_COMPILE=~/tools/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
export LOCALVERSION=-tegra
make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4
sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=~/nvidia/xavier16G-jp4.3/JetPack_4.3_Linux_P2888/Linux_for_Tegra/rootfs/
cp $TEGRA_KERNEL_OUT/arch/arm64/boot/Image /Linux_for_Tegra/kernel/Image
cp $TEGRA_KERNEL_OUT/arch/arm64/boot/dts/*.dtb /Linux_for_Tegra/kernel/dtb/

sudo ./flash.sh jetson-xavier mmcblk0p1

Thanks.

Hi,

Few methods for you to try

  1. Adding the print in other driver. For example, you could add something in tegra_dc_probe() in kernel/nvidia/drivers/video/tegra/dc/dc.c. This should definitely print out the what you add.

  2. Please don’t do “export LOCALVERSION=-tegra” during your compilation. So that the command “uname -r” should give you “4.9.140” instead of “4.9.140-tegra”

  3. Remove the /boot/Image and see if you could boot up.

Also, I want to check your boot log especially the cboot log. Please attach it. Thanks.

Hello Wayne,

  • I added the print in ov5693_probe and tegra_dc_probe, but only the print in tegra_dc_probe was executed.

static int ov5693_probe(struct i2c_client *client, const struct i2c_device_id *id)
printk(KERN_ALERT "===ov5693_probe===\n");

static int tegra_dc_probe(struct platform_device *ndev)
printk(KERN_ALERT "===tegra_dc_probe===\n");

[    0.000000] earlycon: tegra_comb_uart0 at MMIO32 0x000000000c168000 (options '')
[    0.000000] bootconsole [tegra_comb_uart0] enabled
[    0.000000] Found tegra_fbmem: 00800000@a069b000
[    0.000000] Found lut_mem: 00002008@a0696000
<hit enter to activate fiq debugger>
[    1.975106] ===tegra_dc_probe=====
[    2.037242] ===tegra_dc_probe=====
[    2.037745] ===tegra_dc_probe=====
[    2.157030] tegra-xudc-new 3550000.xudc: extcon_get_extcon_dev_by_cable failed -19
  • I removed /boot/Image, the system was booted from another partition.

sudo mv /boot/Image /boot/Image.bak
The attachment is the boot log.
kernel-debug2.log (29.5 KB)

Thanks.

According to below log and your test in tegra_dc_probe, at least we know the cboot will load the Image from rootfs first. If there is no kernel in rootfs, then it will fallback to partition. I think this issue is specific to ov5693 driver only but not the whole kernel image. The kernel image is already replaced by you.

[0004.605] I> Detect filesystem
[0004.632] I> Loading extlinux.conf …
[0004.632] I> rootfs path: /sdmmc_user/boot/extlinux/extlinux.conf
[0004.663] I> L4T boot options
[0004.663] I> [1]: “primary kernel”
[0004.663] I> Enter choice:
[0007.665] I> Continuing with default option: 1
[0007.665] I> Loading kernel sig file from rootfs …
[0007.665] I> rootfs path: /sdmmc_user/boot/Image.sig
[0007.690] I> Loading kernel binary from rootfs …
[0007.690] I> rootfs path: /sdmmc_user/boot/Image
[0013.895] I> lookup_linear_dir:436: Invalid file block num
[0013.895] I> ext2_walk:142: ‘Image’ lookup failed
[0013.895] I> ext4_open_file:638: ‘/boot/Image’ lookup failed
[0013.896] E> file /sdmmc_user/boot/Image open failed!!
[0013.896] W> Failed to load kernel binary from rootfs (err=202113041)
[0013.897] I> Loading kernel binary from partition …

Hello Wayne,.
Thanks for your help

How does the system perform the camera drive?
Because our custom board needs a camera and audio, we must add the corresponding driver in the kernel. Are there any related solutions?

Thanks.

hello tianying414,

it’s VI driver to parse camera nodes during kernel initialization,
you’ll need to have implementation for the camera sensor driver and also sensor device tree.
please refer to Camera Architecture Stack to have an overview.

there’re documentations for your reference,
please access Sensor Software Driver Programming Guide to have sensor driver implementation;
if you would like to built your sensor driver as a loadable kernel module, please also check Loadable Kernel Module (LKM) for reference.

I would suggest you initial another new discussion thread for tracking the issue for bringing up camera drivers.
thanks

1 Like