Help with selecting package
Hello,
I receive a lot of warning during the compilation of a kernel module, like this:
WARNING: "videobuf_read_stream" [/home/mark/dev/rpiqt5/buildroot-rpi/output/build/sensoray2253-1.2.6/driver/s2253.ko] undefined!
"videobuf_read_stream" is defined in media/videobuf-core.h.
How to find which package I have to add to "depends on" and to "PACKAGE_DEPENDENCIES" ?
I've already added libv4l.
Mark
Dear Marco Trapanese,
Quoted 7 lines · Marco Trapanese
I receive a lot of warning during the compilation of a kernel module, like this:
WARNING: "
videobuf_read_stream" [/home/mark/dev/rpiqt5/buildroot-rpi/output/build/sensoray2253-1.2.6/driver/s2253.ko] undefined!
Quoted 5 lines
"
videobuf_read_stream" is defined inmedia/videobuf-core.h.How to find which package I have to add to "depends on" and to "
PACKAGE_DEPENDENCIES" ?
I've already added libv4l.
It's not a dependency on an userspace library, it's a dependency on a kernel option, and there's no way to ensure this option is enabled by mean of Buildroot dependencies. You should just make sure your kernel configuration has the right option enabled.
Make sure you have CONFIG_VIDEOBUF_GEN enabled in your kernel, which seems to be the option that ensures videobuf_read_stream() is provided by the kernel.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Il 14/10/2013 11:47, Thomas Petazzoni ha scritto:
Quoted 3 lines
It's not a dependency on an userspace library, it's a dependency on a kernel option, and there's no way to ensure this option is enabled by mean of Buildroot dependencies.
How one should get this information by himself? I want to learn without always ask to who is more expert.
Quoted 4 lines
You should just make sure your kernel configuration has the right option enabled. Make sure you have
CONFIG_VIDEOBUF_GENenabled in your kernel, which seems to be the option that ensuresvideobuf_read_stream()is provided by the kernel. Best regards, Thomas
I found my kernel config file in:
board/arm/rpi/linux.config
but the header says "do not edit this file". What's the recommended way to change kernel settings?
Anyway CONFIG_VIDEOBUF_GEN doesn't exist at all.
This is the Multimedia configuration:
# Multimedia core support
#CONFIG_MEDIA_CAMERA_SUPPORT=yCONFIG_MEDIA_ANALOG_TV_SUPPORT=yCONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
# CONFIG_MEDIA_RADIO_SUPPORT is not setCONFIG_MEDIA_RC_SUPPORT=y
# CONFIG_MEDIA_CONTROLLER is not setCONFIG_VIDEO_DEV=yCONFIG_VIDEO_V4L2=y
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not setCONFIG_VIDEO_TUNER=yCONFIG_VIDEOBUF2_CORE=yCONFIG_VIDEOBUF2_MEMOPS=yCONFIG_VIDEOBUF2_VMALLOC=y
# CONFIG_VIDEO_V4L2_INT_DEVICE is not setCONFIG_DVB_CORE=yCONFIG_DVB_NET=y
# CONFIG_TTPCI_EEPROM is not setCONFIG_DVB_MAX_ADAPTERS=8
# CONFIG_DVB_DYNAMIC_MINORS is not set
Mark
Dear Marco Trapanese,
Quoted 1 line · Marco Trapanese
How one should get this information by himself?
Experience, mainly.
Quoted 1 line
I want to learn without always ask to who is more expert.
Well, the problem occurred when building a kernel driver. And the kernel is completely standalone, it does not depend on userspace, it is the opposite. So if something is "missing" to build a kernel driver, this "something" must be in the kernel itself.
Quoted 6 lines
I found my kernel config file in:
board/arm/rpi/linux.configbut the header says "do not edit this file". What's the recommended way to change kernel settings?
make linux-menuconfig
See http://buildroot.org/downloads/manual/manual.html#kernel-custom.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Il 14/10/2013 13:47, Thomas Petazzoni ha scritto:
Quoted 2 lines
make linux-menuconfig See
http://buildroot.org/downloads/manual/manual.html#kernel-custom.
Ok, but as far as I know the linux.config file contains all the available parameters.The active ones are set to "y" otherwise are commented out.
In the current linux.config there is no CONFIG_VIDEOBUF_GEN item at all.
Anyway I searched for suitable items in linux-menuconfig but the name of the menu could be different... Is there a table where each CONFIG_ item is translated into the linux-menuconfig one? There are so many options one cannot try in a random way :-)
Best regards
Mark
Hi Marco,
Quoted 10 lines · Marco Trapanese
Il 14/10/2013 13:47, Thomas Petazzoni ha scritto:
Quoted 2 lines
make linux-menuconfig See
http://buildroot.org/downloads/manual/manual.html#kernel-custom.Ok, but as far as I know the linux.config file contains all the available parameters.The active ones are set to "y" otherwise are commented out. In the current linux.config there is no
CONFIG_VIDEOBUF_GENitem at all.
Not all available options are present in .config. It is possible that CONFIG_VIDEOBUF_GEN depends on another option that is not selected.
Quoted 5 lines
Anyway I searched for suitable items in linux-menuconfig but the name of the menu could be different... Is there a table where each
CONFIG_item is translated into the linux-menuconfig one? There are so many options one cannot try in a random way :-)
The best way in this case is to open the linux-menuconfig, type / (slash) followed by a search string, for example VIDEOBUF_GEN. It should show you at least one match, along with more details about:
- where is it in the menu structure
- which options does it depend on (and what is the current value of these options, indicated with [=y], [=n] etc.
This should give you enough info to be able to select the option correctly.
Best regards,
Thomas
Il 14/10/2013 16:02, Thomas De Schampheleire ha scritto:
Quoted 7 lines
The best way in this case is to open the linux-menuconfig, type / (slash) followed by a search string, for example
VIDEOBUF_GEN. It should show you at least one match, along with more details about: - where is it in the menu structure - which options does it depend on (and what is the current value of these options, indicated with [=y], [=n] etc. This should give you enough info to be able to select the option correctly.
Done!
It compiled successfully without any warning.
However on the target it shows again some errors when trying to load:
s2253: no symbol version for videobuf_streamoff
s2253: Unknown symbol for videobuf_streamoff (err -22) .
.
Because they relies upon the same VIDEOBUF_GEN I bet there was something else to configure, a part the option in the kernel config.
Thanks for your patience!
Mark
Il 14/10/2013 17:23, Marco Trapanese ha scritto:
Quoted 4 lines
However on the target it shows again some errors when trying to load:
s2253: no symbol version for
videobuf_streamoff
s2253: Unknown symbol forvideobuf_streamoff(err -22)
Oh dear! That was the old file!
The real problem is my package isn't show in the menuconfig anymore! The doc says it could be due to unmet dependencies.
make sensoray2253-show-depends
linux libv4l
make sensoray2253-depends
make: Nothing to be done for `sensoray2253-depends'.
(I've already compiled before)
Still is not shown in menuconfig.
Perhaps I should clean all and rebuild everything? I'm afraid it doesn't fix because if I cannot select my package it will rebuild everything but that package, won't it?
Mark
Dear Marco Trapanese,
Quoted 10 lines · Marco Trapanese
Oh dear! That was the old file!
The real problem is my package isn't show in the menuconfig anymore! The doc says it could be due to unmet dependencies.make sensoray2253-show-depends
linux libv4lmake sensoray2253-depends
make: Nothing to be done for `sensoray2253-depends'.
Quoted 6 lines
(I've already compiled before)
Still is not shown in menuconfig.Perhaps I should clean all and rebuild everything? I'm afraid it doesn't fix because if I cannot select my package it will rebuild everything but that package, won't it?
If you don't post the Config.in and .mk file of your package, there's nothing we can do to help you on this.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Quoted 3 lines
If you don't post the Config.in and .mk file of your package, there's nothing we can do to help you on this.
Hi Thomas,
I repost the content of the files here:
Config.in
config BR2_PACKAGE_SENSORAY2253
bool "sensoray2253"
depends on BR2_LINUX_KERNEL
depends on BR2_LIBV4L
help
Kernel module for Sensoray 2253
http://it.sensoray.com/products/2253.htm
sensoray2253.mk
################################################################################
#
# sensoray2253 # ################################################################################
SENSORAY2253_VERSION = 1.2.6SENSORAY2253_SOURCE = sdk_x53_linux_$(SENSORAY2253_VERSION).tar.bz2 SENSORAY2253_SITE = http://it.sensoray.com/downloads/SENSORAY2253_DEPENDENCIES = linux libv4l
define SENSORAY2253_CONFIGURE_CMDS
$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D)/driver clean
endef
define SENSORAY2253_BUILD_CMDS
$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D)/driver modules
endef
define SENSORAY2253_INSTALL_TARGET_CMDS
$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D)/driver
modules_install
endef
$(eval $(generic-package))
sensoray2253-deprecated.patch (just few lines)
diff -purN sensoray2253-1.2.6.orig/driver/s2253.c sensoray2253-1.2.6/driver/s2253.c
--- sensoray2253-1.2.6.orig/driver/s2253.c 2013-06-21
17:48:17.000000000 +0200
+++ sensoray2253-1.2.6/driver/s2253.c 2013-10-14 10:08:23.237612305 +0200
@@ -2498,8 +2498,8 @@ static int vidioc_queryctrl(struct file
//V4L2_CID_AUDIO_MUTE,
V4L2_CID_HFLIP,
V4L2_CID_VFLIP,
- V4L2_CID_HCENTER,
- V4L2_CID_VCENTER,
+ V4L2_CID_PAN_RESET,
+ V4L2_CID_TILT_RESET,
S2253_CID_DFLIP,
S2253_CID_INTERPOLATE,
S2253_CID_GPI,
@@ -2635,10 +2635,10 @@ ctrl_next:
case V4L2_CID_VFLIP:
v4l2_ctrl_query_fill(ctrl, 0, 1, 1, 0);
break;
- case V4L2_CID_HCENTER:
+ case V4L2_CID_PAN_RESET:
v4l2_ctrl_query_fill(ctrl, -256, 255, 1, 0);
break;
- case V4L2_CID_VCENTER:
+ case V4L2_CID_TILT_RESET:
v4l2_ctrl_query_fill(ctrl, -128, 127, 1, 0);
break;
case V4L2_CID_PRIVATE_COLORFILTER:
@@ -2856,13 +2856,13 @@ static int vidioc_try_ext_ctrls(struct f
else if (ctrl->value > 100)Dear Marco Trapanese,
Quoted 4 lines · Marco Trapanese
config
BR2_PACKAGE_SENSORAY2253
bool "sensoray2253"
depends onBR2_LINUX_KERNEL
depends onBR2_LIBV4L
This Config.in option does not exist, so there is no chance for it to ever be enabled, and therefore your package will never be visible.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com