NessieDVB::Forum

... talks ...

[EN] Compiling vTuner on Raspberry Pi (RPi) Raspbia

Everything except all above (config:vtuner,config:multicast,config:DLNA and config:network)

[EN] Compiling vTuner on Raspberry Pi (RPi) Raspbia

Postby mebepi » Thu Aug 02, 2012 9:54 pm

Compilation vTuner for Raspberry Pi (RPi) Raspbian.

Raspbian doesn't provide an out-of-the-box package with linux-headers so we need to build our own.
I find this thread that help me a lot:

https://www.grendelman.net/wp/compiling ... pberry-pi/

Code: Select all
cd
wget --no-check-certificate https://www.grendelman.net/files/raspi/Module.symvers


Installing compilation environment:

Code: Select all
sudo apt-get update
sudo apt-get -y install build-essential mercurial cvs subversion libncurses-dev
sudo apt-get -y install cmake dialog autoconf libtool flex gettext


Thoses packages are enough to complete this tuto, tested on this image:
http://downloads.raspberrypi.org/images ... spbian.zip

Please be carefull the value: c6851e9 (see below) is changing daily so you need to adapt it towards the value that you will get when following this tuto.

Code: Select all
cd /usr/src
sudo wget -O raspberrypi-linux-`uname -r`.tar.gz https://github.com/raspberrypi/linux/tarball/rpi-patches
sudo tar xvzf raspberrypi-linux-`uname -r`.tar.gz
sudo ln -s /usr/src/raspberrypi-linux-c6851e9 /lib/modules/`uname -r`/build
cd /usr/src/raspberrypi-linux-c6851e9
sudo sh -c 'zcat /proc/config.gz  > .config'
sudo sed -i 's/EXTRAVERSION =.*/EXTRAVERSION = +/' Makefile
sudo cp ~/Module.symvers .
sudo make oldconfig
sudo make modules_prepare


Create a symlink to allow stressless vtuner compilation.

Code: Select all
sudo ln -s /usr/src/raspberrypi-linux-c6851e9/ /usr/src/3.1.9+
cd
hg clone https://code.google.com/p/vtuner.linux-driver/


Compiling and installing the kernel driver:

Code: Select all
cd vtuner.linux-driver
make clean
make
modinfo vtunerc.ko
sudo mkdir /lib/modules/`uname -r`/misc
sudo cp vtunerc.ko /lib/modules/`uname -r`/misc
sudo depmod -a
sudo rmmod vtunerc
sudo modprobe vtunerc


Giving lower access right to dvb device:

Create a file: /etc/udev/rules.d/15-dvb.rules

Containing:

Code: Select all
sudo nano /etc/udev/rules.d/15-dvb.rules


SUBSYSTEM=="dvb", ACTION=="add", MODE="0666"


Building the vtuner applications:

Code: Select all
cd
hg clone https://code.google.com/p/vtuner.apps/
cd vtuner.apps


Create the file ~/vtuner.apps/Make.config as follow:

Code: Select all
nano ~/vtuner.apps/Make.config


# define the CC for target arm
CC-arm=gcc
STRIP-arm=strip
INCLUDE-arm=-I/usr/src/3.1.9+


In order to have vtuner properly compiled you need to define the file ~/vtuner.apps/build/arm/Makefile as follow:

Code: Select all
mv ~/vtuner.apps/build/arm/Makefile ~/vtuner.apps/build/arm/Makefile.ori
nano ~/vtuner.apps/build/arm/Makefile


Code: Select all
ARCH=arm
-include ../../Make.config

CC=$(CC-$(ARCH))
CXX=$(CXX-$(ARCH))
CFLAGS=-fPIC -DHAVE_DVB_API_VERSION=5 $(INCLUDE-$(ARCH)) $(DBGFLAGS)
LDFLAGS=-lpthread -lrt
DRIVER=vtuner-dvb-3
STRIP=$(STRIP-$(ARCH))

all: ../../dist/$(ARCH)/vtunerd.$(ARCH) ../../dist/$(ARCH)/vtunerc.$(ARCH)
   $(STRIP) ../../dist/$(ARCH)/vtunerd.$(ARCH) ../../dist/$(ARCH)/vtunerc.$(ARCH)
   

-include ../../Make.rules
   
vtuner-dvb-3.o: ../../vtuner-dvb-3.c ../../vtuner-dvb-3.h
   $(CC) $(CFLAGS) -c -o vtuner-dvb-3.o ../../vtuner-dvb-3.c



With the default one only vtunerd.arm is compiled, we don't have vtunerc.arm and vtunerc.arm is the file that we need.

Starting compiling

Code: Select all
cd
cd ./vtuner.apps
make -C ./build/arm/ all


Resulting files will be in: ~/vtuner.apps/dist/arm/

And be called: vtunerc.arm and vtunerd.arm

If you follow this tuto from the beginning you are now able to call vtunerc to attach to your NessieDVB tuners:

Code: Select all
sudo ~/vtuner.apps/dist/arm/vtunerc.arm -f S2


Other usefull references
http://wiki.nessiedvb.org/wiki/doku.php?id=vtuner_mode
https://www.grendelman.net/wp/cross-compiling-kernel-modules-for-raspbian/

In attachement you will find the executable files mentionned in this post (for people that don't want to compile) and the configuration files used for the compilation.

Mebepi
Attachments
vTuner-RPi-kernel-3.1.9+.tgz
(145.1 KiB) Downloaded 986 times
Last edited by mebepi on Tue Aug 28, 2012 12:13 pm, edited 3 times in total.
mebepi
 
Posts: 13
Joined: Sat Jan 14, 2012 3:36 pm

Re: [EN] Compiling vTuner on Raspberry Pi (RPi) Raspbia

Postby ales » Sat Aug 04, 2012 12:12 am

This is very interesting post. I've already (today) ordered RPI to test it - I hope I'll test it within 2 weeks.

The Makefile looks ok, I think it was not intended from original author to have vtuner client on arm CPU.

Once more, great work :)

Ales
ales
 
Posts: 24
Joined: Tue May 31, 2011 9:41 am

Re: [EN] Compiling vTuner on Raspberry Pi (RPi) Raspbia

Postby mebepi » Sat Aug 04, 2012 8:09 pm

Hi,

Thanks I should make some tests now to see if compilation is really working as expected.
The problem with the RPi is that they didn't licence MPEG-2 on it, so unfortunately there is no MPEG-2 hardware decoding (even if the hardware is capable of).

Mebepi

P.S.: I hope that you order yours from Farnell/element 14 because RS has a huge backlog.
mebepi
 
Posts: 13
Joined: Sat Jan 14, 2012 3:36 pm

Re: [EN] Compiling vTuner on Raspberry Pi (RPi) Raspbia

Postby hop » Sun Aug 05, 2012 10:19 am

mebepi wrote:Hi,

Thanks I should make some tests now to see if compilation is really working as expected.

Please check if you are using vtuner driver 1.2p3 which has memory leak fix built-in.

The problem with the RPi is that they didn't licence MPEG-2 on it, so unfortunately there is no MPEG-2 hardware decoding (even if the hardware is capable of).

Is it the same valid for h264 decoding as well? I gues so, unfortunatelly.

/Honza
hop
 
Posts: 86
Joined: Tue May 31, 2011 12:36 am

Re: [EN] Compiling vTuner on Raspberry Pi (RPi) Raspbia

Postby mebepi » Mon Aug 06, 2012 3:01 pm

Hi,

About the driver I use the one in the main branch (like described in the tutorial), so if I need to used another source/sub-branch please let me know. The tuto is the exact description on how I build vTuner driver and apps.

And about raspeberry.org, they pay licences for MPEG.4 and X.264 but not MPEG-2. :(

Mebepi
Last edited by mebepi on Tue Sep 20, 2016 7:21 pm, edited 1 time in total.
mebepi
 
Posts: 13
Joined: Sat Jan 14, 2012 3:36 pm

Re: [EN] Compiling vTuner on Raspberry Pi (RPi) Raspbia

Postby hop » Mon Aug 06, 2012 6:24 pm

mebepi wrote:Hi,

About the driver I use the one in the main branch (like described in the tutorial), so if I need to used another source/sub-branch please let me know.

No no, the source is correct. I only wanted to note that some fresh patch
was added there lately, so the repo update is recommended.

The tuto is the exact description on how I build vTuner driver and apps.

Yeh, nice step-by-step. Thanks for you work.

And about raspeberry.org, they pay licences for MPEG.4 and X.264 but not MPEG-2. :(

I just found some software-based solution, what is, of course,
not what we need. I don't think it can be decoded fast enough.
Anyway, here is the link: http://www.youtube.com/watch?v=5BDZobLzsSA

/Honza
hop
 
Posts: 86
Joined: Tue May 31, 2011 12:36 am

Re: [EN] Compiling vTuner on Raspberry Pi (RPi) Raspbia

Postby mebepi » Sun Aug 26, 2012 9:11 am

Hi,

Great news! We can purchase a MPEG-2 licence now for our Raspberry Pi.

http://www.raspberrypi.org/archives/1839

Mebepi
mebepi
 
Posts: 13
Joined: Sat Jan 14, 2012 3:36 pm

Re: [EN] Compiling vTuner on Raspberry Pi (RPi) Raspbia

Postby hop » Sun Aug 26, 2012 6:58 pm

Oh, it is really great news!

Can you show me how much the MPEG2 license will cost?

Thx.
/Honza
hop
 
Posts: 86
Joined: Tue May 31, 2011 12:36 am

Re: [EN] Compiling vTuner on Raspberry Pi (RPi) Raspbia

Postby ales » Mon Aug 27, 2012 12:06 pm

License for MPEG-2 decoding costs 2.40 UKP. After paying the license with PAYPAL key arrived within one hour into my email box.
ales
 
Posts: 24
Joined: Tue May 31, 2011 9:41 am

Re: [EN] Compiling vTuner on Raspberry Pi (RPi) Raspbia

Postby ales » Mon Sep 10, 2012 11:41 am

So I've tested raspberry PI with vtuner driver acnd client. It works, but problems are with CPU - it seems not to be strong enough to display and decode HD channels.

As I've done many test the best solution seems to be:
latest XBian (0.7.1 - see http://forum.xbian.org/viewtopic.php?f=13&t=1182)
compiled vtunerc.ko and vtunerc.arm (I'm adding binaries for kernel 3.2.27+ for other enthusiasts)
vdr + streamdev plugin compiled inside RPI (I've used vanilla vdr-1.7.27 and vdr-streamdev 0.6.0 from http://projects.vdr-developer.org/proje ... mdev/files) - no patches
This combination was able to receive SD channels without problems.
Attachments
apps_arm.tgz
(29.26 KiB) Downloaded 980 times
vtunerc.ko.tgz
(9.09 KiB) Downloaded 1028 times
ales
 
Posts: 24
Joined: Tue May 31, 2011 9:41 am

Next

Return to rest

Who is online

Users browsing this forum: No registered users and 1 guest

cron