"Incorrecrt" driver module is loaded?

hi, I’m trying to modify the nv_ov23850.c driver as a “fake” driver which is compiled with the kernel. but for some reason when the unit boots some print outs i.e.:

ov23850 2-0036: probing v4l2 sensor

there is no where in the kernel code this string, there are though with a ‘.’ at the end. How can I identify the code that actually invoked?

hello igal.kroyter,

I’m not really understand your question, doesn’t it expected to probe this sensor driver as you manually enable it?

hi @JerryChang ,
you are correct, it supposed to be probed, but it should not print out strings that are not within driver’s source code. I have searched the whole kernel source for the exact phrase “probing v4l2 sensor”, there are some which have a dot at the end “probing v4l2 sensor**.**” or some with extra string indicating of the adrees of the driver. So I’m not sure which drive was actuallly probed.

please check the driver code, $public_sources/kernel_src/kernel/nvidia/drivers/media/i2c/nv_ov23850.c
it’s printed by below.

static int ov23850_probe(struct i2c_client *client,
                        const struct i2c_device_id *id) 
{
        struct camera_common_data *common_data;
        struct ov23850 *priv;
        int err; 

        dev_info(&client->dev, "probing v4l2 sensor\n");

this is called by v4l standard probing function.

static struct i2c_driver ov23850_i2c_driver = {

        .probe = ov23850_probe,

@JerryChang ,
I’ve removed this printout, and istead wrote dev_info(&client->dev, “>>>>>>>\n”);

how you update the kernel, please confirm you’ve update this kernel module (i.e. nv_ov23850.ko) correctly.

The sources are positioned at /usr/src
and I invoke

sudo ./nvbuild.sh
Building kernel-5.10 sources
make: Entering directory ‘/usr/src/kernel/kernel-5.10’

No change to .config

make: Leaving directory ‘/usr/src/kernel/kernel-5.10’
CALL scripts/atomic/check-atomics.sh
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
AR init/built-in.a
LD vmlinux.o
MODPOST vmlinux.symvers
MODINFO modules.builtin.modinfo
GEN modules.builtin
LD .tmp_vmlinux.kallsyms1
KSYMS .tmp_vmlinux.kallsyms1.S
AS .tmp_vmlinux.kallsyms1.S
LD .tmp_vmlinux.kallsyms2
KSYMS .tmp_vmlinux.kallsyms2.S
AS .tmp_vmlinux.kallsyms2.S
LD vmlinux
SORTTAB vmlinux
SYSMAP System.map
OBJCOPY arch/arm64/boot/Image

CALL scripts/atomic/check-atomics.sh
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC [M] drivers/media/i2c/nv_ov23850.o
MODPOST modules-only.symvers
GEN Module.symvers
LD [M] drivers/media/i2c/nv_ov23850.ko
Kernel sources compiled successfully.

nv_ov23850.txt (21.2 KB)

how you update this ko file? did you replace it with default one on the target and reboot for confirmation?

@JerryChang,

I’ve looked in the system for nv_ov23850.ko fount it here:

  1. /usr/src/kernel/kernel-5.10/drivers/media/i2c/nv_ov23850.ko
  2. /usr/lib/modules/5.10.120-tegra/kernel/drivers/media/i2c/nv_ov23850.ko

I guess that upon compilation completion I need to manually copy it from one place to the other. I am copying the kernel Image but was under the impression that the driver is copied automatically…

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