Compiling new kernel to support usb dvb devices.

Discussion about U-Boot and the kernel.

Compiling new kernel to support usb dvb devices.

Postby dhead666 » Mon Aug 13, 2012 8:47 am

Hi.

I'm real ArchLinux newbie and Linux noob, all I wanted was to be able using my sheevaplug with usb dvb-t dongle and run vdr as pvr server.

After successfully installing ArchLinux and updating the system with pacman, the updated kernel version set to 3.1.10-9.
The problem is that my dvb-t dongle (it9135) doesn't recognized.
I thought that the fault was with the kernel version and updating it somehow (manual compiling, which I don't want to) would fix the issue, but also my old af9015 doesn't work.
After a quick look on the github repository https://github.com/archlinuxarm/PKGBUIL ... ood/config it seems that the drivers are not include at all.

Is the proper solution for this is to set
"CONFIG_DVB_USB_IT913X=y"
"CONFIG_DVB_USB_AF9015=y"
(and does "=m" means the driver isn't enable)
???
and then "makepkg" and "pacman -U" ?
Pogoplug Series 4 - Network Storage and Music Server: NFS/TVHeadend
Cubox-i2 - Applications Server: Lighttpd/CherryMusic/HTPCManager/Transmission/Couchpotato/SickBeard/OpenVPN
Samsung Chromebook: Chroach in ChromeOS
dhead666
 
Posts: 116
Joined: Sat Aug 11, 2012 10:25 pm

Re: Compiling new kernel to support usb dvb devices.

Postby hydro » Mon Aug 13, 2012 11:15 am

Just a few hints
$this->bbcode_list('1')
  • "m" means the driver is included as a module.
  • the config in the github repository is for linux-kirkwood, not linux
  • current linux package is 3.1.10-12
  • identify your DVB devices by their USB IDs as reported by lsusb
  • read the last lines of the output generated by dmesg after you inserted a device
  • If the kernel really does not support your devices your options are
    $this->bbcode_list('1')
  • report the issue at github repository
  • recompile the kernel
  • install v4l-dvb package
  • Here is an example that shows how to get the drivers from v4l-dvb repository, but only include the modules needed and here is how I had previously recompiled the kernel.
    VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
    hydro
     
    Posts: 210
    Joined: Wed Jun 15, 2011 2:03 pm
    Location: Germany

    Re: Compiling new kernel to support usb dvb devices.

    Postby dhead666 » Mon Aug 13, 2012 1:12 pm

    Thanks hydro, that was quick.

    The lsusb command shows info correctly on both af9015 and it9135,

    Output of dmesg "usb 1-1: new high speed USB device number 4 using orion-ehci" for both devices.
    I'm guessing no drivers for both of the devices.

    The odd thing is that the driver for af9015 should be included,
    so I run find command and was able to locate "dvb-usb-af9015.ko.gz" in "/usr/lib/modules/3.1.10-12-ARCH/",
    meaning I have kernel package 3.1.10-12 installed, but uname -r output 3.1.10-9, meaning the newer kernel isn't loaded to the system.
    Copying the new uImage (installed by the kernel package) to the correct location uBoot looks in made sure the correct kernel would be loaded.

    Now the af9015 driver loaded and shows by dmesg, manually adding the firmware file and the device seems to be usable (did a quick scan).

    My next goal will be to try having the it9135 working, I will surely follow your notes, Thanks.
    Pogoplug Series 4 - Network Storage and Music Server: NFS/TVHeadend
    Cubox-i2 - Applications Server: Lighttpd/CherryMusic/HTPCManager/Transmission/Couchpotato/SickBeard/OpenVPN
    Samsung Chromebook: Chroach in ChromeOS
    dhead666
     
    Posts: 116
    Joined: Sat Aug 11, 2012 10:25 pm

    Re: Compiling new kernel to support usb dvb devices.

    Postby hydro » Mon Aug 13, 2012 1:49 pm

    $this->bbcode_second_pass_quote('dhead666', '
    ')The lsusb command shows info correctly on both af9015 and it9135

    This only means someone added the vendor and device ID of your devices to /usr/share/hwdata/usb.ids. IMHO it's important to actually know these IDs, so please paste the output of lsusb, example
    $this->bbcode_second_pass_code('', '
    Bus 001 Device 008: ID 14aa:0221 WideView Technology Inc. WT-220U DVB-T dongle
    ')
    So I can verify the device is supported by the module dvb_usb_dtt200u (or find out the required module/kernel option)
    $this->bbcode_second_pass_code('', '
    $ modinfo dvb_usb_dtt200u | grep -i 14aa.*0221
    alias: usb:v14AAp0221d*dc*dsc*dp*ic*isc*ip*
    ')
    $this->bbcode_second_pass_quote('dhead666', '
    ')Output of dmesg "usb 1-1: new high speed USB device number 4 using orion-ehci" for both devices.
    I'm guessing no drivers for both of the devices.

    I'd usually agree, but not in this case:
    $this->bbcode_second_pass_quote('dhead666', '
    ')The odd thing is that the driver for af9015 should be included,
    so I run find command and was able to locate "dvb-usb-af9015.ko.gz" in "/usr/lib/modules/3.1.10-12-ARCH/",
    meaning I have kernel package 3.1.10-12 installed, but uname -r output 3.1.10-9, meaning the newer kernel isn't loaded to the system.

    You updated the kernel, but you didn't reboot, so all modules for your currently running kernel were removed and, of course, cannod be loaded, hence no support for your device or any other that needs to load a kernel module.
    $this->bbcode_second_pass_quote('dhead666', '
    ')Copying the new uImage (installed by the kernel package) to the correct location uBoot looks in made sure the correct kernel would be loaded.

    I don't know if this is necessary on the sheevaplug. On the DockStar it is not necessary, except for example you have a separate boot partition. I think only a reboot was needed.
    VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
    hydro
     
    Posts: 210
    Joined: Wed Jun 15, 2011 2:03 pm
    Location: Germany
    Top

    Re: Compiling new kernel to support usb dvb devices.

    Postby dhead666 » Mon Aug 13, 2012 2:23 pm

    Here's dmesg output
    $this->bbcode_second_pass_code('', 'Bus 001 Device 005: ID 15a4:9016 Afatech Technologies, Inc. AF9015 DVB-T USB2.0 stick
    Bus 001 Device 006: ID 048d:9006 Integrated Technology Express, Inc.')

    I had to copy the uImage to the separate boot partition (I run cmp between the new and the old files to make sure they aren't the same).
    After rebooting dmesg gives this output for af9015
    $this->bbcode_second_pass_code('', '
    [ 5584.890823] usb 1-1: new high speed USB device number 7 using orion-ehci
    [ 5585.412026] dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in cold state, will try to load a firmware
    [ 5585.416231] dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
    [ 5585.485297] dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in warm state.
    [ 5585.485710] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
    [ 5585.486444] DVB: registering new adapter (Afatech AF9015 DVB-T USB2.0 stick)
    [ 5585.489521] af9013: firmware version:4.95.0.0
    [ 5585.496154] DVB: registering adapter 0 frontend 0 (Afatech AF9013 DVB-T)...
    [ 5585.498643] tda18218: NXP TDA18218HN successfully identified.
    [ 5585.500281] Registered IR keymap rc-empty
    [ 5585.502053] input: IR-receiver inside an USB DVB receiver as /devices/platform/orion-ehci.0/usb1/1-1/rc/rc1/input3
    [ 5585.502462] rc1: IR-receiver inside an USB DVB receiver as /devices/platform/orion-ehci.0/usb1/1-1/rc/rc1
    [ 5585.502479] dvb-usb: schedule remote query interval to 500 msecs.
    [ 5585.502494] dvb-usb: Afatech AF9015 DVB-T USB2.0 stick successfully initialized and connected.')

    dmesg for it9135
    $this->bbcode_second_pass_code('', '[ 5733.980036] usb 1-1: new high speed USB device number 8 using orion-ehci
    [ 5734.140698] input: ITE Technologies, Inc. DVB-T TV Stick as /devices/platform/orion-ehci.0/usb1/1-1/1-1:1.1/input/input4
    [ 5734.141184] generic-usb 0003:048D:9006.0003: input: USB HID v1.01 Keyboard [ITE Technologies, Inc. DVB-T TV Stick] on usb-orion-ehci.0-1/input1')
    Pogoplug Series 4 - Network Storage and Music Server: NFS/TVHeadend
    Cubox-i2 - Applications Server: Lighttpd/CherryMusic/HTPCManager/Transmission/Couchpotato/SickBeard/OpenVPN
    Samsung Chromebook: Chroach in ChromeOS
    dhead666
     
    Posts: 116
    Joined: Sat Aug 11, 2012 10:25 pm

    Re: Compiling new kernel to support usb dvb devices.

    Postby hydro » Mon Aug 13, 2012 3:16 pm

    Okay, so you were obviously right about the missing kernel option CONFIG_DVB_USB_IT913X (I did a bit of searching in the v4l-dvb sources
    $this->bbcode_second_pass_code('', '
    $ grep -i -e 048d -e 9006 linux/drivers/media/dvb/dvb-core/dvb-usb-ids.h
    #define USB_VID_ITETECH 0x048d
    #define USB_PID_ITETECH_IT9135_9006 0x9006
    $ grep -R -l USB_VID_ITETECH | xargs grep -l -e USB_PID_ITETECH_IT9135_9006
    linux/drivers/media/dvb/dvb-usb/it913x.c
    linux/drivers/media/dvb/dvb-core/dvb-usb-ids.h
    $ find -type f -name Makefile | xargs grep "CONFIG.*it913x"
    ./linux/drivers/media/dvb/dvb-usb/Makefile:obj-$(CONFIG_DVB_USB_IT913X) += dvb-usb-it913x.o
    ./linux/drivers/media/dvb/frontends/Makefile:obj-$(CONFIG_DVB_IT913X_FE) += it913x-fe.o
    ')
    ). On current Arch Linux (x86_64) the module is present in the kernel (3.4.8) package and it supports the device
    $this->bbcode_second_pass_code('', '
    $ zgrep CONFIG_DVB_USB_IT913X /proc/config.gz
    CONFIG_DVB_USB_IT913X=m
    $ modinfo dvb-usb-it913x|grep -i "048d.*9006"
    alias: usb:v048Dp9006d*dc*dsc*dp*ic*isc*ip*
    ')

    Edit:
    Looks like the driver is not yet present in kernel 3.1, so option 1 and 2 may also require updating uBoot.

    If you choose option 3 and want to use my v4l-dvb package here are the minimum options
    $this->bbcode_second_pass_code('', '
    <M> Multimedia support --->
    [*] Digital TV support
    [*] Remote Controller support
    [*] DVB/ATSC adapters (NEW) --->
    <M> Support for various USB DVB devices
    <M> it913x driver
    ')
    VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
    hydro
     
    Posts: 210
    Joined: Wed Jun 15, 2011 2:03 pm
    Location: Germany

    Re: Compiling new kernel to support usb dvb devices.

    Postby dhead666 » Tue Aug 14, 2012 3:56 am

    Thanks,
    Right now I'm happy with my af9015,
    I'll surely try your v4l-dvb package next week.

    p.s I like your website (http://linux.bplaced.net, thanks for google translate),
    you should add a link in your signature.
    Pogoplug Series 4 - Network Storage and Music Server: NFS/TVHeadend
    Cubox-i2 - Applications Server: Lighttpd/CherryMusic/HTPCManager/Transmission/Couchpotato/SickBeard/OpenVPN
    Samsung Chromebook: Chroach in ChromeOS
    dhead666
     
    Posts: 116
    Joined: Sat Aug 11, 2012 10:25 pm


    Return to U-Boot/Kernel

    Who is online

    Users browsing this forum: No registered users and 8 guests