My problem is that none of the debug outputs seems to work for me:
printk
dev_err
dev_info
What am I trying to do:
Writing a driver to listen in on an existing CSI2 data stream.
What I can do:
the code compiles, links and creates a ko-file. I’ve modified the device tree, so that I can load it.
sudo insmod is working
sudo probemod is working
sudo lsmod is showing the module loaded
sudo rmmod is unloading it.
if I delete the module insmod is complaining, that the file is not found.
However it seems that all writing to the kernel log is not working / disabled.
Is there a central switch in the build scripts to enable/disable it?
When I plug a USB drive, I get tons of messages. But for imx219 or my driver I get nothing.
Occasionally there is some entry:
“[timestamp] start_addr=(0x20000), end_address=(0x40000), buffer_size=(0x20000),smp_number_max=(16384)”
That seems to be related to the driver, but it is not always there.
Orin can’t connect imx219, I post IMX219 to tell r35.1 on XNX without problem to print the message. You can use IMX219 as template to modify your driver.
What might be relevant is that after a reboot, when I load my module for the first time, I get a message that the kernel is polluted or tainted. At first I thought I fixed this with “sudo depmod -a” because it didn’t show up again. But it seems to appear only once per reboot. I’ve found some articles that this can influence printk. I’m not yet sure how to fix it though.
Edit: the depmod -a is required for modprobe to find the module.
as you can see, there’s dev_dbg() in nv_imx274.c.
however, dynamic debug flag is configured as disabled by default.
you’ll need to re-built the kernel by adding CONFIG_DYNAMIC_DEBUG=y to dynamically enable/disable kernel code to obtain additional kernel information.
the alternative way is updating the kernel by using dev_err() or pr_err() to force output messages to highest level.
for quick testing, you may try to replace this kernel module, i.e. Topic239759_Feb08.7z (191 Bytes)
note, it’s built from Jetpack-5.1/ l4t-r35.2.1, I’ve change some of debug prints as error log level for you testing.
thanks
FYI, the above is not a bug, and not necessarily a problem. It means that a driver was loaded in the kernel which is not open source licensed, and the official support from kernel.org won’t deal with it. Sometimes the source is needed to debug since one kernel space driver can interfere with others, and the actual cause of a bug might be misleading since the bug is just a report and not a source. Unless that module has an actual bug being tainted is 100% irrelevant to function.