Thursday, 15 May 2014

linux device driver - v4l2 kernel space debugging -



linux device driver - v4l2 kernel space debugging -

is there default mechanism enable debugging v4l2 drivers. want check dynamic debugging setting in /d. compile time flags in create file fine.

currently, had set below, not getting much information.

echo -n 0xffff>/sys/module/videobuf2_core/parameters/debug

can help me verbose v4l2 logs?

have in code: illustration file drivers/media/v4l2-core/v4l2-ioctl.c might 1 of more interesting ones, cause shows of user/kernel-space interactions.

in file see lot of pr_cont, pr_info , others. while printk printed, others something, if enabled. details on can found on http://lwn.net/articles/487437/ .

the nasty way replace of pr_cont or pr_info printk. can utilize #define this. if want enable 3 or 4 of them , add together own special ones, might fastest way.

the nice way have on how scheme thought used. can seek if can enable dynamic debugging, nicely described here https://lwn.net/articles/434833/ .

finally easiest way might have in kernel config. perhaps know command make menuconfig in source directory. can edit different settings, , in vi, can search using /. next specific modules, can enable or disable debugging options. if that's not enough, can alter global debugging level of kernel in .config file.

one specific flag might interested in is

config_video_adv_debug y here enable advanced debugging functionality on v4l devices. in doubt, n. symbol: video_adv_debug [=y] prompt: enable advanced debug functionality on v4l2 drivers location: -> device drivers -> multimedia back upwards (media_support [=y]) defined @ drivers/media/v4l2-core/kconfig:11 depends on: media_support [=y]

good luck

linux-kernel linux-device-driver v4l2

No comments:

Post a Comment