-
Notifications
You must be signed in to change notification settings - Fork 0
Installing on Alpine Linux
Open /etc/apk/repositories and uncomment the community repository lines. Make sure it's not the edge ones, just the normal community ones.
Then
apk update
apk upgrade
If you're not running in diskless mode then skip to the next step. Since diskless mode leaves us with running the system from RAM, we'll need to temporarily expand the filesystem and create a swapfile so we have enough memory to complete compiling and installing packages.
Create the swapfile. Assuming your drive that holds apk-cache and lbu-data
is at /media/sda1, change this to whatever is specific to your installation
dd if=/dev/zero of=/media/sda1/swapfile bs=1M count=784
mkswap /media/sda1/swapfile
swapon /media/sda1/swapfile
Expand filesystem to 450MB:
mount -o remount,size=450M /
The following dependencies are required for building bluealsa.
apk add fdk-aac fdk-aac-dev bluez-dev alsa-lib-dev dbus-dev glib-dev sbc-dev git build-base gcc autoconf automake libtool
A more in-depth instruction page can be seen here. However, for our purposes, this will suffice:
git clone https://github.com/Arkq/bluez-alsa
cd bluez-alsa
autoreconf --install --force
./configure --enable-ofono --enable-aac
make
make install
If you're running diskless mode you'll need to tell lbu
about bluealsa and then commit those changes. You can do it like this:
lbu inc /usr/bin/bluealsa
lbu inc /usr/bin/bluealsa-aplay
We don't need the following packages anymore so we can remove them:
apk del autoconf automake
apk add python3 python3-dev py3-pip alsa-utils ofono dbus dbus-openrc dbus-libs bluez bluez-libs alsa-lib alsa-tools glib sbc cairo-dev gobject-introspection gobject-introspection-dev
Install raspberrylink using Pip. No-binary is needed due to wheel distributions not supporting absolute paths for data files:
pip3 install --no-binary :all: raspberrylink
If you're not running in diskless mode then skip to the next step.
Include the following:
lbu inc /usr/lib/python3.8/site-packages
lbu inc /opt/raspberrylink
lbu inc /usr/bin/raspilink
lbu inc /usr/bin/raspilink-agent
apk del build-base gcc alsa-lib-dev bluez-dev dbus-dev git glib-dev gobject-introspection-dev python3-dev sbc-dev
First copy the OpenRC script from /opt/raspberrylink:
cp /opt/raspberrylink/service-files/raspberrylink /etc/init.d/
chmod +x /etc/init.d/raspberrylink
Then enable the following:
rc-update add bluetooth
rc-update add ofono
rc-update add dbus
rc-update add raspberrylink
In order for bluetooth to remember paired devices a link needs to be created from /var/lib/bluetooth
to the storage device. The same thing also needs to be done for /var/cache/raspberrylink-last-device
The following assumes your storage device is mounted at /mount/sda1
, replace with whatever is specific to your configuration. It also assumes it's set to mount as read-write. If it's readonly then you will need to either change it, or use a different partition and link the following to that partition.
mkdir /media/sda1/bluetooth
ln -s /media/sda1/bluetooth /var/lib/bluetooth
touch /media/sda1/raspberrylink-last-device
ln -s /media/sda1/raspberrylink-last-device /var/cache/raspberrylink-last-device
lbu inc /var/lib/bluetooth
lbu inc /var/cache/raspberrylink-last-device
Then finally commit everything that has been done so far: lbu commit
There's a couple things that need to be checked and/or set in the configuration file, which is detailed on the configuration page. Make sure to lbu commit
when done editing the configuration file if your system is running in diskless mode.