Having trouble compiling/installing xbox DVB-t tuner driver

I’m a bit of a linux noob but currently have Pi-hole and tvheadend installed.

I’d like to get my cheap xbox one dvb-t tuner working but this means compiling the driver.

The method I found is:

sudo apt-get install raspberrypi-kernel-headers

sudo apt-get install libdigest-sha-perl make gcc git patch patchutils libproc-processtable-perl

git clone git://linuxtv.org/media_build.git
git clone --depth=1 https://github.com/trsqr/media_tree.git -b xboxone ./media
cd media_build
git reset --hard 9ccb87d
make dir DIR=../media
make distclean
sudo make install

cd /lib/firmware
sudo wget http://linuxtv.org/downloads/firmware/dvb-usb-dib0700-1.20.fw
sudo wget http://palosaari.fi/linux/v4l-dvb/firmware/MN88472/02/088b891ac9273ff8c6818fca27b24d81/dvb-demod-mn88472-02.fw

Sudo reboot now

But I get stuck after make distclean

root@DietPi:/media_build# make distclean
make -C /media_build/v4l distclean
make[1]: Entering directory '/media_build/v4l'
No version yet, using 4.14.30-v7+
rm -f *~ *.o *.ko .*.o.cmd .*.ko.cmd *.mod.c av7110_firm.h fdump \
	config-compat.h Module.symvers Module.markers modules.order \
	*.unsigned .*.ko.unsigned.cmd
make -C firmware clean
make[2]: Entering directory '/media_build/v4l/firmware'
rm -f ihex2fw
rm -f vicam/firmware.fw ttusb-budget/dspbootcode.bin cpia2/stv0672_vp4.bin av7110/bootcode.bin
make[2]: Leaving directory '/media_build/v4l/firmware'
rm -f .version .*.o.flags .*.o.d *.mod.gcno Makefile.media \
	Kconfig Kconfig.kern .config .config.cmd .myconfig \
rm -rf .tmp_versions .tmp*.ver .tmp*.o .*.gcno
rm -f scripts/lxdialog scripts/kconfig
make -C firmware distclean
make[2]: Entering directory '/media_build/v4l/firmware'
rm -f ihex2fw
rm -f vicam/firmware.fw ttusb-budget/dspbootcode.bin cpia2/stv0672_vp4.bin av7110/bootcode.bin
for i in av7110/ cpia2/ ttusb-budget/ vicam/; do if [ -d $i ]; then rm -rf $i; fi; done
make[2]: Leaving directory '/media_build/v4l/firmware'
make[1]: Leaving directory '/media_build/v4l'
root@DietPi:/media_build# make
make -C /media_build/v4l 
make[1]: Entering directory '/media_build/v4l'
No version yet, using 4.14.30-v7+
Updating/Creating .config
make[2]: Entering directory '/media_build/linux'
Syncing with dir ../../media
Applying patches for kernel 4.14.30-v7+
patch -s -f -N -p1 -i ../backports/api_version.patch
patch -s -f -N -p1 -i ../backports/pr_fmt.patch
patch -s -f -N -p1 -i ../backports/debug.patch
patch -s -f -N -p1 -i ../backports/drx39xxj.patch
Patched drivers/media/dvb-core/dvbdev.c
Patched drivers/media/v4l2-core/v4l2-dev.c
Patched drivers/media/rc/rc-main.c
Syncing with dir ../../media
make[2]: Leaving directory '/media_build/linux'
Preparing to compile for kernel version 4.14.30

***WARNING:*** You do not have the full kernel sources installed.
This does not prevent you from building the v4l-dvb tree if you have the
kernel headers, but the full kernel source may be required in order to use
make menuconfig / xconfig / qconfig.

If you are experiencing problems building the v4l-dvb tree, please try
building against a vanilla kernel before reporting a bug.

Vanilla kernels are available at http://kernel.org.
On most distros, this will compile a newly downloaded kernel:

cp /boot/config-`uname -r` <your kernel dir>/.config
cd <your kernel dir>
make all modules_install install

Please see your distro's web site for instructions to build a new kernel.

WARNING: This is the V4L/DVB backport tree, with experimental drivers
	 backported to run on legacy kernels from the development tree at:
	 It is generally safe to use it for testing a new driver or
	 feature, but its usage on production environments is risky.
	 Don't use it in production. You've been warned.
VIDEO_DW9714: Requires at least kernel 9.255.255
INTEL_ATOMISP: Requires at least kernel 9.255.255
Created default (all yes) .config file
perl scripts/make_config_compat.pl /lib/modules/4.14.30-v7+/build ./.myconfig ./config-compat.h
creating symbolic links...
make -C firmware prep
make[2]: Entering directory '/media_build/v4l/firmware'
make[2]: Leaving directory '/media_build/v4l/firmware'
make -C firmware
make[2]: Entering directory '/media_build/v4l/firmware'
  CC  ihex2fw
Generating vicam/firmware.fw
Generating ttusb-budget/dspbootcode.bin
Generating cpia2/stv0672_vp4.bin
Generating av7110/bootcode.bin
make[2]: Leaving directory '/media_build/v4l/firmware'
Kernel build directory is /lib/modules/4.14.30-v7+/build
make -C ../linux apply_patches
make[2]: Entering directory '/media_build/linux'
Syncing with dir ../../media
Patches for 4.14.30-v7+ already applied.
make[2]: Leaving directory '/media_build/linux'
make -C /lib/modules/4.14.30-v7+/build SUBDIRS=/media_build/v4l  modules
make[2]: Entering directory '/usr/src/linux-headers-4.14.30-v7+'
  CC [M]  /media_build/v4l/msp3400-driver.o
In file included from ./include/linux/compiler_types.h:58:0,
                 from ././include/linux/kconfig.h:74,
                 from <command-line>:0:
/media_build/v4l/../linux/include/linux/compiler-gcc.h:2:2: error: #error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
 #error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
scripts/Makefile.build:328: recipe for target '/media_build/v4l/msp3400-driver.o' failed
make[3]: *** [/media_build/v4l/msp3400-driver.o] Error 1
Makefile:1519: recipe for target '_module_/media_build/v4l' failed
make[2]: *** [_module_/media_build/v4l] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.14.30-v7+'
Makefile:51: recipe for target 'default' failed
make[1]: *** [default] Error 2
make[1]: Leaving directory '/media_build/v4l'
Makefile:26: recipe for target 'all' failed
make: *** [all] Error 2

Has anyone got the xbox tuner driver to compile on dietpi?

This was my source of info: https://tvheadend.org/boards/5/topics/13685?page=5

After playing around with it a bit more I have managed to get it working successfully.

Installing XBOX tuner driver

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git git-man libdigest-sha-perl liberror-perl libncurses5-dev libproc-processtable-perl libtinfo-dev patchutils raspberrypi-kernel-headers
sudo reboot
git clone --depth=1 git://linuxtv.org/media_build.git
cd media_build/linux
make download
make untar
cd ..
make distclean

In menuconfig, change ‘Remote Controller Support’ from to <*>. By default it builds remote controller support as modules and that leads to Unknown symbol error. Switching to built in to the kernel sorts that issue out.

sudo make menuconfig
make -j5
sudo make install
cd /lib/firmware
sudo wget http://palosaari.fi/linux/v4l-dvb/firmware/MN88472/02/latest/dvb-demod-mn88472-02.fw
sudo reboot