Hi all. Thanks to everyone so far for the work put towards getting these (now cheap) tuners working.
I've gotten one to work on a RPi 3B+, it took me a bit of digging around on this thread and around a few other places on the internet, so I've put together the following to benefit anyone else who is struggling. :)
I used a 64-bit LinuxMint host, others based on Debian should work with these instructions (Debian itself, Ubuntu, etc)
You may need to issue a few of the sudo'd commands on their own, else the next line may be accepted as a password, and fail.
Install a few things
sudo apt-get --force-yes install git bc tmux dcfldd build-essential libssl-dev
Start a tmux sesssion so you can reattach if you get disconnected (I'm working on a remote system).
tmux
Grab the image 2018-06-27-raspbian-stretch-lite.img from raspberrypi.org.
sudo losetup -P /dev/loop0 2018-06-27-raspbian-stretch-lite.img
mkdir ~/pikernel
mkdir ~/pikernel/boot
mkdir ~/pikernel/rootfs
sudo mount /dev/loop0p1 ~/pikernel/boot
sudo mount /dev/loop0p2 ~/pikernel/rootfs
cd ~/pikernel
git clone https://github.com/raspberrypi/tools ~/pikernel/tools
echo PATH=\$PATH:~/pikernel/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin >> ~/.bashrc
source ~/.bashrc
git clone --depth=1 -b rpi-4.16.y https://github.com/raspberrypi/linux.git
cd linux
KERNEL=kernel7
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs
sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=~/pikernel/rootfs modules_install
sudo cp ~/pikernel/boot/$KERNEL.img ~/pikernel/boot/$KERNEL-backup.img
sudo cp arch/arm/boot/zImage ~/pikernel/boot/$KERNEL.img
sudo cp arch/arm/boot/dts/*.dtb ~/pikernel/boot/
sudo cp arch/arm/boot/dts/overlays/*.dtb* ~/pikernel/boot/overlays/
sudo cp arch/arm/boot/dts/overlays/README ~/pikernel/boot/overlays/
sudo wget http://palosaari.fi/linux/v4l-dvb/firmware/MN88472/02/latest/dvb-demod-mn88472-02.fw -O ~/pikernel/rootfs/lib/firmware/dvb-demod-mn88472-02.fw
sync
sudo umount ~/pikernel/boot
sudo umount ~/pikernel/rootfs
sudo losetup -d /dev/loop0
You will now have a modified image with kernel 4.16.18-v7+ and the demodulator firmware.
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.16.18-v7+ #1 SMP Tue Aug 28 19:18:56 BST 2018 armv7l GNU/Linux
pi@raspberrypi:~ $ lsusb
Bus 001 Device 004: ID 045e:02d5 Microsoft Corp. Xbox One Digital TV Tuner
Bus 001 Device 005: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Now write to your SD card. This assumes your card reader appears at /dev/mmcblk0, like mine, otherwise change the path.
sudo dcfldd if=~/2018-06-27-raspbian-stretch-lite.img of=/dev/mmcblk0
sync
Remove the card and put it in to the Pi.
Install tvheadend (now remoted to the Pi)
sudo apt-get install dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
echo "deb https://dl.bintray.com/mpmc/deb raspbianstretch stable-4.2" | sudo tee /etc/apt/sources.list.d/tvheadend.list
sudo apt-get update
sudo apt-get --force-yes install tvheadend
sudo apt-get clean
Prevent the kernel from being 'updated' back to 4.14 (thanks Zadolux)
sudo apt-mark hold raspberrypi-bootloader && sudo apt-mark hold raspberrypi-kernel
This works for me on a Pi 3+, but the same image should work on Pi 2, 3, and CM3.
Bear in mind the 4.16 Pi Kernel is WIP and you may encounter issues
Potential issue with networking instability; I had issues with network traffic stalling (SMB, SSH, SCP, watching recordings etc). Adding the following to
/etc/rc.local
fixed this for me, it uses the CPU for network-based checksums instead of offloading this to the ethernet adapter hardware:
ethtool --offload eth0 rx off tx off
...where
eth0
is the name of the network adapter.
Also, I have a premade image (375MB) of the above if anyone has somewhere I can put it.
The forum implied I can attach a file up to 488MB, but that might not actually be too welcome.
[EDIT] 2018-10-07 Added build-essential and libssl-dev as required packages prior to building
[EDIT] 2018-10-27 Added a note about networking issues and disabling hardware-based checksumming.
[EDIT] 2018-10-29 Added instructions to prevent the kernel being reverted to 4.14 by updating.