[HowTo] Compile DVB Media Build drivers on RPi 3

Hi,

to compile DVB Media Build (media_build.git - Build system to compile media subsystem on legacy kernels) on osmc with kernel 4.9.29-8 (Raspberry Pi 3) you need to type the following commands:

sudo apt-get install git bzip2 make gcc patch patchutils libproc-processtable-perl -y
sudo apt-get install kernel-package rbp2-headers-4.9.29-8-osmc linux-source rbp2-source-4.9.29-8-osmc -y

git clone git://linuxtv.org/media_build.git
cd media_build
sudo tar -xjvf /usr/src/rbp2-source-4.9.29-8-osmc.tar.bz2
sudo rm -rf /lib/modules/4.9.29-8-osmc/build
sudo mv rbp2-source-4.9.29-8-osmc/ /lib/modules/4.9.29-8-osmc/build
sudo cp /boot/config-4.9.29-8-osmc /lib/modules/4.9.29-8-osmc/build/.config

cd /lib/modules/4.9.29-8-osmc/build
sudo make oldconfig && sudo make prepare
cd ~/media_build

sudo cp /usr/src/rbp2-headers-4.9.29-8-osmc/scripts/recordmcount /lib/modules/4.9.29-8-osmc/build/scripts/
sudo cp -r /usr/src/rbp2-headers-4.9.29-8-osmc/scripts/genksyms/ /lib/modules/4.9.29-8-osmc/build/scripts/
sudo cp -r /usr/src/rbp2-headers-4.9.29-8-osmc/scripts/mod /lib/modules/4.9.29-8-osmc/build/scripts/

./build
make install

Hope It is helpful for you guys.

Max

1 Like

Old topic. I know.
But really nice.

Just one question: is it really needed to

sudo make oldconfig && sudo make prepare

?

Wouldn’t be enough to install de headers and then link them to /lib/modules/uname -r/build ?
something like:
sudo apt-get install rbp2-headers-`uname -r`
sudo ln -s /usr/src/rbp2-headers-`uname -r` /lib/modules/`uname -r`/build

thanks