Skip to content

Commit

Permalink
4.1 production
Browse files Browse the repository at this point in the history
  • Loading branch information
moodeaudio committed Apr 7, 2018
1 parent 5e1a21d commit e1f0a20
Show file tree
Hide file tree
Showing 300 changed files with 6,170 additions and 31,002 deletions.
674 changes: 0 additions & 674 deletions LICENSE

This file was deleted.

14 changes: 0 additions & 14 deletions README.md

This file was deleted.

10 changes: 10 additions & 0 deletions etc/avahi/services/moode.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">

<service-group>
<name replace-wildcards="yes">moOde audio player: %h</name>
<service>
<type>_http._tcp</type>
<port>80</port>
</service>
</service-group>
2 changes: 1 addition & 1 deletion etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ http {

include /etc/nginx/mime.types;
default_type application/octet-stream;
client_max_body_size 8M;
client_max_body_size 8M;

##
# SSL Settings
Expand Down
3 changes: 2 additions & 1 deletion etc/php/7.0/cli/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,8 @@ file_uploads = On

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M
;upload_max_filesize = 2M
upload_max_filesize = 8M

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20
Expand Down
3 changes: 2 additions & 1 deletion home/xinitrc.default
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# 2018-01-26 TC moOde 4.0
# 2018-04-02 TC moOde 4.1 remove --disable-overlay-scrollbar because it has no effect either disable or enable
#

# Turn off display power management
Expand All @@ -26,6 +27,6 @@ xset s 600

# launch chrome browser
SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"
chromium-browser --kiosk --touch-events --disable-touch-drag-drop --disable-overlay-scrollbar \
chromium-browser --kiosk --touch-events --disable-touch-drag-drop \
--enable-touchview --enable-pinch --window-size=$SCREENSIZE --window-position=0,0 \
--disable-session-crashed-bubble --disable-infobars --no-first-run --app=http://localhost/
6 changes: 5 additions & 1 deletion lib/systemd/system/bluetooth.service
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#
# 2018-01-26 TC moOde 4.0
# 2018-04-02 TC moOde 4.1
# - change ExecStart to use the symlink in /usr/sbin
# - allows 5.43 and 5.49 bluez to work with this file
# - note: --noplugin=sap may not be needed with 5.49
#

[Unit]
Expand All @@ -10,7 +14,7 @@ ConditionPathIsDirectory=/sys/class/bluetooth
[Service]
Type=dbus
BusName=org.bluez
ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap
ExecStart=/usr/sbin/bluetoothd --noplugin=sap
NotifyAccess=main
#WatchdogSec=10
#Restart=on-failure
Expand Down
17 changes: 0 additions & 17 deletions lib/systemd/system/localui.service
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
#!/bin/bash
#
# moOde audio player (C) 2014 Tim Curtis
# http://moodeaudio.org
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# 2018-01-26 TC moOde 4.0
#
Expand Down
1 change: 0 additions & 1 deletion mpd/playlists/Default Playlist.m3u
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ http://ice1.somafm.com/covers-128-mp3
http://ice1.somafm.com/deepspaceone-128-aac
http://ice1.somafm.com/defcon-128-aac
http://ice1.somafm.com/digitalis-128-aac
http://ice1.somafm.com/doomed-128-aac
http://ice1.somafm.com/dronezone-128-aac
http://ice1.somafm.com/dubstep-128-aac
http://ice1.somafm.com/fluid-128-aac
Expand Down
1 change: 1 addition & 0 deletions network/dhcpcd.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ slaac private
#AP mode
#interface wlan0
#static ip_address=172.24.1.1/24
#nohook wpa_supplicant
2 changes: 1 addition & 1 deletion network/wpa_supplicant.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# the player Network configuration page.
#########################################

country=GB
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
Binary file added other/bluetooth/bluez-5.49.tar.xz
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
################################################################
#
# Build Recipe v2.3, 2018-01-26
# Build Recipe v2.4, 2018-04-02
#
# moOde 4.0
# moOde 4.1
#
# These instructions are written for Linux Enthusiasts
# and System Integrators and provide a recipe for making
Expand All @@ -15,6 +15,17 @@
#
# Changes:
#
# v2.4: Set permissions for localui.service in STEP 8
# Specify Linux kernel by Git hash in STEP 11
# Add echo "y" to rpi-update in STEP 11, reqd for prompt in 4.14.y branch
# Add apt-get clean to STEP 11
# Bump to MPD 0.20.18 in STEP 6
# Bump to upmpdcli-code-1.2.16 in COMPONENT 6 for Tidal fixes
# Bump to Bluetooth 5.49 in STEP 4
# Use local libupnppsamples-code sources in COMPONENT 6
# Remove djmount in COMPONENT 1 and /mnt/UPNP in STEP 7
# Set time zone to America/Detroit in STEP 2
# Add second apt-get update in STEP 3 for robustness
# v2.3: Add sudo for cp pre-compiled MPD binary in STEP 6
# Bump to shairport-sync 3.1.7
# Reset dir permissions for var local in STEP 8
Expand Down Expand Up @@ -173,15 +184,17 @@ net.ifnames=0

1. Insert the SD Card into a Raspberry Pi and POWER UP.

2. Change the current password (raspberry) to moodeaudio and the host name to moode.
2. sudo timedatectl set-timezone "America/Detroit"

3. Change the current password (raspberry) to moodeaudio and the host name to moode.

ssh pi@raspberrypi (pwd=raspberry)

echo "pi:moodeaudio" | sudo chpasswd
sudo sed -i "s/raspberrypi/moode/" /etc/hostname
sudo sed -i "s/raspberrypi/moode/" /etc/hosts

3. Download moOde application sources and configs.
4. Download moOde application sources and configs.

//
// NOTE: We are downloading the Sources in this particular step in order to obtain the resizefs.sh file.
Expand All @@ -193,7 +206,7 @@ cd ~
wget http://moodeaudio.org/downloads/prod/rel-stretch-r40.zip
sudo unzip ./rel-stretch-r40.zip

4. Expand the root partition to 3GB.
5. Expand the root partition to 3GB.

sudo cp ./rel-stretch/www/command/resizefs.sh ./
sudo chmod 0755 ./resizefs.sh
Expand Down Expand Up @@ -231,6 +244,8 @@ sudo apt-get -y upgrade
# SR2
sudo reboot

sudo apt-get update

sudo apt-get -y install rpi-update php-fpm nginx sqlite3 php-sqlite3 memcached php-memcache mpc \
bs2b-ladspa libbs2b0 libasound2-plugin-equal telnet automake sysstat squashfs-tools tcpdump shellinabox \
samba smbclient udisks-glue ntfs-3g exfat-fuse git inotify-tools libav-tools avahi-utils
Expand All @@ -253,10 +268,27 @@ sudo systemctl disable dnsmasq

2. Install Bluetooth

sudo apt-get -y install bluez bluez-firmware pi-bluetooth \
dh-autoreconf expect libortp-dev libbluetooth-dev libasound2-dev \
sudo apt-get -y install bluez-firmware pi-bluetooth \
dh-autoreconf expect libdbus-1-dev libortp-dev libbluetooth-dev libasound2-dev \
libusb-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev libsbc1 libsbc-dev

# Compile bluez
sudo cp ./rel-stretch/other/bluetooth/bluez-5.49.tar.xz ./
sudo tar xvf bluez-5.49.tar.xz
cd bluez-5.49
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-library
sudo make
sudo make install
cd ~
sudo rm -rf ./bluez-5.49
sudo rm ./bluez-5.49.tar.xz

# Delete symlink and bin for old bluetoothd
sudo rm /usr/sbin/bluetoothd
sudo rm -rf /usr/lib/bluetooth
# Create symlink for new bluetoothd
sudo ln -s /usr/libexec/bluetooth/bluetoothd /usr/sbin/bluetoothd

NOTE: Ignore warnings from autoreconf and configure

cd /tmp
Expand Down Expand Up @@ -353,15 +385,15 @@ libboost-dev \
libicu-dev \
libglib2.0-dev

3. Download MPD 0.20.12 sources and prep for compile.
3. Download MPD 0.20.18 sources and prep for compile.

# Optionally install pre-compiled binary and skip to STEP 7
sudo cp ./rel-stretch/other/mpd/mpd-0.20.12 /usr/local/bin/mpd
sudo cp ./rel-stretch/other/mpd/mpd-0.20.18 /usr/local/bin/mpd
sudo reboot

sudo wget http://www.musicpd.org/download/mpd/0.20/mpd-0.20.12.tar.xz
sudo tar xf mpd-0.20.12.tar.xz
cd mpd-0.20.12
sudo wget http://www.musicpd.org/download/mpd/0.20/mpd-0.20.18.tar.xz
sudo tar xf mpd-0.20.18.tar.xz
cd mpd-0.20.18
sudo sh autogen.sh

4. Configure compile options.
Expand All @@ -384,7 +416,7 @@ sudo make
sudo make install
sudo strip --strip-unneeded /usr/local/bin/mpd
cd ~
sudo rm -rf ./mpd-0.20.12*
sudo rm -rf ./mpd-0.20.18*

sudo apt-get clean
sudo apt-get autoremove
Expand Down Expand Up @@ -421,7 +453,6 @@ sudo mkdir /var/lib/mpd/music/RADIO
# Mount points
sudo mkdir /mnt/NAS
sudo mkdir /mnt/SDCARD
sudo mkdir /mnt/UPNP
# Symlinks
sudo ln -s /mnt/NAS /var/lib/mpd/music/NAS
sudo ln -s /mnt/SDCARD /var/lib/mpd/music/SDCARD
Expand Down Expand Up @@ -497,6 +528,8 @@ sudo chmod 0755 /usr/local/bin/a2dp-autoconnect
sudo chmod 0644 /lib/systemd/system/rotenc.service
# Udev
sudo chmod 0644 /etc/udev/rules.d/*
# Localui
sudo chmod 0644 /lib/systemd/system/localui.service

4. Services are started by moOde Worker so lets disable them here.

Expand Down Expand Up @@ -566,14 +599,18 @@ sudo reboot

////////////////////////////////////////////////////////////////
//
// STEP 11 - Optionally install latest Linux Kernel
// STEP 11 - Optionally install updated Linux Kernel
//
////////////////////////////////////////////////////////////////

sudo PRUNE_MODULES=1 rpi-update
// STEP 11 - Optionally install updated Linux Kernel

# kernel ver 4.14.32
echo "y" | sudo PRUNE_MODULES=1 rpi-update 171c962793f7a39a6798ce374d9d63ab0cbecf8c

sudo rm -rf /lib/modules.bak
sudo rm -rf /boot.bak
sudo apt-get clean

# SR7
sudo reboot
Expand Down Expand Up @@ -664,7 +701,6 @@ host name and other names at first boot. See the file /var/www/setup.txt for mor

sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install minidlna
sudo systemctl disable minidlna
sudo apt-get -y install djmount

////////////////////////////////////////////////////////////////
//
Expand Down Expand Up @@ -774,15 +810,16 @@ sudo rm libupnpp-0.16.0.tar.gz

4. Upmpdcli

sudo cp ./rel-stretch/other/upmpdcli/upmpdcli-1.2.15.tar.gz ./
sudo tar xfz ./upmpdcli-1.2.15.tar.gz
cd upmpdcli-1.2.15
sudo cp ./rel-stretch/other/upmpdcli/upmpdcli-code-1.2.16.tar.gz ./
sudo tar xfz ./upmpdcli-code-1.2.16.tar.gz
cd upmpdcli-code
./autogen.sh
./configure --prefix=/usr --sysconfdir=/etc
sudo make
sudo make install
cd ~
sudo rm -rf ./upmpdcli-1.2.15
sudo rm upmpdcli-1.2.15.tar.gz
sudo rm -rf ./upmpdcli-code-1.2.16
sudo rm upmpdcli-code-1.2.16.tar.gz

sudo useradd upmpdcli
sudo cp ./rel-stretch/lib/systemd/system/upmpdcli.service /lib/systemd/system
Expand All @@ -795,7 +832,7 @@ sudo systemctl disable upmpdcli

NOTE: This also installs a bunch of other utils

sudo git clone https://@opensourceprojects.eu/git/p/libupnppsamples/code libupnppsamples-code
sudo cp -r ./rel-stretch/other/libupnppsamples-code/ ./
cd libupnppsamples-code
sudo ./autogen.sh
sudo ./configure
Expand Down
26 changes: 26 additions & 0 deletions other/libupnppsamples-code/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

AM_CXXFLAGS = -std=c++11

LDADD = -lupnpp -lpthread -lrt

bin_PROGRAMS = typedservice ohsender ohradio upexplorer multirdr \
upsend uplistdir dumpXML \
rdcvolume myrdcvolume hellodevice helloctl

typedservice_SOURCES = src/typedservice.cpp
upexplorer_SOURCES = src/upexplo.cpp
multirdr_SOURCES = src/multirdr.cpp
ohradio_SOURCES = src/ohradio.cpp
ohsender_SOURCES = src/ohsender.cpp
uplistdir_SOURCES = src/uplistdir.cpp
rdcvolume_SOURCES = src/rdcvolume.cpp
myrdcvolume_SOURCES = src/myrdcvolume.cpp
dumpXML_SOURCES = src/dumpXML.cpp
hellodevice_SOURCES = hello_src/hellodevice.cpp
helloctl_SOURCES = hello_src/helloctl.cpp

upsend_SOURCES = upsend_src/upsend.cpp \
upsend_src/streamer.cpp \
upsend_src/wav.cpp
upsend_LDADD = -lupnpp -lmicrohttpd -lpthread -lrt
upsend_CPPFLAGS = -I/usr/include/libupnpp -I$(top_srcdir)/src -DHAVE_STD_FUTURE=1
Loading

0 comments on commit e1f0a20

Please sign in to comment.