PIDVR-7: Configure FreeSat Hardware

Issue Information

Issue Type: Task
Priority: Major
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: PiDVR (PIDVR)
Resolution: Done (2014-11-06 21:25:39)
Labels: Drivers, DVBSKYS2, Hardware, M88DS3103,

Created: 2014-11-06 12:04:08
Time Spent Working

Connect and configure the Freesat Hardware

Hardware Details

- Manufacturer: DVBSky
- Model: S2
- Chipset: M88DS3103

System shows as connected

root@testpi:~# lsusb | grep Conexant
Bus 001 Device 004: ID 0572:6831 Conexant Systems (Rockwell), Inc.

Though none of the LEDs on the unit itself are on - the driver also loads a firmware image, so will probably find the power LED doesn't do anything until that point

Issue Links

Kernel Headers for Raspberry Pi
S960 Manufacturers Product Page
Toggle State Changes


Kernel version is 3.12.28

pi@testpi ~ $ uname -a
Linux testpi 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l GNU/Linux

So will need to build the V4L package
btasker added 'DVBSKYS2 Drivers Hardware' to labels
Decided as DVBSky actually have Linux support and provide drivers, better to use theirs

Get Kernel headers etc
root@testpi:/home/pi# apt-get update
root@testpi:/home/pi# apt-get install gcc-4.7 cpp-4.7 dkms
root@testpi:/home/pi# wget
root@testpi:/home/pi# dpkg -i linux-headers-3.12.28+_3.12.28+-2_armhf.deb

Install Driver
root@testpi:/home/pi# cd /usr/src
root@testpi:/usr/src# wget
root@testpi:/usr/src# tar xvzf media_build-bst-13-140619.tar.gz
root@testpi:/usr/src# cd media_build-bst-13
root@testpi:/usr/src/media_build-bst-13# wget
root@testpi:/usr/src/media_build-bst-13# unzip
root@testpi:/usr/src/media_build-bst-13# tar xvzf sit2.o.RPi.tar.gz
root@testpi:/usr/src/media_build-bst-13# tar xvzf sit2.o.RPi.dvbc.tar.gz 
root@testpi:/usr/src/media_build-bst-13# ./v4l/ # Seems to copy a file we need for make, without it make fails
root@testpi:/usr/src/media_build-bst-13# cp sit2.o.RPi v4l/
root@testpi:/usr/src/media_build-bst-13# cp sit2.o.RPi v4l/sit2.o
root@testpi:/usr/src/media_build-bst-13# cp sit2.o.RPi.dvbc v4l/
root@testpi:/usr/src/media_build-bst-13# make

The make takes quite a while to run, so I've left it to it for the time being.

Just seen the following warnings flash by

WARNING: could not find /usr/src/media_build-bst-13/v4l/.sit2.o.cmd for /usr/src/media_build-bst-13/v4l/sit2.o
WARNING: "dma_buf_export" [/usr/src/media_build-bst-13/v4l/videobuf2-dma-contig.ko] undefined!

The first relates to our module, which isn't great. Will let the compile finish and see if it actually causes any issues though.
The make has finally completed

root@testpi:/usr/src/media_build-bst-13# make install
root@testpi:/usr/src/media_build-bst-13# cd /lib/firmware/
root@testpi:/lib/firmware# wget
root@testpi:/lib/firmware# tar xvzf dvbsky-firmware.tar.gz 
root@testpi:/lib/firmware# mv dvbsky-firmware/* ./
root@testpi:/lib/firmware# reboot

Once the box comes back up, there should (hopefully) now be a /dev/dvb

root@testpi:/home/pi# ls /dev/sdb
ls: cannot access /dev/sdb: No such file or directory

It would seem that the V4L modules have compiled incorrectly

root@testpi:/home/pi# insmod /lib/modules/3.12.28+/kernel/drivers/media/dvb-frontends/sit2fe.ko 
Error: could not insert module /lib/modules/3.12.28+/kernel/drivers/media/dvb-frontends/sit2fe.ko: Invalid module format

Wondered if it was the use of the x86 specific script earlier, but turns out it doesn't do a huge amount.
OK, working on the assumption I've ballsed something up. Starting again, using slightly different sources this time

root@testpi:/usr/src/media_build-bst-13# make clean
root@testpi:/usr/src/media_build-bst-13# cd ..
root@testpi:/usr/src# rm -rf media_build-bst-13
root@testpi:/usr/src# tar xvzf media_build-bst-140128.tar.gz 
root@testpi:/usr/src# cd media_build-bst
root@testpi:/usr/src/media_build-bst# wget
root@testpi:/usr/src/media_build-bst# unzip 
root@testpi:/usr/src/media_build-bst# tar xvzf sit2.o.RPi.tar.gz 
root@testpi:/usr/src/media_build-bst# cp sit2.o.RPi v4l/sit2.o
root@testpi:/usr/src/media_build-bst# make && make install

Now I need to find something else to do while that runs :)

Whilst waiting for the new compile, figured would take a quick look at the issues from the previous one

root@testpi:/home/pi# modinfo /lib/modules/3.12.28+/kernel/drivers/media/dvb-frontends/sit2fe.ko 
filename:       /lib/modules/3.12.28+/kernel/drivers/media/dvb-frontends/sit2fe.ko
version:        1.00
license:        GPL
author:         Max Nibble <nibble.max@<Domain Hidden>>
description:    sit2 demodulator driver
vermagic:       3.12.28 preempt mod_unload modversions ARMv6 

root@testpi:/home/pi# uname -a
Linux testpi 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l GNU/Linux

Syslog shows

Nov  6 16:11:58 testpi kernel: [  247.383094] sit2fe: disagrees about version of symbol module_layout
Nov  6 16:17:06 testpi kernel: [  555.058068] sit2fe: disagrees about version of symbol module_layout
Nov  6 16:28:48 testpi kernel: [ 1257.375108] sit2fe: disagrees about version of symbol module_layout

Suggests this compile is going to end in the same result, so have killed it off for the time being

root@testpi:/usr/src/media_build-bst# cd /lib/modules/3.12.28+/build
root@testpi:/lib/modules/3.12.28+/build# mv Module.symvers Module.symvers.bkup
root@testpi:/lib/modules/3.12.28+/build# wget

Got the GitHub link by looking for the relevant version in Module.symvers' history (

Have done a make clean and just started make again
btasker changed status from 'Open' to 'In Progress'
Got the same as in the initial compile

make[3]: *** No rule to make target '/usr/src/media_build-bst/v4l/sit2.o', needed by '/usr/src/media_build-bst/v4l/msp3400.o'.  Stop.
Makefile:1230: recipe for target '_module_/usr/src/media_build-bst/v4l' failed
make[2]: *** [_module_/usr/src/media_build-bst/v4l] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-3.12.28+'

Was fixed previously by running the x86 build script but can't quite see how that could have fixed it as it copies a single module (which we wind up overwriting anyway),
Looking at it though, our make clean blew away the RPi module we copied in earlier

root@testpi:/usr/src/media_build-bst# cp sit2.o.RPi v4l/sit2.o
root@testpi:/usr/src/media_build-bst# make
Again, during MODPOST got

WARNING: could not find /usr/src/media_build-bst/v4l/.sit2.o.cmd for /usr/src/media_build-bst/v4l/sit2.o
WARNING: "dma_buf_export" [/usr/src/media_build-bst/v4l/videobuf2-dma-contig.ko] undefined!

Will see at the end if it makes any difference (assuming we've fixed the initial issue).

Starting to wish I'd cross-compiled rather than getting the Pi to do it, but it's a good chunk of the way through now.
btasker changed labels from 'DVBSKYS2 Drivers Hardware' to 'DVBSKYS2 Drivers Hardware M88DS3103'
root@testpi:/usr/src/media_build-bst# make install
root@testpi:/usr/src/media_build-bst# reboot
pi@testpi ~ $ ls /dev/dvb

We're good to go :)
btasker changed status from 'In Progress' to 'Resolved'
btasker added 'Done' to resolution
btasker changed status from 'Resolved' to 'Closed'