Running Steamlink on Arch Linux ARM
Here is a short guide how to install steamlink on a Raspberry PI running Arch Linux ARM.
I wanted to try out Steamlink on a Raspberry PI to see how well it works. Steamlink is a steaming client to stream steam games running on a host computer to another device. In my case that other device would be a Raspberry PI running Arch Linux ARM.
There are official Steamlink packages available for Rasbian, but not for Arch Linux ARM. I couldn’t find any sources which could be built directly on Arch, so I had to find out some way to re-use the binaries from the
.deb package for Raspbian.
To get access to the debian package I needed a system with Raspbian running. For bonus lazyness I decided to avoid fetching a SD card, installing Raspbian on it, and plugging it into a Raspberry PI to boot it up, but instead fired up a emulated Raspberry using qemu.
First I had to fetch a custom kernel, because the stock kernel of Rasbian doesn’t work with qemu:
dtb file is also required:
The Raspbian image itself which we’re going to run can be downloaded from Raspberrypi.org.
You’ll get a
zip file which needs to be extracted. Once extracted you’ll have a
.img file, this should further be converted to a
qcow2 file to use with
qemu-img convert -f raw -O qcow2 2019-09-26-raspbian-buster-lite.img raspbian-buster-lite.qcow2
Now we’re all set and can launch our emulated raspberry running raspbian using qemu:
qemu-system-arm \ -kernel ./kernel-qemu-4.19.50-buster \ -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" \ -hda raspbian-buster-lite.qcow2 \ -cpu arm1176 \ -m 256 \ -net nic \ -net user,hostfwd=tcp::5022-:22 \ -serial stdio \ -dtb ./versatile-pb.dtb \ -machine versatilepb \ -no-reboot
My first attempt to get steamlink running on Arch Linux ARM was to fetch the
.deb file within the emulated instance, extract it and copy over the files to the Raspberry running Arch.
Steamlink has some self-update functionality and installs further dependencies on first use via the package manager. So this didn’t work too well. I attempted to install the required dependencies on Arch. But the packages available on Arch have different versions and so this plan didn’t work out.
So we’ve a dynamically linked application on one system, and want to run it on another system, how can we solve the dependency issue? Fortunately there is an awesome tool called exodus to solve that problem. It lets us relocate binaries and their dependencies without containers. I’ve used it before and it worked quite well, so I decided to give it a go and it did not disappoint. I got steamlink running on Arch.
Here are the steps required:
apt-get install steamlink apt-get install python3-venv python3 -m venv venv venv/bin/python -m pip install exodus-bundler # run once to update & install dependencies steamlink # bundle and copy to other host venv/bin/exodus steamlink | ssh myuser@raspberrypi_running_arch
And on the raspberry running Arch: