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

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/
Installing compilation environment:
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.
Create a symlink to allow stressless vtuner compilation.
Compiling and installing the kernel driver:
Giving lower access right to dvb device:
Create a file: /etc/udev/rules.d/15-dvb.rules
Containing:
Building the vtuner applications:
Create the file ~/vtuner.apps/Make.config as follow:
In order to have vtuner properly compiled you need to define the file ~/vtuner.apps/build/arm/Makefile as follow:
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
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:
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
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