OK, here's my Cubox cookbook. I haven't actually redone the installation while producing this so it's possible there might be a few minor mistakes or omissions - most likely some system config bits that need a little more massaging; also, it's not as novice-friendly as my BBC radio guide as it assumes a bit more system knowledge. It looks like a list of commands you could pass to a shell, but don't! There are some bits you need to do by hand along the way, in particular some of the system config and copying the runeaudio redis database from the production Raspberry Pi image. However it should serve as a guide for the adventurous in advance of the official release. Essentially you're installing the custom rune packages and their dependencies over a vanilla Arch Cubox distribution. The Cubox-i packages do the job perfectly well on the original Cubox because the CPU is am ARMv7 hardfloat with the same FPU in both machines. (Hopefully this will make the job of doing a formal release much easier as the packages only need to be built once, basically it's the kernel that's different).
There are some bits where what I've done may be slightly sub-optimal, but I got a working RuneAudio setup on my Cubox, including streaming audio from my phone. The only bit I haven't tested is spotify as I don't use it.
Cheers,
Adrian.
- Code: Select all
#########################################
# RuneAudio v0.3-beta cookbook #
# written by: Orion (development image) #
# adapted for Cubox by: aj78 #
# HW platform: Cubox (03?) #
# update: 20141123 #
#########################################
# install base ArchLinux system (follow guide http://archlinuxarm.org/platforms/armv7/marvell/cubox - see the Installation tab)
# Boot into system
# Enable network
netctl enable eth0-dhcp # Or whatever your network interface is
netctl enable th0-dhcp # Or whatever your network interface is
# first time sync
ntpdate pool.ntp.org
# general system update
pacman -Syu --noconfirm
###################
### -- redis -- ###
###################
# install Redis (1.53 MiB)
pacman -S redis --noconfirm
#################################################
### -- git support for live RuneUI updates -- ###
#################################################
# install git support (22.47 MiB)
pacman -S git --noconfirm
#########################################
### -- additional system libraries -- ###
#########################################
# install libmcrypt (0.25 MiB)
pacman -S libmcrypt --noconfirm
# install libjpeg-turbo (1.15 MiB)
pacman -S libjpeg --noconfirm
# install apr-util (nginx req.) (1.63 MiB)
pacman -S apr-util --noconfirm
##########################
### -- system tools -- ###
##########################
# install atop (0.44 MiB)
pacman -S atop --noconfirm
# install wget (3.05 MiB)
pacman -S wget --noconfirm
# install ethtool (0.25 MiB)
pacman -S ethtool --noconfirm
# install mkinitcpio (*0.21 MiB)
pacman -S mkinitcpio --noconfirm
###########################
### -- network tools -- ###
###########################
# install avahi (2.30 MiB)
pacman -S avahi --noconfirm
# install nettools (0.49 MiB)
pacman -S net-tools --noconfirm
# install ifplugd (0.13 MiB)
pacman -S ifplugd --noconfirm
# install wireless tools (0.33 MiB)
pacman -S wireless_tools --noconfirm
# install iw (1.18 MiB)
pacman -S iw --noconfirm
# install hostapd (0.85 MiB)
pacman -S hostapd --noconfirm
# install nfs-utils (2.49 MiB)
pacman -S nfs-utils --noconfirm
# install netcat (0.36 MiB)
pacman -S openbsd-netcat --noconfirm
##############################
### -- filesystem tools -- ###
##############################
# install NTFS support (1.50 MiB)
pacman -S ntfs-3g --noconfirm
# install dosfstools (0.25 MiB)
pacman -S dosfstools --noconfirm
# install exFAT support (0.19 MiB)
pacman -S exfat-utils --noconfirm
# install sshfs support (0.07 MiB)
pacman -S sshfs --noconfirm
# install cifs-utils (0.63 MiB)
pacman -S cifs-utils --noconfirm
# install ftpfs (0.06 MiB)
pacman -S curlftpfs --noconfirm
# install USB automount daemon (0.34 MiB)
# >>> REMEMBER to enable kernel polling when using devmon without udisks:
# http://ignorantguru.github.com/udevil/#polling
pacman -S udevil --noconfirm
###########################
### -- install samba -- ###
###########################
pacman -S samba --noconfirm # There is a samba-rune directory in the RuneOS tree but I couldn't get this to build so just used the default samba
#########################
### -- AUDIO stack -- ###
#########################
# install ALSA utils (9.66 MiB)
pacman -S alsa-utils --noconfirm
# install SOX (3.08 MiB)
pacman -S sox --noconfirm
# install Jack (2.56 MiB)
pacman -S jack --noconfirm
# install NetJACK driver (0.15 MiB)
pacman -S celt --noconfirm
############################
### -- install RuneUI -- ###
############################
cd /
ln -s /srv/http/ /var/www
cd /var/www
# clone RuneUI git repo
git clone https://github.com/RuneAudio/RuneUI.git .
##############################
# -- setup filesystem ACL -- #
##############################
# setup tmpfs directory
chmod 777 /run
# setup webserver directory
chown -R http.http /srv/http/
chmod 644 $(find /srv/http/ -type f)
chmod 755 $(find /srv/http/ -type d)
chmod -R 755 /srv/http/command/
# setup log directory
rm -r /var/log/*
mkdir /var/log/runeaudio/
# ----->>>> INSTALL CUSTOM PACKAGES <<<<----- #
# clone RuneOS repo
git clone https://github.com/RuneAudio/RuneOS.git /usr/local/src/RuneOS
######################################################
# -- install hfsprogs v332.25 and hfsutils v3.2.6 -- #
######################################################
cd /usr/local/src/RuneOS/07_cubox-i/packages/hfsprogs
# install hfsprogs (0.15 MiB)
pacman -U hfsprogs-rune-332.25-10-armv7h.pkg.tar.xz --noconfirm
cd ../hfsutils
pacman -U hfsutils-rune-3.2.6-4-armv7h.pkg.tar.xz --noconfirm
##########################
# -- install php-rune -- #
##########################
# php deps
pacman -S icu --noconfirm
pacman -S libpng --noconfirm
# use the Cubox-i package (it is the same arm7hf target, same FPU)
cd /usr/local/src/RuneOS/07_cubox-i/packages/php-rune
pacman -U php-rune-5.5.16-1-armv7h.pkg.tar.xz --noconfirm
# install pthreads support (TODO)
# pecl install channel://pecl.php.net/pthreads-2.0.7 # This currently fails stating php should be compiled with ZTS enabled,
# I haven't got round to it yet but the system works without it
# install Redis support (phpredis)
cd /usr/local/src/RuneOS/07_cubox-i/packages/phpredis-rune
pacman -U phpredis-rune-2.2.5-1-armv7h.pkg.tar.xz --noconfirm
###################################
# -- install nginx-rune v1.4.7 -- #
###################################
cd /usr/local/src/RuneOS/07_cubox-i/packages/nginx-rune
# install nginx-rune (1.02 MiB)
pacman -U nginx-rune-1.4.7-2-armv7h.pkg.tar.xz --noconfirm
###################################
# -- install mpd-rune v0.18.10 -- #
###################################
cd /usr/local/src/RuneOS/07_cubox-i/packages/mpd-rune
# install mpd-rune (0.62 MiB)
pacman -U mpd-rune-0.18.14-1-armv7h.pkg.tar.xz --noconfirm
#####################################
# -- spop-rune (spotify support) -- #
#####################################
cd /usr/local/src/RuneOS/07_cubox-i/packages/libspotify
pacman -U libspotify-12.1.51-3-armv7h.pkg.tar.xz
cd /usr/local/src/RuneOS/07_cubox-i/packages/spop-rune
pacman -U spop-rune-1.0-1-armv7h.pkg.tar.xz --noconfirm
#############################
# -- install ffmpeg-rune -- #
#############################
cd /usr/local/src/RuneOS/07_cubox-i/packages/ffmpeg-rune
pacman -U ffmpeg-rune-r66290.b76d613-1-armv7h.pkg.tar.xz
##################################
# -- install mpdscribble v1.4.7 -- #
##################################
cd /usr/local/src/RuneOS/07_cubox-i/packages/mpdscribble-rune
pacman -U mpdscribble-rune-0.22.6-armv7h.pkg.tar.xz
cp mpdscribble.service /usr/lib/systemd/system/
##############################
# -- install shairport-rune -- #
##############################
cd /usr/local/src/RuneOS/07_cubox-i/packages/shairport-rune
pacman -U shairport-rune-1.0.1-armv7h.pkg.tar.xz --noconfirm
cp shairport.service /usr/lib/systemd/system
##############################
# -- install tcp_wrappers -- #
##############################
cd /usr/local/src/RuneOS/07_cubox-i/packages/spop-rune
pacman -U tcp_wrappers-7.6.16-armv7h.pkg.tar.xz --noconfirm
###############################
# -- install upmpdcli-rune -- #
###############################
cd /usr/local/src/RuneOS/07_cubox-i/packages/upmpdcli-rune
pacman -U upmpdcli-rune-0.8.0-1-armv7h.pkg.tar.xz --noconfirm
# ----->>>> SYSTEM CONFIGURATION <<<<----- #
# Copy system config files
cd /usr/local/src/RuneOS/07_cubox-i/os_config
cp -axv * /
cd /etc
# Edit redis.conf, change daemonize=no to daemonize=yes # This solved the problem I had where redis refused to start from the systemd script
# Copy rune.rdb from a v0.3-beta RPi /var/lib/redis into /var/lib/redis
# enable avahi
systemctl enable avahi-daemon
sysemctl enable avahi-dnsconfd # avahi-dnsconfd still not working on my box but I haven't noticed its absence cause a problem so far
# enable SSHD
systemctl enable sshd # I did this much earlier as I did most of the configuration via ssh
# enable php
systemctl enable php-fpm
# enable nginx
systemctl enable nginx
# enable mpd
systemctl enable mpd
systemctl enable mpdscribble
# enable redis
systemctl enable redis
# enable workers
systemctl enable rune_PL_wrk.service
systemctl enable rune_SY_wrk.service
# enable cronie (optional; useful for BBC update script, alarms)
systemctl enable cronie
# link Orion Optimize script
ln -s /srv/http/command/orion_optimize.sh /usr/sbin/
# create /mnt directory structure
mkdir /mnt/MPD
mkdir /mnt/MPD/USB
mkdir /mnt/MPD/Webradio
mkdir /mnt/MPD/NAS
mkdir /mnt/MPD/LocalStorage
chown -R mpd.audio /mnt/MPD
# reboot system
reboot