Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Including dvb-s2 (usb) v4l to kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
linuxfluesterer
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jan 2016
Posts: 127
Location: Germany

PostPosted: Wed Oct 03, 2018 8:58 pm    Post subject: [Solved] Including dvb-s2 (usb) v4l to kernel Reply with quote

Hallo friends.
I'm using an actual Gentoo with Systemd / Desktop and Plasma 5.13.5 with Kernel 4.18.5 and I'm rather content with it.
So I decided to make this my main system at home.
On my previous main system, which I run with Sabayon Linux, which is based on binary Gentoo packages, I also have a Plasma with Kernel 4.18.x.
The point is, on my Sabayon I am using and running a USB-DVB-S2 device which appears in
Code:
dmesg
[    6.038082] ts2020 7-0060: Montage Technology TS2022 successfully identified
[    6.038102] usb 1-3.2: DVB: registering adapter 0 frontend 0 (Montage Technology M88DS3103)...
[    6.038105] dvbdev: dvb_create_media_entity: media entity 'Montage Technology M88DS3103' registered.
[    6.066014] Registered IR keymap rc-tt-1500
[    6.066056] rc rc0: TechnoTrend TT-connect S2-4600 as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.2/rc/rc0
[    6.066097] input: TechnoTrend TT-connect S2-4600 as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.2/rc/rc0/input18
[    6.066148] dvb-usb: schedule remote query interval to 250 msecs.
[    6.066151] dw2102: su3000_power_ctrl: 0, initialized 1
[    6.066152] dvb-usb: TechnoTrend TT-connect S2-4600 successfully initialized and connected.
[    6.066187] usbcore: registered new interface driver dw2102



On my Gentoo system instead,I copied some files into /lib/firmware directory, and then after also some trials in settings of kernel (menuconfig), I only received this:
Code:
[  788.472651] usb 1-3.2: new high-speed USB device number 6 using xhci_hcd
[  788.561454] usb 1-3.2: New USB device found, idVendor=0b48, idProduct=3011, bcdDevice= 0.00
[  788.561460] usb 1-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  788.561464] usb 1-3.2: Product: dvb-s2
[  788.561468] usb 1-3.2: Manufacturer: geniatech
[  788.561471] usb 1-3.2: SerialNumber: 000000000232


So my questions are, pls:
How do I manually integrate video4linux / v4l into my kernel?
How do I achieve that my usb-dvb-s2 adapter is recognized by the kernel when plugged in?
What does it need to autoload the firmware?

In short: What do I need to do to receive the same messages and usable status for my USB-DVB-S2 like I have on my Sabayon?

Thank you very much in advance!

-Linuxfluestuerer


Last edited by linuxfluesterer on Sat Oct 06, 2018 7:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12951

PostPosted: Thu Oct 04, 2018 12:59 am    Post subject: Reply with quote

Are you sure that your Gentoo kernel is configured for DVB? Please pastebin both kernel configurations and full dmesg from both kernels.
Back to top
View user's profile Send private message
linuxfluesterer
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jan 2016
Posts: 127
Location: Germany

PostPosted: Thu Oct 04, 2018 11:35 am    Post subject: Reply with quote

Hu wrote:
Are you sure that your Gentoo kernel is configured for DVB? Please pastebin both kernel configurations and full dmesg from both kernels.


Thank you for reply!
I'm not sure of it. Here is my dmesg:
https://paste.pound-python.org/show/f4tMRAkXgeYUK0ghqxAD/

and here is my actual kernel .config:
https://paste.pound-python.org/show/UrTIbUfp4akK6XyG3wzU/

In between I have searched around and found this:
https://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers
and all I understand is, that when I download the (complete) v4l git, and start to create it with
Code:
./build

then I would receive a big bunch of files (kernel files?) with a size of more than 1 GByte.
But I just need just few drivers for my device.
On my Sabayon I found a file I downloaded from internet some years ago (but don't know, what procedure I made to make my dvb-s2 work)
and the following website:
https://www.linuxtv.org/wiki/index.php/TechnoTrend_TT-connect_S2-4600

I do not understand the connection between kernel configuration plus separate drivers plus firmware.
In addition too, the devices names are not clearly to be determinable to a hardware producer or configuration name in .config file.
I assume, the correct module name of the device must be set in .config file and the matching firmware must be copied into the /lib64/firmware directory.
In theory...
What else must be set (v4l, dvb_usb, multimedia?) and where I can guess only.

-Linuxfluesterer
Back to top
View user's profile Send private message
linuxfluesterer
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jan 2016
Posts: 127
Location: Germany

PostPosted: Thu Oct 04, 2018 2:23 pm    Post subject: Reply with quote

I have been searching some more for differences between my Gentoo and my Sabayon.
On my Sabayon I receive the following results for the phrase dvb
Code:
lsmod|grep dvb
dvb_usb_dw2102         69632  0
dvb_usb                28672  1 dvb_usb_dw2102
dvb_core              122880  3 m88ds3103,dvb_usb,dvb_usb_dw2102
rc_core                36864  4 dvb_usb,dvb_usb_dw2102,rc_tt_1500
media                  36864  2 dvb_usb,dvb_core


And for my Gentoo I receive:
Code:
lsmod|grep dvb

...nothing....

I also checked for the expression 2102 in the linux sources (/usr/src/linux) on the Gentoo system.
There is no entry for this., while rc_tt_1500 module I have found in the sources.
How can I add the missing kernel module sources to compile the kernel correctly with the missing modules?

-Linuxfluesterer
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12951

PostPosted: Fri Oct 05, 2018 1:47 am    Post subject: Reply with quote

You mean there are no hits like this?
Code:
$ git grep 2102 -- '*Makefile*'
drivers/media/usb/dvb-usb/Makefile:obj-$(CONFIG_DVB_USB_DW2102) += dvb-usb-dw2102.o
If you have no dvb related modules loaded, that would explain your problem. You must use make menuconfig or equivalent to enable the Kconfig symbols corresponding to the kernel features you want. You could also try comparing the two kernel configuration files. Restrict the scope of your search by comparing only lines containing relevant symbols, such as those that contain DVB. I cannot do this for you yet, because you posted only the Gentoo kernel configuration, but not the Sabayon one.
Back to top
View user's profile Send private message
linuxfluesterer
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jan 2016
Posts: 127
Location: Germany

PostPosted: Fri Oct 05, 2018 2:49 pm    Post subject: Reply with quote

Hu wrote:
You mean there are no hits like this?
Code:
$ git grep 2102 -- '*Makefile*'
drivers/media/usb/dvb-usb/Makefile:obj-$(CONFIG_DVB_USB_DW2102) += dvb-usb-dw2102.o
If you have no dvb related modules loaded, that would explain your problem. You must use make menuconfig or equivalent to enable the Kconfig symbols corresponding to the kernel features you want. You could also try comparing the two kernel configuration files. Restrict the scope of your search by comparing only lines containing relevant symbols, such as those that contain DVB. I cannot do this for you yet, because you posted only the Gentoo kernel configuration, but not the Sabayon one.


Thanks again for reply
I do not have a git repository of kernel source. I just have gentoo-sources-4.18.5.
When I enter your command, I just receive:
Code:
git grep 2102 -- '*Makefile*'
fatal: Kein Git-Repository (oder irgendein Elternverzeichnis): .git

means something like No Git repository or parent directory else

For fun, I checked the sources directory /usr/src/linux with the following result:
Code:
find /usr/src/linux -iname "*2102*" -ls
find /usr/src/linux-4.18.5-gentoo -iname "*2102*" -ls
   273817      4 -rw-r--r--   1  root     root          279 Aug 12 22:41 /usr/src/linux-4.18.5-gentoo/drivers/media/usb/dvb-usb/dw2102.h
   273818     60 -rw-r--r--   1  root     root        59400 Aug 12 22:41 /usr/src/linux-4.18.5-gentoo/drivers/media/usb/dvb-usb/dw2102.c
   277073     28 -rw-r--r--   1  root     root        27779 Aug 12 22:41 /usr/src/linux-4.18.5-gentoo/drivers/input/touchscreen/rohm_bu21023.c


When I replace the complete section Digital TV USB Devices in my actual Gentoo .config file by the complete section extracted from my Sabayon .config file,
then the entry: CONFIG_DVB_USB_DW2102=m is also inserted in the changed .config file.
Then, when I call:
Code:
make menuconfig
I am not sure, where to find the matching entry for DW2102.
However, when I leave this menu and check again the .config file with midnight commander then the line, which should contain CONFIG_DVB_USB_DW2102=m" is no more existing. It seems that maybe make menuconfig has deleted this line and some other more.

I am confused by that. Because finally, there is no module built with name DW2102. So my dvb-s2 device is still not possible to be recognized. I assume, the complete dvb_usb kernel modules are not generated for what reason ever. I only see the directory /lib/modules/4.18.5-gentoo_tuxedo_dvb/kernel/drivers/media/usb/dvb-usb-v2.

For completion, here is my Sabayon .config file:
https://paste.pound-python.org/show/98HPjxl1Jd6YkiUVxVHj/

-Linuxfluesterer
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6552
Location: Saint Amant, Acadiana

PostPosted: Fri Oct 05, 2018 3:00 pm    Post subject: Reply with quote

Code:
make nconfig


Use function keys, they are self explanatory.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
linuxfluesterer
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jan 2016
Posts: 127
Location: Germany

PostPosted: Fri Oct 05, 2018 4:04 pm    Post subject: Reply with quote

Jaglover wrote:
Code:
make nconfig


Use function keys, they are self explanatory.


I tried. I changed into directory /usr/src/linux then started
Code:
make nconfig
,
imported the Sabayon .config, and hurrah, I could search for the symbol 2102.
Then I saved this file as new .config file and started:
Code:
make -j8 && make modules_install

and just after around 52 seconds the process was finished. Too fast...
Then I scrolled up for specific messages and found the following:
Code:
  ./scripts/gen_initramfs_list.sh: Cannot open '/usr/share/v86d/initramfs'
make[1]: *** [usr/Makefile:57: usr/initramfs_data.cpio.gz] Fehler 1
make: *** [Makefile:1029: usr] Fehler 2
make: *** Es wird auf noch nicht beendete Prozesse gewartet....

These lines were followed by some more lines. But in compiling kernels before (I mean without I began to integrate dvb into kernel), I never had such error messages or problems.
In between I compiled around 15 kernels (to learn and for fun). Not many, but these procedures worked, so that I could boot fine with the new kernel then.
---> I do not use initramfs with Gentoo! I boot with vmlinuz file instead in /boot/grub/grub.cfg. I do not use genkernel to create a kernel and I would not intend to, if not really necessary.

-Linuxfluesterer
Back to top
View user's profile Send private message
linuxfluesterer
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jan 2016
Posts: 127
Location: Germany

PostPosted: Fri Oct 05, 2018 7:23 pm    Post subject: Reply with quote

Hallo friends.
Some problems are solved.
I unset the creation of initramfs what leads into a full compilation of the kernel with creation of all modules, which are explicitly checked as m in the Sabayon .config.
That is because I imported this .config file into Gentoo and just changed local extension and hostname.
It took a long time to compile the new kernel and all the (new) modules).

A reboot with this new kernel leaded to success with recognizing my dvb-s2 device and changing into correct recognition.
Then (I had some trouble because kaffeine did not recognize my dvb) I just had to reemerge kaffeine with (+)dvb USE flag.
Now, my kaffeine is working fine with my preset Sat channels (Astra-19E).

So far, so good. The price is high. Now my boot procedure is around 50 seconds and longer against around 20 seconds with the old, lean configuration file (.config).

*** Just a question...
Is it possible that I did not have a DVB_USB part or section when I used my old .config file because I did not have emerged virtual/linuxtv-dvb-headers?
Now it is installed on my system, but It's installation time on my system is just 40 minutes ago. And I did not install by myself.

If so, I would make a new try with the lean config file from yesterday and then only set the modules for my dvb-s2 device.

This thread is solved for I would say 70% because the amount of created modules including the long compilation time for a new kernel is too long, not to forget the long booting time also.

So, if you know the answer to my question *** , pls let me know!

Anyhow, thank you very much for help!

-Linuxfluesterer
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12951

PostPosted: Sat Oct 06, 2018 12:39 am    Post subject: Reply with quote

linuxfluesterer wrote:
I do not have a git repository of kernel source. I just have gentoo-sources-4.18.5.
You can use regular grep on an installed source tree. I like git grep for this purpose because it can search any commit I have fetched, not just the active kernel I use. This lets me check settings in any of the LTS kernels, in tip, and in the latest Linus release, without needing to install full unpacked sources of all those versions.
linuxfluesterer wrote:
When I replace the complete section Digital TV USB Devices in my actual Gentoo .config file by the complete section extracted from my Sabayon .config file,
then the entry: CONFIG_DVB_USB_DW2102=m is also inserted in the changed .config file.
Then, when I call:
Code:
make menuconfig
I am not sure, where to find the matching entry for DW2102.
However, when I leave this menu and check again the .config file with midnight commander then the line, which should contain CONFIG_DVB_USB_DW2102=m" is no more existing. It seems that maybe make menuconfig has deleted this line and some other more.
Do not directly edit .config. In the general case, there are dependencies that the tools will handle for you. Direct editing can violate those dependencies, leading to weird build problems or, as here, the tool undoing your work when it normalizes the configuration.
linuxfluesterer wrote:
I changed into directory /usr/src/linux then started
Code:
make nconfig
,
imported the Sabayon .config, and hurrah, I could search for the symbol 2102.
Code:
  ./scripts/gen_initramfs_list.sh: Cannot open '/usr/share/v86d/initramfs'
make[1]: *** [usr/Makefile:57: usr/initramfs_data.cpio.gz] Fehler 1

But in compiling kernels before (I mean without I began to integrate dvb into kernel), I never had such error messages or problems.
You never used the Sabayon configuration before, either. Their configuration tries to generate an initramfs. You must use their initramfs or not import the part of their configuration that requests an initramfs.
linuxfluesterer wrote:
Is it possible that I did not have a DVB_USB part or section when I used my old .config file because I did not have emerged virtual/linuxtv-dvb-headers?
You may have lacked that section, but it would not be related to the virtual. The kernel build does not inspect your installed packages that way.
Back to top
View user's profile Send private message
linuxfluesterer
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jan 2016
Posts: 127
Location: Germany

PostPosted: Sat Oct 06, 2018 12:57 pm    Post subject: Reply with quote

Hallo...
When I tried to configure an older kernel with such a clean original gentoo-sources-4.18.5 with my lean .config file with
Code:
make menuconfig
then move down to menu:

Code:
 --- Multimedia support                                                                   │ │ 
  │ │                        *** Multimedia core support ***                                                    │ │ 
  │ │                  [ ]   Cameras/video grabbers support (NEW)                                               │ │ 
  │ │                  [ ]   Analog TV support (NEW)                                                            │ │ 
  │ │                  [ ]   Digital TV support (NEW)                                                           │ │ 
  │ │                  [ ]   AM/FM radio receivers/transmitters support (NEW)                                   │ │ 
  │ │                  [ ]   Software defined radio support (NEW)                                               │ │ 
  │ │                  [ ]   HDMI CEC support (NEW)                                                             │ │ 
  │ │                  [ ]   Enable advanced debug functionality on V4L2 drivers (NEW)                          │ │ 
  │ │                  [*]   Enable old-style fixed minor ranges on drivers/video devices                       │ │ 
  │ │                        *** Media drivers ***                                                              │ │ 
  │ │                  [*]   Media USB Adapters  ----                                                           │ │ 
  │ │                  [ ]   Media PCI Adapters  ----                                                           │ │ 
  │ │                        *** Supported MMC/SDIO adapters ***                                                │ │ 
  │ │                  < >   Cypress firmware helper routines (NEW)                                             │ │ 
  │ │                        *** Media ancillary drivers (tuners, sensors, i2c, spi, frontends) ***             │ │ 
  │ │                        Customise DVB Frontends  --->


In this menu I can set an asterisk at Media USB Adapters ---- and then I can press <Enter> and receive a new menu:
Code:
 --- Media USB Adapters                                                                   │ │ 
  │ │                                                                                                           │ │ 
  │ │

with no other entries... When I press any key like Y, N, M, <Enter> Arrow right - nothing happens.
In the Gentoo sources all dvb_usb source files I need are existing,
But I cannot select my device neither in
Code:
make menuconfig
nor in
Code:
make nconfig

But when I search for 2102 in menuconfig I receive this:
Code:
Symbol: DVB_USB_DW2102 [=n]                                                                                   │ 
  │ Type  : tristate                                                                                              │ 
  │ Prompt: DvbWorld & TeVii DVB-S/S2 USB2.0 support                                                              │ 
  │   Location:                                                                                                   │ 
  │     -> Device Drivers                                                                                         │ 
  │       -> Multimedia support (MEDIA_SUPPORT [=m])                                                              │ 
  │ (1)     -> Media USB Adapters (MEDIA_USB_SUPPORT [=y])                                                        │ 
  │           -> Support for various USB DVB devices (DVB_USB [=n])                                               │ 
  │   Defined at drivers/media/usb/dvb-usb/Kconfig:276                                                            │ 
  │   Depends on: USB [=y] && MEDIA_SUPPORT [=m] && MEDIA_USB_SUPPORT [=y] && I2C [=y] && MEDIA_DIGITAL_TV_SUPPOR │ 
  │   Selects: DVB_PLL [=n] && DVB_STV0299 [=n] && DVB_STV0288 [=n] && DVB_STB6000 [=n] && DVB_CX24116 [=n] && DV │ 


So, the simple question is: How can I set -> Support for various USB DVB devices (DVB_USB [=n]) to 'y' within menuconfig to select my dvb_usb device?

-Linuxfluesterer
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12951

PostPosted: Sat Oct 06, 2018 4:39 pm    Post subject: Reply with quote

You must enable the required dependencies first. The full statement in Kconfig is:
Code:
depends on DVB_CORE && USB && I2C && RC_CORE
Have you enabled all 4 of those symbols? From your output on the inner scope, I can see the answer to some of those.
  • DVB_CORE: unknown, but probably enabled if you made it this far
  • USB: enabled
  • I2C: enabled
  • RC_CORE: unknown, and a likely candidate for your problem
Back to top
View user's profile Send private message
linuxfluesterer
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jan 2016
Posts: 127
Location: Germany

PostPosted: Sat Oct 06, 2018 7:24 pm    Post subject: Reply with quote

Hu wrote:
You must enable the required dependencies first. The full statement in Kconfig is:
Code:
depends on DVB_CORE && USB && I2C && RC_CORE
Have you enabled all 4 of those symbols? From your output on the inner scope, I can see the answer to some of those.
  • DVB_CORE: unknown, but probably enabled if you made it this far
  • USB: enabled
  • I2C: enabled
  • RC_CORE: unknown, and a likely candidate for your problem


Yes, you made my day, thank you! Indeed, it was the unsolved RC_CORE . I have checked for the symbol 2102 before, but the symbol RC_CORE was out of sight right on the window and I did not consider to scroll.
And, now I got another view how to find the symbols, though I'm not surely perfect in that.
But this knowledge helps me to understand about Gentoo and compiling kernels also.

I will mark this thread as [Solved].

Thank your for your support!

-Linuxfluesterer
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum