Linux Driver Package on Raspberry Pi
The Meinberg driver package for Linux can also be used on a Raspberry Pi. However, installation can be a bit tricky due to limitations of the Debian/Raspbian Linux image available at
https://www.raspberrypi.org/downloads/
In the example below this Raspbian image was used:
2014-06-20-wheezy-raspbian.zip
In order to be able to build any external kernel module for the running kernel the kernel sources and the kernel configuration matching exactly the running kernel need to be available on the build system.
Upgrade the Raspberry PI's Firmware to the Latest Version
This can eventually be skipped if the system must not be upgraded.
sudo apt-get update sudo apt-get upgrade
Eventually this also upgrades the kernel to the current version, e.g. to 3.18.8+ in this example.
Reboot the PI to activate the new firmware, then check the kernel version:
uname -r # --> 3.18.8+
Install the Kernel Sources
Manually downloading and configuring the kernel sources properly for the running kernel can be cumbersome for the Raspberry Pi.
Installing Kernel Headers via the Package Management
For newer kernels there may be a package with the required kernel headers available, which can easily be installed via the package management:
sudo apt-get install raspberrypi-kernel-headers
However, for older Raspbian versions this package may not be available, or an appropriate package may not yet be available for a very new kernel. See:
https://www.raspberrypi.org/documentation/linux/kernel/headers.md
Installing Kernel Headers from 'git'
There is a script called rpi-source
which can be used to look for, and install the kernel sources matching the running kernel. Detailed information on this script is available at
https://github.com/notro/rpi-source/wiki
Download the script and make the script file executable. Please note the command below should be one long line which may have been wrapped around here:
sudo wget https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source -O /usr/bin/rpi-source
Eventually we first need to make the rpi-source script executable:
sudo chmod +x /usr/bin/rpi-source
Make sure the package ncurses-devel
is installed which is eventually required to manage the kernel configuration:
sudo apt-get install ncurses-dev
Try running the rpi-source
script which eventually complains that the currently installed version of the gcc
compiler package doesn't match the gcc
version which has been used to build the kernel. E.g.:
rpi-source -v ERROR: gcc version check: mismatch between gcc (4.6.3) and /proc/version (4.8.3)
The rpi-source wiki page mentioned above explains details how different compiler versions can be installed in parallel, and one of them be selected to be used preferably.
Once the gcc
version is correct the script should download the kernel sources:
rpi-source -v
Usually the kernel config file .config
is created by the script, and make modules_prepare
is executed, so after this command has finished it should be possible to build extra driver packages matching the running kernel.
Download and Unpack the Driver Source Package
Download the current driver packagefrom the Meinberg website. In the command below the parameter –no-check-certificate
is used since the Meinberg web server now always uses SSL, and thus redirects to a https connection.
Unless wget
on the Pi has been provided with the root certificate of the GlobalSign Certification Authority, wget
will be unable to verify the SSL certificate used by the Meinberg web site, so either the root certificate needs to be provided, or wget
needs to be run with the –no-check-certificate
parameter:
wget --no-check-certificate https://www.meinbergglobal.com/download/drivers/mbgtools-lx-4.2.6.tar.gz
Please use the appropriate name of the current driver version. Unpack the driver source and change into the driver's base directory:
tar xvzf mbgtools-lx-4.2.6.tar.gz cd mbgtools-lx-4.2.6
Build and Install the Driver
Please refer to the README file in the driver package, or the Meinberg knowledge base article on the driver package for Linux.
If anything goes wrong, or doesn't work as explained above, please contact support@meinberg.de.
— Martin Burnicki martin.burnicki@meinberg.de 2019-02-12