├── stage0 ├── 01-locale │ ├── 00-packages │ └── 00-debconf ├── 00-configure-apt │ ├── files │ │ ├── 51cache │ │ ├── raspi.list │ │ ├── sources.list │ │ └── raspberrypi.gpg.key │ └── 00-run.sh ├── 02-firmware │ └── 01-packages ├── files │ └── raspberrypi.gpg └── prerun.sh ├── stage1 ├── 02-net-tweaks │ ├── 00-packages │ └── 00-run.sh ├── 01-sys-tweaks │ ├── 00-patches │ │ ├── series │ │ └── 01-bashrc.diff │ ├── files │ │ ├── noclear.conf │ │ └── fstab │ └── 00-run.sh ├── 03-install-packages │ └── 00-packages ├── prerun.sh └── 00-boot-files │ ├── files │ ├── cmdline.txt │ └── config.txt │ └── 00-run.sh ├── stage2 ├── 01-sys-tweaks │ ├── 00-packages-nr │ ├── files │ │ ├── ttyoutput.conf │ │ ├── 90-qemu.rules │ │ ├── 50raspi │ │ ├── console-setup │ │ ├── rc.local │ │ └── resize2fs_once │ ├── 00-patches │ │ ├── series │ │ ├── 07-resize-init.diff │ │ ├── 04-inputrc.diff │ │ ├── 02-swap.diff │ │ ├── 01-useradd.diff │ │ └── 05-path.diff │ ├── 00-packages │ ├── 01-run.sh │ └── 00-debconf ├── 00-copies-and-fills │ ├── 01-packages │ └── 02-run.sh ├── prerun.sh ├── 02-net-tweaks │ ├── files │ │ ├── wait.conf │ │ └── wpa_supplicant.conf │ ├── 00-packages │ └── 01-run.sh └── 03-set-timezone │ └── 02-run.sh ├── stage3 ├── 08-install-sonobus │ ├── 00-packages │ ├── files │ │ ├── Desktop │ │ │ └── sonobus-start.desktop │ │ ├── sonobus_start.conf │ │ ├── sonobus_start.sh │ │ └── SonoBus.settings │ └── 01-run.sh ├── 12-install-hpsjam │ ├── 00-packages │ ├── files │ │ ├── HpsJam_bw.png │ │ ├── Desktop │ │ │ ├── hpsjam-start.desktop │ │ │ └── hpsjam-server-start.desktop │ │ ├── HpsJam.conf │ │ ├── hpsjam_start.conf │ │ ├── hpsjam-server.conf │ │ ├── hpsjam-server.service │ │ └── hpsjam_start.sh │ └── 01-run.sh ├── 07-install-boot-script │ ├── files │ │ ├── jambox_version │ │ ├── urlrelay.service │ │ ├── unattended │ │ ├── urlrelay.conf │ │ ├── one-time-script.conf │ │ └── urlrelay.sh │ └── 01-run.sh ├── 09-install-jacktrip │ ├── 00-packages │ ├── files │ │ ├── Desktop │ │ │ └── jacktrip-start.desktop │ │ ├── jacktrip_start.conf │ │ └── jacktrip_start.sh │ └── 01-run.sh ├── 11-install-jammernetz │ ├── 00-packages │ ├── files │ │ ├── zeros.bin │ │ ├── JammerNetzIcon.png │ │ ├── JammerNetzIcon_bw.png │ │ ├── Desktop │ │ │ ├── jammernetz-start.desktop │ │ │ └── jammernetz-server-start.desktop │ │ ├── jammernetz_start.conf │ │ ├── JammerNetz.settings │ │ ├── jammernetz-server.conf │ │ ├── jammernetz-server.service │ │ └── jammernetz_start.sh │ └── 01-run.sh ├── 01-misc-config │ ├── files │ │ └── 010_pi-nopasswd │ └── 00-run.sh ├── 04-install-sw │ ├── 00-debconf │ ├── files │ │ ├── .vimrc │ │ ├── 60-desktop-policy.conf │ │ ├── Desktop │ │ │ ├── patchage.desktop │ │ │ ├── qasmixer.desktop │ │ │ ├── audacity.desktop.unused │ │ │ ├── pimixer.desktop │ │ │ ├── Update.desktop │ │ │ ├── README.desktop │ │ │ └── Shutdown.desktop │ │ ├── jambox_update.sh │ │ ├── patchagerc │ │ ├── pulseaudio-jack.desktop │ │ ├── novnc.service │ │ ├── pcmanfm.conf │ │ ├── hostapd.conf │ │ ├── qasmixer.conf │ │ ├── desktop-items-0.conf │ │ ├── libfm.conf │ │ ├── daemon.conf │ │ ├── lxde-panel │ │ ├── config.txt │ │ ├── audacity.cfg │ │ └── README.md │ ├── 07-run.sh │ ├── 03-run.sh │ ├── 06-run.sh │ ├── 00-packages │ ├── 04-run.sh │ ├── 00-packages-nr │ ├── 08-run.sh │ ├── 02-run.sh │ └── 01-run.sh ├── 02-misc-config2 │ ├── 00-packages │ ├── 00-debconf │ ├── files │ │ ├── cpu_performance_scaling_governor.service │ │ └── rules.v4 │ └── 01-run.sh ├── 10-install-jamtaba │ ├── 00-packages │ ├── files │ │ ├── jamtaba_start.conf │ │ ├── JamTaba 2.conf │ │ ├── Desktop │ │ │ └── jamtaba-start.desktop │ │ ├── ajs-jamtaba-stereo.xml │ │ ├── jamtaba_start.sh │ │ └── Jamtaba.json │ └── 01-run.sh ├── prerun.sh ├── 03-install-jack │ ├── 00-packages-nr │ ├── 00-debconf │ ├── 00-packages │ ├── files │ │ ├── jack.service │ │ ├── ajs-jamulus-ch1_only.xml │ │ ├── ajs-jamulus-ch2_only.xml │ │ ├── ajs-jamulus-stereo.xml │ │ ├── ajs-sonobus-stereo.xml │ │ └── ajs-jamulus-dual_mono.xml │ └── 01-run.sh ├── 00-configure-apt │ ├── files │ │ ├── jambox-project.list │ │ ├── blokas.gpg.key │ │ └── repo.jambox-project.com.gpg │ └── 00-run.sh ├── EXPORT_IMAGE ├── 06-install-jamulus │ ├── 00-packages │ ├── files │ │ ├── jamulus-server.png │ │ ├── jns │ │ │ ├── wp_jns_logo_small_5_260x.gif │ │ │ ├── jamulus_start.conf │ │ │ └── jackdrc.conf │ │ ├── autostart │ │ ├── Desktop │ │ │ ├── jamulus-start.desktop │ │ │ └── jamulus-server-start.desktop │ │ ├── jackdrc │ │ ├── Jamulusserver.ini │ │ ├── Jamulusserver2.ini │ │ ├── jambox_start.sh │ │ ├── jamulus-server2.service │ │ ├── jamulus-server.service │ │ ├── jamulus-server.conf │ │ ├── jamulus-server2.conf │ │ ├── jamulus_start.conf │ │ ├── midi-jamulus-passthrough.py │ │ ├── jackdrc.conf │ │ └── jamulus_start.sh │ └── 01-run.sh ├── 13-install-midi │ ├── 01-run.sh │ ├── 00-packages │ └── files │ │ └── Qsynth.conf ├── 05-install-rt-kernel │ ├── 02-run.sh │ ├── files │ │ ├── scarlett-gen3.conf │ │ └── gen-latency-plot.sh │ ├── 00-packages │ └── 01-run.sh └── 99-fixup-perm │ └── 00-run.sh ├── export-image ├── 02-network │ ├── files │ │ └── resolv.conf │ └── 01-run.sh ├── 01-set-sources │ └── 01-run.sh ├── 00-allow-rerun │ └── 00-run.sh ├── 03-set-partuuid │ └── 00-run.sh ├── prerun.sh └── 04-finalise │ └── 01-run.sh ├── .dockerignore ├── .gitignore ├── docker-compose.yml ├── depends ├── scripts ├── remove-comments.sed ├── dependencies_check └── common ├── Dockerfile └── LICENSE /stage0/01-locale/00-packages: -------------------------------------------------------------------------------- 1 | locales 2 | -------------------------------------------------------------------------------- /stage1/02-net-tweaks/00-packages: -------------------------------------------------------------------------------- 1 | netbase 2 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-packages-nr: -------------------------------------------------------------------------------- 1 | cifs-utils 2 | -------------------------------------------------------------------------------- /stage1/01-sys-tweaks/00-patches/series: -------------------------------------------------------------------------------- 1 | 01-bashrc.diff 2 | -------------------------------------------------------------------------------- /stage3/08-install-sonobus/00-packages: -------------------------------------------------------------------------------- 1 | sonobus=1.4.6-1 2 | -------------------------------------------------------------------------------- /stage3/12-install-hpsjam/00-packages: -------------------------------------------------------------------------------- 1 | hpsjam=1.0.20-1 2 | -------------------------------------------------------------------------------- /stage3/07-install-boot-script/files/jambox_version: -------------------------------------------------------------------------------- 1 | 1.5.0 2 | -------------------------------------------------------------------------------- /stage3/09-install-jacktrip/00-packages: -------------------------------------------------------------------------------- 1 | jacktrip=1.5.0-1 2 | -------------------------------------------------------------------------------- /stage3/11-install-jammernetz/00-packages: -------------------------------------------------------------------------------- 1 | jammernetz=2.2.0-1 2 | -------------------------------------------------------------------------------- /export-image/02-network/files/resolv.conf: -------------------------------------------------------------------------------- 1 | nameserver 8.8.8.8 2 | -------------------------------------------------------------------------------- /stage2/00-copies-and-fills/01-packages: -------------------------------------------------------------------------------- 1 | raspi-copies-and-fills 2 | -------------------------------------------------------------------------------- /stage1/01-sys-tweaks/files/noclear.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | TTYVTDisallocate=no 3 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/files/ttyoutput.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | StandardOutput=tty 3 | -------------------------------------------------------------------------------- /stage3/01-misc-config/files/010_pi-nopasswd: -------------------------------------------------------------------------------- 1 | pi ALL=(ALL) NOPASSWD: ALL 2 | -------------------------------------------------------------------------------- /stage0/00-configure-apt/files/51cache: -------------------------------------------------------------------------------- 1 | Acquire::http { Proxy "APT_PROXY"; }; 2 | -------------------------------------------------------------------------------- /stage0/02-firmware/01-packages: -------------------------------------------------------------------------------- 1 | raspberrypi-bootloader 2 | raspberrypi-kernel 3 | -------------------------------------------------------------------------------- /stage3/04-install-sw/00-debconf: -------------------------------------------------------------------------------- 1 | rpi-chromium-mods rpi-chromium-mods/adobe note 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | output/ 2 | work/ 3 | deploy/ 4 | apt-cacher-ng/ 5 | .git/objects/* 6 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/.vimrc: -------------------------------------------------------------------------------- 1 | source $VIMRUNTIME/defaults.vim 2 | set mouse-=a 3 | -------------------------------------------------------------------------------- /stage1/03-install-packages/00-packages: -------------------------------------------------------------------------------- 1 | libraspberrypi-bin libraspberrypi0 raspi-config 2 | -------------------------------------------------------------------------------- /stage3/04-install-sw/07-run.sh: -------------------------------------------------------------------------------- 1 | cd ${ROOTFS_DIR}/etc/profile.d/ && rm -f sshpwd.sh wifi-country.sh 2 | -------------------------------------------------------------------------------- /stage1/prerun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ ! -d "${ROOTFS_DIR}" ]; then 4 | copy_previous 5 | fi 6 | -------------------------------------------------------------------------------- /stage2/prerun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ ! -d "${ROOTFS_DIR}" ]; then 4 | copy_previous 5 | fi 6 | -------------------------------------------------------------------------------- /stage3/02-misc-config2/00-packages: -------------------------------------------------------------------------------- 1 | # iptables-persistent 2 | ntp 3 | ntpdate 4 | ntpstat 5 | rng-tools5 6 | -------------------------------------------------------------------------------- /stage3/10-install-jamtaba/00-packages: -------------------------------------------------------------------------------- 1 | jamtaba 2 | libqt5multimedia5-plugins 3 | gstreamer1.0-plugins-bad 4 | -------------------------------------------------------------------------------- /stage3/prerun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ ! -d "${ROOTFS_DIR}" ]; then 4 | copy_previous 5 | fi 6 | -------------------------------------------------------------------------------- /stage0/files/raspberrypi.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kdoren/jambox-pi-gen/HEAD/stage0/files/raspberrypi.gpg -------------------------------------------------------------------------------- /stage2/02-net-tweaks/files/wait.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | ExecStart= 3 | ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w 4 | -------------------------------------------------------------------------------- /stage3/03-install-jack/00-packages-nr: -------------------------------------------------------------------------------- 1 | jackd2 libjack-jackd2-0 2 | libmxml-dev 3 | aj-snapshot 4 | jack-delay 5 | -------------------------------------------------------------------------------- /export-image/02-network/01-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | install -m 644 files/resolv.conf "${ROOTFS_DIR}/etc/" 4 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/60-desktop-policy.conf: -------------------------------------------------------------------------------- 1 | [Configuration] 2 | AdminIdentities=unix-user:pi;unix-user:0 3 | -------------------------------------------------------------------------------- /stage3/11-install-jammernetz/files/zeros.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /stage3/00-configure-apt/files/jambox-project.list: -------------------------------------------------------------------------------- 1 | deb [ arch=armhf,arm64 ] http://repo.jambox-project.com buster main 2 | -------------------------------------------------------------------------------- /stage3/03-install-jack/00-debconf: -------------------------------------------------------------------------------- 1 | # Enable realtime process priority? 2 | jackd2 jackd/tweak_rt_limits boolean true 3 | -------------------------------------------------------------------------------- /stage2/02-net-tweaks/files/wpa_supplicant.conf: -------------------------------------------------------------------------------- 1 | ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev 2 | update_config=1 3 | -------------------------------------------------------------------------------- /stage3/EXPORT_IMAGE: -------------------------------------------------------------------------------- 1 | IMG_SUFFIX="" 2 | if [ "${USE_QEMU}" = "1" ]; then 3 | export IMG_SUFFIX="${IMG_SUFFIX}-qemu" 4 | fi 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | deploy/* 2 | work/* 3 | config 4 | postrun.sh 5 | SKIP 6 | SKIP_IMAGES 7 | .pc 8 | *-pc 9 | apt-cacher-ng/ 10 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-patches/series: -------------------------------------------------------------------------------- 1 | 01-useradd.diff 2 | 02-swap.diff 3 | 04-inputrc.diff 4 | 05-path.diff 5 | 07-resize-init.diff 6 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/00-packages: -------------------------------------------------------------------------------- 1 | jamulus=3.8.1-1 2 | mididings=2.0.0-1 3 | python3-alsaaudio 4 | python3-jack-client 5 | a2jmidid 6 | -------------------------------------------------------------------------------- /stage3/12-install-hpsjam/files/HpsJam_bw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kdoren/jambox-pi-gen/HEAD/stage3/12-install-hpsjam/files/HpsJam_bw.png -------------------------------------------------------------------------------- /stage1/00-boot-files/files/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait 2 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/files/90-qemu.rules: -------------------------------------------------------------------------------- 1 | KERNEL=="sda", SYMLINK+="mmcblk0" 2 | KERNEL=="sda?", SYMLINK+="mmcblk0p%n" 3 | KERNEL=="sda2", SYMLINK+="root" 4 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/jamulus-server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kdoren/jambox-pi-gen/HEAD/stage3/06-install-jamulus/files/jamulus-server.png -------------------------------------------------------------------------------- /stage3/11-install-jammernetz/files/JammerNetzIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kdoren/jambox-pi-gen/HEAD/stage3/11-install-jammernetz/files/JammerNetzIcon.png -------------------------------------------------------------------------------- /stage3/11-install-jammernetz/files/JammerNetzIcon_bw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kdoren/jambox-pi-gen/HEAD/stage3/11-install-jammernetz/files/JammerNetzIcon_bw.png -------------------------------------------------------------------------------- /stage0/prerun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ ! -d "${ROOTFS_DIR}" ]; then 4 | bootstrap ${RELEASE} "${ROOTFS_DIR}" http://raspbian.raspberrypi.org/raspbian/ 5 | fi 6 | -------------------------------------------------------------------------------- /stage1/00-boot-files/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | install -m 644 files/cmdline.txt "${ROOTFS_DIR}/boot/" 4 | install -m 644 files/config.txt "${ROOTFS_DIR}/boot/" 5 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/Desktop/patchage.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Link 3 | Name=Patchage 4 | Icon=patchage 5 | URL=/usr/share/applications/patchage.desktop 6 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/Desktop/qasmixer.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Link 3 | Name=QasMixer 4 | Icon=qasmixer 5 | URL=/usr/share/applications/qasmixer.desktop 6 | -------------------------------------------------------------------------------- /stage3/02-misc-config2/00-debconf: -------------------------------------------------------------------------------- 1 | # iptables-persistent iptables-persistent/autosave_v4 boolean false 2 | # iptables-persistent iptables-persistent/autosave_v6 boolean false 3 | -------------------------------------------------------------------------------- /stage3/03-install-jack/00-packages: -------------------------------------------------------------------------------- 1 | pulseaudio-module-jack 2 | alsa-utils 3 | libasound2 libasound2-data libasound2-dev libasound2-doc libasound2-plugin-smixer libatopology2 4 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/Desktop/audacity.desktop.unused: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Link 3 | Name=Audacity 4 | Icon=audacity 5 | URL=/usr/share/applications/audacity.desktop 6 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/jns/wp_jns_logo_small_5_260x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kdoren/jambox-pi-gen/HEAD/stage3/06-install-jamulus/files/jns/wp_jns_logo_small_5_260x.gif -------------------------------------------------------------------------------- /stage3/10-install-jamtaba/files/jamtaba_start.conf: -------------------------------------------------------------------------------- 1 | # 2 | # File: /home/pi/config/jamtaba_start.conf 3 | # 4 | # 5 | 6 | INIT_POSITION="@Point(0 60)" 7 | INIT_SIZE="@Size(1100 695)" 8 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/autostart: -------------------------------------------------------------------------------- 1 | @lxpanel --profile LXDE-pi 2 | @pcmanfm --desktop --profile LXDE-pi 3 | @xscreensaver -no-splash 4 | @lxterminal -e /usr/local/bin/jambox_start.sh 5 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/Desktop/pimixer.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Link 3 | Name=Audio Device Settings 4 | Icon=multimedia-volume-control 5 | URL=/usr/share/applications/pimixer.desktop 6 | -------------------------------------------------------------------------------- /stage2/00-copies-and-fills/02-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ -f "${ROOTFS_DIR}/etc/ld.so.preload" ]; then 4 | mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled" 5 | fi 6 | 7 | -------------------------------------------------------------------------------- /stage2/02-net-tweaks/00-packages: -------------------------------------------------------------------------------- 1 | wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek 2 | raspberrypi-net-mods 3 | dhcpcd5 4 | net-tools 5 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/files/50raspi: -------------------------------------------------------------------------------- 1 | # never use pdiffs. Current implementation is very slow on low-powered devices 2 | Acquire::PDiffs "0"; 3 | 4 | # download up to 5 pdiffs: 5 | #Acquire::PDiffs::FileLimit "5"; 6 | -------------------------------------------------------------------------------- /stage3/10-install-jamtaba/files/JamTaba 2.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | pos=@Point(0 60) 3 | size=@Size(1100 695) 4 | state=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x4L\0\0\x2\xa2\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0) 5 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/jambox_update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo 'Updating jamming apps in 5 seconds' 3 | sleep 5 4 | sudo apt-get update 5 | sudo apt-get -y install jamulus sonobus jacktrip jamtaba jammernetz hpsjam 6 | sleep 20 7 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/patchagerc: -------------------------------------------------------------------------------- 1 | window_location 0 36 2 | window_size 1020 550 3 | zoom_level 1.0 4 | font_size 12 5 | show_toolbar 0 6 | sprung_layout 1 7 | show_messages 0 8 | sort_ports 1 9 | messages_height 75 10 | -------------------------------------------------------------------------------- /stage3/13-install-midi/01-run.sh: -------------------------------------------------------------------------------- 1 | # install config file for Qsynth 2 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/rncbc.org 3 | cp files/Qsynth.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/rncbc.org/ 4 | 5 | 6 | -------------------------------------------------------------------------------- /stage1/01-sys-tweaks/files/fstab: -------------------------------------------------------------------------------- 1 | proc /proc proc defaults 0 0 2 | BOOTDEV /boot vfat defaults 0 2 3 | ROOTDEV / ext4 defaults,noatime 0 1 4 | -------------------------------------------------------------------------------- /stage2/03-set-timezone/02-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | echo "${TIMEZONE_DEFAULT}" > "${ROOTFS_DIR}/etc/timezone" 4 | rm "${ROOTFS_DIR}/etc/localtime" 5 | 6 | on_chroot << EOF 7 | dpkg-reconfigure -f noninteractive tzdata 8 | EOF 9 | -------------------------------------------------------------------------------- /stage0/00-configure-apt/files/raspi.list: -------------------------------------------------------------------------------- 1 | deb http://archive.raspberrypi.org/debian/ RELEASE main 2 | # Uncomment line below then 'apt-get update' to enable 'apt-get source' 3 | #deb-src http://archive.raspberrypi.org/debian/ RELEASE main 4 | -------------------------------------------------------------------------------- /stage1/02-net-tweaks/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | echo "${TARGET_HOSTNAME}" > "${ROOTFS_DIR}/etc/hostname" 4 | echo "127.0.1.1 ${TARGET_HOSTNAME}" >> "${ROOTFS_DIR}/etc/hosts" 5 | 6 | ln -sf /dev/null "${ROOTFS_DIR}/etc/systemd/network/99-default.link" 7 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | apt-cacher-ng: 5 | restart: unless-stopped 6 | image: sameersbn/apt-cacher-ng:latest 7 | ports: 8 | - "3142:3142" 9 | volumes: 10 | - ./apt-cacher-ng:/var/cache/apt-cacher-ng 11 | -------------------------------------------------------------------------------- /export-image/01-set-sources/01-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" 4 | find "${ROOTFS_DIR}/var/lib/apt/lists/" -type f -delete 5 | on_chroot << EOF 6 | apt-get update 7 | apt-get -y dist-upgrade 8 | apt-get clean 9 | EOF 10 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/pulseaudio-jack.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=PulseAudio-Jack Bridge 3 | Exec=sh -c "pactl load-module module-jack-sink channels=2; pactl load-module module-jack-source; pacmd set-default-sink jack_out" 4 | Type=Application 5 | Terminal=false 6 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/novnc.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description = start noVNC service 3 | After=syslog.target network.target 4 | 5 | [Service] 6 | Type=simple 7 | User=pi 8 | ExecStart = /usr/local/noVNC/utils/novnc_proxy 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /depends: -------------------------------------------------------------------------------- 1 | quilt 2 | parted 3 | realpath:coreutils 4 | qemu-arm-static:qemu-user-static 5 | debootstrap 6 | zerofree 7 | zip 8 | mkdosfs:dosfstools 9 | capsh:libcap2-bin 10 | bsdtar 11 | grep 12 | rsync 13 | xz:xz-utils 14 | curl 15 | xxd 16 | file 17 | git 18 | lsmod:kmod 19 | bc 20 | -------------------------------------------------------------------------------- /stage0/00-configure-apt/files/sources.list: -------------------------------------------------------------------------------- 1 | deb http://raspbian.raspberrypi.org/raspbian/ RELEASE main contrib non-free rpi 2 | # Uncomment line below then 'apt-get update' to enable 'apt-get source' 3 | #deb-src http://raspbian.raspberrypi.org/raspbian/ RELEASE main contrib non-free rpi 4 | -------------------------------------------------------------------------------- /stage3/04-install-sw/03-run.sh: -------------------------------------------------------------------------------- 1 | # Set up browser. 2 | on_chroot << EOF 3 | update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/chromium-browser 86 4 | update-alternatives --install /usr/bin/gnome-www-browser gnome-www-browser /usr/bin/chromium-browser 86 5 | EOF 6 | -------------------------------------------------------------------------------- /stage3/04-install-sw/06-run.sh: -------------------------------------------------------------------------------- 1 | # Set up automatic start of PulseAudio Jack bridge when X gets started. 2 | cp files/pulseaudio-jack.desktop ${ROOTFS_DIR}/etc/xdg/autostart/ 3 | 4 | # configure pulseaudio to get realtime capability 5 | cp files/daemon.conf ${ROOTFS_DIR}/etc/pulse/ 6 | 7 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/Desktop/Update.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Update Apps 3 | Comment=Update Jambox Apps 4 | Icon=/usr/share/hplip/data/images/32x32/download.png 5 | Exec=/usr/local/bin/jambox_update.sh 6 | Type=Application 7 | Encoding=UTF-8 8 | Terminal=true 9 | Categories=None; 10 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/Desktop/jamulus-start.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Jamulus Start 3 | Type=Application 4 | Comment=Online Jamming 5 | Categories=AudioVideo;Audio 6 | Path=/home/pi 7 | Exec=/usr/local/bin/jamulus_start.sh 8 | Terminal=true 9 | Icon=jamulus 10 | GenericName=Jamulus 11 | -------------------------------------------------------------------------------- /stage3/12-install-hpsjam/files/Desktop/hpsjam-start.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=HpsJam Start 3 | Type=Application 4 | Comment=Online Jamming 5 | Categories=AudioVideo;Audio 6 | Path=/home/pi 7 | Exec=/usr/local/bin/hpsjam_start.sh 8 | Terminal=true 9 | Icon=/usr/share/icons/HpsJam.png 10 | GenericName=HpsJam 11 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/Desktop/README.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=README 3 | Comment=Display README file 4 | Icon=/usr/share/icons/gnome/256x256/mimetypes/gnome-mime-text.png 5 | Exec=/usr/bin/retext --preview /home/pi/README.md 6 | Type=Application 7 | Encoding=UTF-8 8 | Terminal=false 9 | Categories=None; 10 | -------------------------------------------------------------------------------- /stage3/02-misc-config2/files/cpu_performance_scaling_governor.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=CPU scaling governor initializer to `performance` 3 | 4 | [Service] 5 | Type=oneshot 6 | ExecStart=/bin/sh -c "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /export-image/00-allow-rerun/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | if [ ! -x "${ROOTFS_DIR}/usr/bin/qemu-arm-static" ]; then 4 | cp /usr/bin/qemu-arm-static "${ROOTFS_DIR}/usr/bin/" 5 | fi 6 | 7 | if [ -e "${ROOTFS_DIR}/etc/ld.so.preload" ]; then 8 | mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled" 9 | fi 10 | -------------------------------------------------------------------------------- /stage3/07-install-boot-script/files/urlrelay.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=urlrelay registration 3 | Wants=network-online.target 4 | After=network-online.target 5 | 6 | [Service] 7 | Type=simple 8 | User=root 9 | WorkingDirectory=/root 10 | ExecStart=/usr/local/bin/urlrelay.sh 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | 15 | -------------------------------------------------------------------------------- /stage3/12-install-hpsjam/files/Desktop/hpsjam-server-start.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=HpsJam Server Start 3 | Type=Application 4 | Comment=Online Jamming 5 | Categories=AudioVideo;Audio 6 | Path=/home/pi 7 | Exec=sudo systemctl start hpsjam-server 8 | Terminal=true 9 | Icon=/usr/share/icons/HpsJam_bw.png 10 | GenericName=HpsJam Server 11 | -------------------------------------------------------------------------------- /stage3/11-install-jammernetz/files/Desktop/jammernetz-start.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=JammerNetz Start 3 | Type=Application 4 | Comment=Online Jamming 5 | Categories=AudioVideo;Audio 6 | Path=/home/pi 7 | Exec=/usr/local/bin/jammernetz_start.sh 8 | Terminal=true 9 | Icon=/usr/share/icons/JammerNetzIcon.png 10 | GenericName=JammerNetzClient 11 | -------------------------------------------------------------------------------- /scripts/remove-comments.sed: -------------------------------------------------------------------------------- 1 | # Deletes comments and collapses whitespace in ##-packages files 2 | 3 | # Append (N)ext line to buffer 4 | # if (!)not ($)buffer is EOF, (b)ranch to (:)label loop 5 | :loop 6 | N 7 | $ !b loop 8 | 9 | # Buffer is "line1\nline2\n...lineN", del comments and collapse whitespace 10 | s/#[^\n]*//g 11 | s/[[:space:]]\{1,\}/ /g 12 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/Desktop/jamulus-server-start.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Jamulus Server Start 3 | Type=Application 4 | Comment=Online Jamming 5 | Categories=AudioVideo;Audio 6 | Path=/home/pi 7 | Exec=sudo systemctl start jamulus-server 8 | Terminal=true 9 | Icon=/usr/share/icons/jamulus-server.png 10 | GenericName=Jamulus Server 11 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/Desktop/Shutdown.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Shutdown 3 | Comment=Shutdown System 4 | Icon=/usr/share/lxsession/images/system-shutdown.png 5 | Exec=lxterminal -t "Shutting down" -e "echo 'shutting down in 5 seconds'; sleep 5; sudo shutdown -h now" 6 | Type=Application 7 | Encoding=UTF-8 8 | Terminal=false 9 | Categories=None; 10 | -------------------------------------------------------------------------------- /stage3/10-install-jamtaba/files/Desktop/jamtaba-start.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=JamTaba Start 3 | Comment=Jamming client for NINJAM servers 4 | GenericName=Jamtaba 2 - Play online music jam sessions. 5 | Path=/home/pi 6 | Exec=/usr/local/bin/jamtaba_start.sh 7 | Icon=Jamtaba2.png 8 | Terminal=true 9 | Type=Application 10 | Categories=AudioVideo;Audio 11 | -------------------------------------------------------------------------------- /stage3/13-install-midi/00-packages: -------------------------------------------------------------------------------- 1 | #a2jmidid 2 | #midipp 3 | #fluidsynth 4 | #fluid-soundfont-gm 5 | ##meterbridge 6 | ##fluid-soundfont-gs 7 | #qsynth 8 | qmidiroute # for viewing ALSA midi messages 9 | #rosegarden 10 | fonts-ubuntu # sans fonts are required if rosegarden is installed 11 | ##vlc 12 | ##vlc-plugin-fluidsynth 13 | ##vlc-plugin-jack 14 | -------------------------------------------------------------------------------- /stage3/12-install-hpsjam/files/HpsJam.conf: -------------------------------------------------------------------------------- 1 | [config] 2 | downlink_format=6 3 | effects_level=0 4 | input_device=-1 5 | input_left=-1 6 | input_right=-1 7 | mixer_cols=257 8 | output_device=-1 9 | output_left=-1 10 | output_right=-1 11 | uplink_format=2 12 | 13 | [connect] 14 | icon=0 15 | list=127.0.0.1:22124 16 | password= 17 | server=127.0.0.1:22124 18 | username= 19 | 20 | -------------------------------------------------------------------------------- /stage3/11-install-jammernetz/files/Desktop/jammernetz-server-start.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=JammerNetz Server Start 3 | Type=Application 4 | Comment=Online Jamming 5 | Categories=AudioVideo;Audio 6 | Path=/home/pi 7 | Exec=sudo systemctl start jammernetz-server 8 | Terminal=true 9 | Icon=/usr/share/icons/JammerNetzIcon_bw.png 10 | GenericName=JammerNetz Server 11 | 12 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/files/console-setup: -------------------------------------------------------------------------------- 1 | # CONFIGURATION FILE FOR SETUPCON 2 | 3 | # Consult the console-setup(5) manual page. 4 | 5 | ACTIVE_CONSOLES="/dev/tty[1-6]" 6 | 7 | CHARMAP="UTF-8" 8 | 9 | CODESET="guess" 10 | FONTFACE="" 11 | FONTSIZE="" 12 | 13 | VIDEOMODE= 14 | 15 | # The following is an example how to use a braille font 16 | # FONT='lat9w-08.psf.gz brl-8x8.psf' 17 | -------------------------------------------------------------------------------- /stage3/09-install-jacktrip/files/Desktop/jacktrip-start.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=JackTrip Start 3 | Comment=GUI wrapper for JackTrip 4 | GenericName=Network Audio Streaming Software 5 | Path=/home/pi 6 | Exec=/usr/local/bin/jacktrip_start.sh 7 | Icon=jacktrip 8 | Terminal=true 9 | Type=Application 10 | Categories=AudioVideo;Audio;Mixer; 11 | Keywords=live;online;music;conference; 12 | -------------------------------------------------------------------------------- /stage3/05-install-rt-kernel/02-run.sh: -------------------------------------------------------------------------------- 1 | # install rt-tests 2 | git clone --depth 1 --branch stable/v1.0 https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/rt-tests/ 3 | 4 | # Copy script for latency test 5 | cp files/gen-latency-plot.sh ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/rt-tests/ 6 | chmod +x ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/rt-tests/gen-latency-plot.sh 7 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/jackdrc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # exec is used to 'morph' the shell interpreter process into jackd process, saving some system resources. 3 | [[ -f /etc/jackdrc.conf ]] && source /etc/jackdrc.conf 4 | JACK_COMMAND="/usr/bin/jackd -t 2000 -R -P ${JACK_PRIORITY:-90} -d alsa -d ${DEVICE:-hw:1,0} -r 48000 -p ${PERIOD:-64} -n ${NPERIODS:-3} -S ${JACK_MIDI_ARG}" 5 | exec $JACK_COMMAND 6 | -------------------------------------------------------------------------------- /stage3/08-install-sonobus/files/Desktop/sonobus-start.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=SonoBus Start 3 | Comment=High Quality Network Audio Streaming 4 | GenericName=Network Audio Streaming Software 5 | Path=/home/pi 6 | Exec=/usr/local/bin/sonobus_start.sh 7 | Icon=sonobus 8 | Terminal=true 9 | Type=Application 10 | Categories=AudioVideo;Audio;Mixer; 11 | Keywords=live;online;music;conference; 12 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-patches/07-resize-init.diff: -------------------------------------------------------------------------------- 1 | --- stage2.orig/rootfs/boot/cmdline.txt 2 | +++ stage2/rootfs/boot/cmdline.txt 3 | @@ -1 +1 @@ 4 | -console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait 5 | +console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh 6 | -------------------------------------------------------------------------------- /stage3/04-install-sw/00-packages: -------------------------------------------------------------------------------- 1 | chromium-browser rpi-chromium-mods 2 | # exclude xserver-xorg-video-fbturbo package recommended by raspberrypi-ui-mods 3 | raspberrypi-ui-mods xserver-xorg-video-fbturbo- 4 | gnome-themes-standard-data gtk2-engines 5 | libasound2 libasound2-dev libasound2-plugins 6 | gir1.2-gst-plugins-base-0.10 7 | network-manager-gnome blueman vim lxplug-volume 8 | retext 9 | iotop 10 | wmctrl 11 | tree 12 | -------------------------------------------------------------------------------- /stage3/03-install-jack/files/jack.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=JACK Server 3 | After=sound.target 4 | #Conflicts=jamulus-server.service jamulus-server2.service 5 | 6 | [Service] 7 | LimitRTPRIO=95 8 | LimitMEMLOCK=infinity 9 | Environment=JACK_NO_AUDIO_RESERVATION=1 10 | Environment=JACK_PROMISCUOUS_SERVER=jack 11 | ExecStart=/etc/jackdrc 12 | User=jack 13 | Group=jack 14 | UMask=002 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-patches/04-inputrc.diff: -------------------------------------------------------------------------------- 1 | Index: jessie-stage2/rootfs/etc/inputrc 2 | =================================================================== 3 | --- jessie-stage2.orig/rootfs/etc/inputrc 4 | +++ jessie-stage2/rootfs/etc/inputrc 5 | @@ -65,3 +65,7 @@ $endif 6 | # "\e[F": end-of-line 7 | 8 | $endif 9 | + 10 | +# mappings for up and down arrows search history 11 | +# "\e[B": history-search-forward 12 | +# "\e[A": history-search-backward 13 | -------------------------------------------------------------------------------- /stage3/05-install-rt-kernel/files/scarlett-gen3.conf: -------------------------------------------------------------------------------- 1 | options snd_usb_audio device_setup=1,1,1,1 2 | options snd_usb_audio vid=0x1235 pid=0x8210 device_setup=1 3 | options snd_usb_audio vid=0x1235 pid=0x8211 device_setup=1 4 | options snd_usb_audio vid=0x1235 pid=0x8212 device_setup=1 5 | options snd_usb_audio vid=0x1235 pid=0x8213 device_setup=1 6 | options snd_usb_audio vid=0x1235 pid=0x8214 device_setup=1 7 | options snd_usb_audio vid=0x1235 pid=0x8215 device_setup=1 8 | -------------------------------------------------------------------------------- /stage3/09-install-jacktrip/files/jacktrip_start.conf: -------------------------------------------------------------------------------- 1 | # 2 | # File: ~/.config/jacktrip_start.conf 3 | # 4 | # Optional configuration parameters for "jacktrip_start.sh" 5 | # 6 | # MASTER_LEVEL= # force alsamixer master level to this value when starting. (default unset) 7 | # CAPTURE_LEVEL= # force alsamixer capture level to this value when starting. (default: unset) 8 | 9 | MASTER_LEVEL="80%" 10 | CAPTURE_LEVEL="80%" 11 | -------------------------------------------------------------------------------- /stage3/03-install-jack/01-run.sh: -------------------------------------------------------------------------------- 1 | 2 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/aj-snapshot 3 | cp files/*.xml ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/aj-snapshot 4 | 5 | cp files/jack.service ${ROOTFS_DIR}/usr/lib/systemd/system/ 6 | 7 | on_chroot << EOF 8 | adduser --no-create-home --system --group jack 9 | adduser jack audio --quiet 10 | adduser pi jack --quiet 11 | adduser root jack --quiet 12 | echo "JACK_PROMISCUOUS_SERVER=jack" >> /etc/environment 13 | systemctl enable jack 14 | EOF 15 | 16 | -------------------------------------------------------------------------------- /export-image/03-set-partuuid/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" 4 | 5 | IMGID="$(dd if="${IMG_FILE}" skip=440 bs=1 count=4 2>/dev/null | xxd -e | cut -f 2 -d' ')" 6 | 7 | BOOT_PARTUUID="${IMGID}-01" 8 | ROOT_PARTUUID="${IMGID}-02" 9 | 10 | sed -i "s/BOOTDEV/PARTUUID=${BOOT_PARTUUID}/" "${ROOTFS_DIR}/etc/fstab" 11 | sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS_DIR}/etc/fstab" 12 | 13 | sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" "${ROOTFS_DIR}/boot/cmdline.txt" 14 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/files/rc.local: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # 3 | # rc.local 4 | # 5 | # This script is executed at the end of each multiuser runlevel. 6 | # Make sure that the script will "exit 0" on success or any other 7 | # value on error. 8 | # 9 | # In order to enable or disable this script just change the execution 10 | # bits. 11 | # 12 | # By default this script does nothing. 13 | 14 | # Print the IP address 15 | _IP=$(hostname -I) || true 16 | if [ "$_IP" ]; then 17 | printf "My IP address is %s\n" "$_IP" 18 | fi 19 | 20 | exit 0 21 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BASE_IMAGE=debian:buster 2 | FROM ${BASE_IMAGE} 3 | 4 | ENV DEBIAN_FRONTEND noninteractive 5 | 6 | RUN apt-get -y update && \ 7 | apt-get -y install --no-install-recommends \ 8 | git vim parted \ 9 | quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \ 10 | bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file kmod bc\ 11 | binfmt-support ca-certificates \ 12 | && rm -rf /var/lib/apt/lists/* 13 | 14 | COPY . /pi-gen/ 15 | 16 | VOLUME [ "/pi-gen/work", "/pi-gen/deploy"] 17 | -------------------------------------------------------------------------------- /stage1/01-sys-tweaks/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | install -d "${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d" 4 | install -m 644 files/noclear.conf "${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d/noclear.conf" 5 | install -v -m 644 files/fstab "${ROOTFS_DIR}/etc/fstab" 6 | 7 | on_chroot << EOF 8 | if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then 9 | adduser --disabled-password --gecos "" ${FIRST_USER_NAME} 10 | fi 11 | echo "${FIRST_USER_NAME}:${FIRST_USER_PASS}" | chpasswd 12 | echo "root:root" | chpasswd 13 | EOF 14 | 15 | 16 | -------------------------------------------------------------------------------- /stage3/01-misc-config/00-run.sh: -------------------------------------------------------------------------------- 1 | # Enable ssh. 2 | touch ${ROOTFS_DIR}/boot/ssh 3 | 4 | # Set the new hostname. 5 | #CURRENT_HOSTNAME=`cat ${ROOTFS_DIR}/etc/hostname | tr -d " \t\n\r"` 6 | #echo $HOSTNAME > ${ROOTFS_DIR}/etc/hostname 7 | #sed -i 's/127.0.1.1.*'"$CURRENT_HOSTNAME"'/127.0.1.1\t'"$HOSTNAME"'/g' ${ROOTFS_DIR}/etc/hosts 8 | 9 | # Boot to console by default. 10 | on_chroot << EOF 11 | systemctl set-default multi-user.target 12 | ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service 13 | EOF 14 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/Jamulusserver.ini: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0 4 | 0 5 | en 6 | 7 | 8 | 225 9 | 0 10 | 11 | AdnQywACAAAAAADOAAAANAAAAxsAAAKBAAAA0AAAAFIAAAMbAAACgQAAAAAAAAAABAA= 12 | 13 | 0 14 | 0 15 | 16 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/Jamulusserver2.ini: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0 4 | 0 5 | en 6 | 7 | 8 | 225 9 | 0 10 | 11 | AdnQywACAAAAAADOAAAANAAAAxsAAAKBAAAA0AAAAFIAAAMbAAACgQAAAAAAAAAABAA= 12 | 13 | 0 14 | 0 15 | 16 | -------------------------------------------------------------------------------- /stage3/02-misc-config2/files/rules.v4: -------------------------------------------------------------------------------- 1 | *filter 2 | :INPUT DROP [0:0] 3 | :FORWARD DROP [0:0] 4 | :OUTPUT ACCEPT [0:0] 5 | -A INPUT -i lo -j ACCEPT 6 | -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT 7 | -A INPUT -s 192.168.0.0/16 -j ACCEPT 8 | -A INPUT -s 10.0.0.0/8 -j ACCEPT 9 | -A INPUT -s 172.16.0.0/12 -j ACCEPT 10 | -A INPUT -p udp -m udp --dport 22134 -j ACCEPT 11 | -A INPUT -p udp -m udp --dport 22124 -j ACCEPT 12 | -A INPUT -p udp -m udp --dport 10998 -j ACCEPT 13 | -A OUTPUT -o lo -j ACCEPT 14 | -A OUTPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT 15 | COMMIT 16 | -------------------------------------------------------------------------------- /stage3/05-install-rt-kernel/00-packages: -------------------------------------------------------------------------------- 1 | # install gnuplot for latency analysis 2 | gnuplot 3 | 4 | # install 5.15 32-bit low-latency PREEMPT kernel 5 | linux-image-5.15.10-llat-v7+ 6 | 7 | # install 5.15 32-bit PREEMPT_RT kernel 8 | linux-image-5.15.10-rt24-v7l+ 9 | 10 | # install 5.10 32-bit low-latency PREEMPT kernel 11 | linux-image-5.10.74-llat-v7+ 12 | 13 | # install 5.10 64-bit low-latency PREEMPT kernel 14 | #linux-image-5.10.74-llat-v8+ 15 | 16 | # install 5.10 32-bit PREEMPT_RT kernel 17 | linux-image-5.10.74-rt54-v7l+ 18 | 19 | # install 5.10 64-bit PREEMPT_RT kernel 20 | # linux-image-5.10.74-rt54-v8+ 21 | -------------------------------------------------------------------------------- /stage3/09-install-jacktrip/01-run.sh: -------------------------------------------------------------------------------- 1 | # Install desktop shortcut. 2 | 3 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop 4 | cp files/Desktop/*.desktop ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop/ 5 | cp files/Desktop/*.desktop ${ROOTFS_DIR}/usr/share/applications/ 6 | 7 | echo "NoDisplay=true" >> ${ROOTFS_DIR}/usr/share/applications/jacktrip.desktop 8 | 9 | cp files/jacktrip_start.sh ${ROOTFS_DIR}/usr/local/bin/ 10 | chmod +x ${ROOTFS_DIR}/usr/local/bin/jacktrip_start.sh 11 | 12 | cp files/jacktrip_start.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/ 13 | 14 | on_chroot << EOF 15 | ln -s /usr/bin/jackd /usr/bin/jackdmp 16 | EOF 17 | -------------------------------------------------------------------------------- /stage3/04-install-sw/04-run.sh: -------------------------------------------------------------------------------- 1 | # Allow 'startx' to be used over SSH. 2 | sed -i 's/allowed_users=console/allowed_users=anybody/g' ${ROOTFS_DIR}/etc/X11/Xwrapper.config 3 | 4 | # Disable screensaver. 5 | echo mode: off > ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.xscreensaver 6 | 7 | # Fix up policy for 'pi' user. 8 | install -m 644 files/60-desktop-policy.conf ${ROOTFS_DIR}/etc/polkit-1/localauthority.conf.d/ 9 | 10 | # Install hostapd.conf with changed SSID. 11 | install -m 644 files/hostapd.conf ${ROOTFS_DIR}/etc/hostapd/hostapd.conf 12 | 13 | on_chroot << EOF 14 | systemctl disable hostapd.service 15 | systemctl disable ModemManager 16 | EOF 17 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-patches/02-swap.diff: -------------------------------------------------------------------------------- 1 | Index: jessie-stage2/rootfs/etc/dphys-swapfile 2 | =================================================================== 3 | --- jessie-stage2.orig/rootfs/etc/dphys-swapfile 4 | +++ jessie-stage2/rootfs/etc/dphys-swapfile 5 | @@ -13,7 +13,7 @@ 6 | 7 | # set size to absolute value, leaving empty (default) then uses computed value 8 | # you most likely don't want this, unless you have an special disk situation 9 | -#CONF_SWAPSIZE= 10 | +CONF_SWAPSIZE=100 11 | 12 | # set size to computed value, this times RAM size, dynamically adapts, 13 | # guarantees that there is enough swap without wasting disk space on excess 14 | -------------------------------------------------------------------------------- /stage3/99-fixup-perm/00-run.sh: -------------------------------------------------------------------------------- 1 | on_chroot << EOF 2 | chown -R ${FIRST_USER_NAME} /home/${FIRST_USER_NAME} 3 | chgrp -R ${FIRST_USER_NAME} /home/${FIRST_USER_NAME} 4 | # make conf files editable by pi user 5 | chown root:${FIRST_USER_NAME} /etc/jackdrc.conf 6 | chmod g+w /etc/jackdrc.conf 7 | chown root:${FIRST_USER_NAME} /etc/urlrelay/urlrelay.conf 8 | chmod g+w /etc/urlrelay/urlrelay.conf 9 | if ! grep -q "swappiness" /etc/sysctl.conf; then 10 | sudo echo "vm.swappiness = 10" >> /etc/sysctl.conf 11 | fi 12 | if ! grep -q "max_user_watches" /etc/sysctl.conf; then 13 | sudo echo "fs.inotify.max_user_watches = 524288" >> /etc/sysctl.conf 14 | fi 15 | EOF 16 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/pcmanfm.conf: -------------------------------------------------------------------------------- 1 | [config] 2 | bm_open_method=0 3 | 4 | [volume] 5 | mount_on_startup=1 6 | mount_removable=1 7 | autorun=1 8 | 9 | [ui] 10 | always_show_tabs=0 11 | max_tab_chars=32 12 | win_width=943 13 | win_height=653 14 | splitter_pos=288 15 | media_in_new_tab=0 16 | desktop_folder_new_win=0 17 | change_tab_on_drop=1 18 | close_on_unmount=1 19 | focus_previous=0 20 | side_pane_mode=dirtree 21 | view_mode=icon 22 | show_hidden=0 23 | sort=name;ascending; 24 | columns=name;size;mtime; 25 | toolbar=newtab;navigation;home; 26 | show_statusbar=1 27 | pathbar_mode_buttons=0 28 | prefs_app=SUDO_ASKPASS=/usr/lib/pipanel/pwdpip.sh pipanel 29 | common_bg=0 30 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/files/resize2fs_once: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: resize2fs_once 4 | # Required-Start: 5 | # Required-Stop: 6 | # Default-Start: 3 7 | # Default-Stop: 8 | # Short-Description: Resize the root filesystem to fill partition 9 | # Description: 10 | ### END INIT INFO 11 | . /lib/lsb/init-functions 12 | case "$1" in 13 | start) 14 | log_daemon_msg "Starting resize2fs_once" 15 | ROOT_DEV=$(findmnt / -o source -n) && 16 | resize2fs $ROOT_DEV && 17 | update-rc.d resize2fs_once remove && 18 | rm /etc/init.d/resize2fs_once && 19 | log_end_msg $? 20 | ;; 21 | *) 22 | echo "Usage: $0 start" >&2 23 | exit 3 24 | ;; 25 | esac 26 | -------------------------------------------------------------------------------- /stage3/04-install-sw/00-packages-nr: -------------------------------------------------------------------------------- 1 | git 2 | audacity 3 | patchage 4 | #aconnectgui 5 | realvnc-vnc-server 6 | xserver-xorg-video-fbdev xserver-xorg xinit xserver-xorg-legacy 7 | # don't install xserver-xorg-video-fbturbo, it causes Jamulus jitter with default SwapbuffersWait=true, 8 | # also causes Qt5 apps to issue warning: "libEGL warning: DRI2: failed to authenticate" 9 | # xserver-xorg-video-fbturbo 10 | # xscreensaver 11 | lxde lxtask menu-xdg # gksu 12 | lxrandr 13 | xdg-utils gvfs-backends gvfs-fuse 14 | lightdm gnome-themes-standard-data gnome-icon-theme 15 | liblo7 liblo-dev jackd2 libjack-jackd2-0 16 | hostapd 17 | python-numpy 18 | libqt5xml5 19 | libqt5concurrent5 20 | qjackctl 21 | pimixer 22 | arandr 23 | qasmixer 24 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-packages: -------------------------------------------------------------------------------- 1 | ssh less fbset sudo psmisc strace ed ncdu crda 2 | console-setup keyboard-configuration debconf-utils parted unzip 3 | build-essential manpages-dev python bash-completion gdb pkg-config 4 | python-rpi.gpio v4l-utils 5 | avahi-daemon 6 | lua5.1 7 | luajit 8 | hardlink ca-certificates curl 9 | fake-hwclock nfs-common usbutils 10 | libraspberrypi-dev libraspberrypi-doc libfreetype6-dev 11 | dosfstools 12 | dphys-swapfile 13 | raspberrypi-sys-mods 14 | pi-bluetooth 15 | apt-listchanges 16 | usb-modeswitch 17 | libpam-chksshpwd 18 | rpi-update 19 | libmtp-runtime 20 | rsync 21 | htop 22 | man-db 23 | policykit-1 24 | ssh-import-id 25 | rng-tools 26 | ethtool 27 | vl805fw 28 | ntfs-3g 29 | pciutils 30 | rpi-eeprom 31 | raspinfo 32 | -------------------------------------------------------------------------------- /stage0/00-configure-apt/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | install -m 644 files/sources.list "${ROOTFS_DIR}/etc/apt/" 4 | install -m 644 files/raspi.list "${ROOTFS_DIR}/etc/apt/sources.list.d/" 5 | sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list" 6 | sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.list" 7 | 8 | if [ -n "$APT_PROXY" ]; then 9 | install -m 644 files/51cache "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" 10 | sed "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" -i -e "s|APT_PROXY|${APT_PROXY}|" 11 | else 12 | rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" 13 | fi 14 | 15 | on_chroot apt-key add - < files/raspberrypi.gpg.key 16 | on_chroot << EOF 17 | apt-get update 18 | apt-get dist-upgrade -y 19 | EOF 20 | -------------------------------------------------------------------------------- /stage3/08-install-sonobus/files/sonobus_start.conf: -------------------------------------------------------------------------------- 1 | # 2 | # File: ~/.config/sonobus_start.conf 3 | # 4 | # Optional configuration parameters for "sonobus_start.sh" 5 | # 6 | # SONOBUS_AUTOSTART=1 # 1=automatically start SonoBus at boot time 7 | # MASTER_LEVEL= # force alsamixer master level to this value when starting. (default unset) 8 | # CAPTURE_LEVEL= # force alsamixer capture level to this value when starting. (default: unset) 9 | # AJ_SNAPSHOT= # file name of alsa/jack connection snapshot, default: unset (let SonoBus patch) 10 | 11 | SONOBUS_AUTOSTART=0 12 | MASTER_LEVEL="80%" 13 | CAPTURE_LEVEL="80%" 14 | #AJ_SNAPSHOT=ajs-sonobus-stereo.xml 15 | -------------------------------------------------------------------------------- /stage3/12-install-hpsjam/files/hpsjam_start.conf: -------------------------------------------------------------------------------- 1 | # 2 | # File: ~/.config/hpsjam_start.conf 3 | # 4 | # Optional configuration parameters for "hpsjam_start.sh" 5 | # 6 | # HPSJAM_AUTOSTART=1 # 1=automatically start HpsJam client at boot time 7 | # MASTER_LEVEL= # force alsamixer master level to this value when starting. (default unset) 8 | # CAPTURE_LEVEL= # force alsamixer capture level to this value when starting. (default: unset) 9 | # AJ_SNAPSHOT= # file name of alsa/jack connection snapshot, default: unset (let JammerNetzClient patch) 10 | 11 | HPSJAM_AUTOSTART=0 12 | MASTER_LEVEL="80%" 13 | CAPTURE_LEVEL="80%" 14 | #AJ_SNAPSHOT=ajs-hpsjam-stereo.xml 15 | -------------------------------------------------------------------------------- /stage3/00-configure-apt/00-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # limit repos to arch=armhf except for jambox-project (for 64-bit kernel) 4 | sed -i 's|^deb http|deb [ arch=armhf ] http|g' ${ROOTFS_DIR}/etc/apt/sources.list 5 | sed -i 's|^deb http|deb [ arch=armhf ] http|g' ${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.list 6 | 7 | install -m 644 files/jambox-project.list ${ROOTFS_DIR}/etc/apt/sources.list.d/ 8 | 9 | on_chroot apt-key add - < files/repo.jambox-project.com.gpg 10 | on_chroot << EOF 11 | dpkg --add-architecture arm64 12 | apt-get clean 13 | 14 | # workaround broken raspberry pi mirrors 15 | #apt-get update 16 | apt -y install python3-pip python3-setuptools python3-wheel 17 | pip3 install apt-smart 18 | apt-smart -c http://mirror.us.leaseweb.net/raspbian/raspbian 19 | apt-smart --max=1 --update-package-lists 20 | EOF 21 | -------------------------------------------------------------------------------- /stage3/04-install-sw/08-run.sh: -------------------------------------------------------------------------------- 1 | # Set up graphical environment appearance. 2 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/pcmanfm/LXDE-pi/ 3 | cp files/desktop-items-0.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/pcmanfm/LXDE-pi/ 4 | cp files/pcmanfm.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/pcmanfm/LXDE-pi/ 5 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/libfm 6 | cp files/libfm.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/libfm/ 7 | # cp files/pi-greeter.conf ${ROOTFS_DIR}/etc/lightdm/ 8 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/lxpanel/LXDE-pi/panels 9 | cp files/lxde-panel ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/lxpanel/LXDE-pi/panels/panel 10 | 11 | # copy config.txt file to /boot to set up display parameters 12 | cp files/config.txt ${ROOTFS_DIR}/boot/ 13 | 14 | -------------------------------------------------------------------------------- /stage3/12-install-hpsjam/01-run.sh: -------------------------------------------------------------------------------- 1 | 2 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop 3 | cp files/Desktop/*.desktop ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop/ 4 | cp files/Desktop/*.desktop ${ROOTFS_DIR}/usr/share/applications/ 5 | cp files/HpsJam_bw.png ${ROOTFS_DIR}/usr/share/icons/ 6 | 7 | cp files/hpsjam_start.sh ${ROOTFS_DIR}/usr/local/bin/ 8 | chmod +x ${ROOTFS_DIR}/usr/local/bin/hpsjam_start.sh 9 | cp files/hpsjam_start.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/ 10 | cp files/HpsJam.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/ 11 | 12 | echo "NoDisplay=true" >> ${ROOTFS_DIR}/usr/share/applications/HpsJam.desktop 13 | 14 | # install hpsjam-server files 15 | cp files/hpsjam-server.service ${ROOTFS_DIR}/usr/lib/systemd/system/ 16 | cp files/hpsjam-server.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/ 17 | -------------------------------------------------------------------------------- /stage3/02-misc-config2/01-run.sh: -------------------------------------------------------------------------------- 1 | install -m 644 files/cpu_performance_scaling_governor.service ${ROOTFS_DIR}/lib/systemd/system 2 | # install -m 644 files/rules.v4 ${ROOTFS_DIR}/etc/iptables 3 | 4 | # disable ipv6 5 | echo "blacklist ipv6" > ${ROOTFS_DIR}/etc/modprobe.d/ipv6.conf 6 | 7 | # Don't log router advertisement messages 8 | sed -i '1s/^/:msg, contains, "Router Advertisement from" stop\n\n/' ${ROOTFS_DIR}/etc/rsyslog.conf 9 | 10 | on_chroot << EOF 11 | systemctl disable wifi-hotspot 12 | systemctl enable cpu_performance_scaling_governor 13 | systemctl disable raspi-config # raspi-config is only enabling 'ondemand' governor as of 2018.08.19 14 | systemctl disable systemd-timesyncd 15 | systemctl enable ntp 16 | systemctl disable apt-daily.timer # to avoid XRun errors 17 | systemctl disable apt-daily-upgrade.timer # to avoid XRun errors 18 | EOF 19 | -------------------------------------------------------------------------------- /stage3/07-install-boot-script/files/unattended: -------------------------------------------------------------------------------- 1 | # 1. MAKING THE SYSTEM WORK. DO NOT REMOVE 2 | mount -t tmpfs tmp /run 3 | mkdir -p /run/systemd 4 | mount / -o remount,rw 5 | sed -i 's| init=.*| init=/usr/lib/raspi-config/init_resize.sh|' /boot/cmdline.txt 6 | 7 | # 2. THE USEFUL PART OF THE SCRIPT 8 | [[ -d /boot/payload/home/pi ]] && sudo -u pi cp --preserve=timestamps -r\ 9 | /boot/payload/home/pi /home/ && rm -rf /boot/payload/home/pi 10 | [[ -d /boot/payload ]] && cp --preserve=timestamps -r /boot/payload/* /\ 11 | && rm -rf /boot/payload 12 | [[ -f /lib/systemd/system/one-time-script.service ]] && ln -s\ 13 | /lib/systemd/system/one-time-script.service\ 14 | /etc/systemd/system/multi-user.target.wants/ 15 | 16 | # 3. CLEANING UP AND REBOOTING 17 | sync 18 | umount /boot 19 | mount / -o remount,ro 20 | sync 21 | echo 1 > /proc/sys/kernel/sysrq 22 | echo b > /proc/sysrq-trigger 23 | sleep 5 24 | -------------------------------------------------------------------------------- /stage3/10-install-jamtaba/01-run.sh: -------------------------------------------------------------------------------- 1 | # Install desktop shortcut. 2 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop 3 | cp files/Desktop/*.desktop ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop/ 4 | cp files/Desktop/*.desktop ${ROOTFS_DIR}/usr/share/applications/ 5 | 6 | echo "NoDisplay=true" >> ${ROOTFS_DIR}/usr/share/applications/Jamtaba2.desktop 7 | 8 | cp files/jamtaba_start.sh ${ROOTFS_DIR}/usr/local/bin/ 9 | chmod +x ${ROOTFS_DIR}/usr/local/bin/jamtaba_start.sh 10 | 11 | cp files/jamtaba_start.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/ 12 | cp files/JamTaba\ 2.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/ 13 | cp files/ajs-jamtaba-stereo.xml ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/aj-snapshot/ 14 | 15 | mkdir -p "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.local/share/JamTaba 2" 16 | cp files/Jamtaba.json "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.local/share/JamTaba 2/" 17 | 18 | -------------------------------------------------------------------------------- /stage3/03-install-jack/files/ajs-jamulus-ch1_only.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /stage3/03-install-jack/files/ajs-jamulus-ch2_only.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/hostapd.conf: -------------------------------------------------------------------------------- 1 | # This is the name of the WiFi interface we configured above 2 | interface=wlan0 3 | 4 | # Use the nl80211 driver with the brcmfmac driver 5 | driver=nl80211 6 | 7 | # This is the name of the network 8 | ssid=Jambox 9 | 10 | # Use the 2.4GHz band 11 | hw_mode=g 12 | 13 | # Use channel 6 14 | channel=6 15 | 16 | # Enable 802.11n 17 | ieee80211n=1 18 | 19 | # Enable WMM 20 | wmm_enabled=1 21 | 22 | # Enable 40MHz channels with 20ns guard interval 23 | ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40] 24 | 25 | # Accept all MAC addresses 26 | macaddr_acl=0 27 | 28 | # Use WPA authentication 29 | auth_algs=1 30 | 31 | # Require clients to know the network name 32 | ignore_broadcast_ssid=0 33 | 34 | # Use WPA2 35 | wpa=2 36 | 37 | # Use a pre-shared key 38 | wpa_key_mgmt=WPA-PSK 39 | 40 | # The network passphrase 41 | wpa_passphrase=JamulusBox 42 | 43 | # Use AES, instead of TKIP 44 | rsn_pairwise=CCMP 45 | -------------------------------------------------------------------------------- /stage3/03-install-jack/files/ajs-jamulus-stereo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-patches/01-useradd.diff: -------------------------------------------------------------------------------- 1 | Index: jessie-stage2/rootfs/etc/default/useradd 2 | =================================================================== 3 | --- jessie-stage2.orig/rootfs/etc/default/useradd 4 | +++ jessie-stage2/rootfs/etc/default/useradd 5 | @@ -5,7 +5,7 @@ 6 | # Similar to DHSELL in adduser. However, we use "sh" here because 7 | # useradd is a low level utility and should be as general 8 | # as possible 9 | -SHELL=/bin/sh 10 | +SHELL=/bin/bash 11 | # 12 | # The default group for users 13 | # 100=users on Debian systems 14 | @@ -29,7 +29,7 @@ SHELL=/bin/sh 15 | # The SKEL variable specifies the directory containing "skeletal" user 16 | # files; in other words, files such as a sample .profile that will be 17 | # copied to the new user's home directory when it is created. 18 | -# SKEL=/etc/skel 19 | +SKEL=/etc/skel 20 | # 21 | # Defines whether the mail spool should be created while 22 | # creating the account 23 | -------------------------------------------------------------------------------- /stage3/03-install-jack/files/ajs-sonobus-stereo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/qasmixer.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | current_device=default 3 | start_device_mode=0 4 | start_user_device=hw:0 5 | tray_is_minimized=false 6 | tray_on_close=true 7 | tray_show_icon=true 8 | wheel_degrees=720 9 | 10 | [device_selection] 11 | selection_db=default 12 | 13 | [main_window] 14 | show_device_selection=true 15 | splitter_state=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0\x84\0\0\0\x8e\x1\xff\xff\xff\xff\x1\0\0\0\x1\0) 16 | window_geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x2\0\0\0\0\0\x80\0\0\0\x96\0\0\x3\x81\0\0\x2\x63\0\0\0\x82\0\0\0\xb4\0\0\x3\x81\0\0\x2\x63\0\0\0\0\0\0\0\0\x4\0) 17 | window_state=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x3\0\0\0\x1\x9c\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0) 18 | 19 | [settings_dialog] 20 | page=0 21 | 22 | [simple_mixer] 23 | show_slider_value_labels=true 24 | show_stream_capture=true 25 | show_stream_playback=true 26 | 27 | [tray_mixer] 28 | balloon_lifetime=4000 29 | device_mode=0 30 | show_balloon=true 31 | user_device=hw:0 32 | -------------------------------------------------------------------------------- /stage3/11-install-jammernetz/files/jammernetz_start.conf: -------------------------------------------------------------------------------- 1 | # 2 | # File: ~/JammerNetz/jammernetz_start.conf 3 | # 4 | # Optional configuration parameters for "jammernetz_start.sh" 5 | # 6 | # JAMMERNETZ_AUTOSTART=1 # 1=automatically start JammerNetzClient at boot time 7 | # MASTER_LEVEL= # force alsamixer master level to this value when starting. (default unset) 8 | # CAPTURE_LEVEL= # force alsamixer capture level to this value when starting. (default: unset) 9 | # AJ_SNAPSHOT= # file name of alsa/jack connection snapshot, default: unset (let JammerNetzClient patch) 10 | # JAMMERNETZ_WINDOW=0,0,10,1020,650 # window position: 0,x,y,width,height 11 | # WINDOW_RESIZE_DELAY=8 # seconds to delay before resizing window 12 | 13 | JAMMERNETZ_AUTOSTART=0 14 | JAMMERNETZ_WINDOW=0,0,10,1020,650 15 | MASTER_LEVEL="80%" 16 | CAPTURE_LEVEL="80%" 17 | #AJ_SNAPSHOT=ajs-jammernetz-stereo.xml 18 | -------------------------------------------------------------------------------- /stage3/03-install-jack/files/ajs-jamulus-dual_mono.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/desktop-items-0.conf: -------------------------------------------------------------------------------- 1 | [*] 2 | desktop_bg=#333333333333 3 | desktop_shadow=#333333333333 4 | desktop_fg=#e8e8e8e8e8e8 5 | desktop_font=Sans 12 6 | wallpaper=/etc/alternatives/desktop-background 7 | wallpaper_mode=center 8 | show_documents=0 9 | show_trash=0 10 | show_mounts=0 11 | 12 | [README.desktop] 13 | x=2 14 | y=60 15 | 16 | [jamulus-start.desktop] 17 | x=2 18 | y=170 19 | 20 | [sonobus-start.desktop] 21 | x=2 22 | y=300 23 | 24 | [jamtaba-start.desktop] 25 | x=2 26 | y=430 27 | 28 | [jacktrip-start.desktop] 29 | x=2 30 | y=560 31 | 32 | [jammernetz-start.desktop] 33 | x=150 34 | y=430 35 | 36 | [hpsjam-start.desktop] 37 | x=150 38 | y=560 39 | 40 | [qasmixer.desktop] 41 | x=860 42 | y=430 43 | 44 | [hpsjam-server-start.desktop] 45 | x=690 46 | y=560 47 | 48 | [jammernetz-server-start.desktop] 49 | x=690 50 | y=430 51 | 52 | [patchage.desktop] 53 | x=860 54 | y=560 55 | 56 | [Update.desktop] 57 | x=860 58 | y=170 59 | 60 | [Shutdown.desktop] 61 | x=860 62 | y=60 63 | 64 | [pimixer.desktop] 65 | x=860 66 | y=300 67 | 68 | [jamulus-server-start.desktop] 69 | x=690 70 | y=300 71 | -------------------------------------------------------------------------------- /stage3/11-install-jammernetz/files/JammerNetz.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /scripts/dependencies_check: -------------------------------------------------------------------------------- 1 | # dependencies_check 2 | # $@ Dependency files to check 3 | # 4 | # Each dependency is in the form of a tool to test for, optionally followed by 5 | # a : and the name of a package if the package on a Debian-ish system is not 6 | # named for the tool (i.e., qemu-user-static). 7 | dependencies_check() 8 | { 9 | local depfile deps missing 10 | 11 | for depfile in "$@"; do 12 | if [[ -e "$depfile" ]]; then 13 | deps="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${BASE_DIR}/depends")" 14 | 15 | fi 16 | for dep in $deps; do 17 | if ! hash "${dep%:*}" 2>/dev/null; then 18 | missing="${missing:+$missing }${dep#*:}" 19 | fi 20 | done 21 | done 22 | 23 | if [[ "$missing" ]]; then 24 | echo "Required dependencies not installed" 25 | echo 26 | echo "This can be resolved on Debian/Raspbian systems by installing:" 27 | echo "$missing" 28 | false 29 | fi 30 | 31 | 32 | if ! grep -q "/proc/sys/fs/binfmt_misc" /proc/mounts; then 33 | echo "Module binfmt_misc not loaded in host" 34 | echo "Please run:" 35 | echo " sudo modprobe binfmt_misc" 36 | exit 1 37 | fi 38 | } 39 | -------------------------------------------------------------------------------- /stage3/11-install-jammernetz/files/jammernetz-server.conf: -------------------------------------------------------------------------------- 1 | # 2 | # File: /home/pi/JammerNetz/jammernetz-server.conf 3 | # 4 | # To start jammernetz-server: sudo systemctl start jammernetz-server 5 | # To enable automatic startup: sudo systemctl enable jammernetz-server 6 | # 7 | # Running a Jammeretz server behind a NAT router may 8 | # require port forwarding to be set up on your router. 9 | # see: https://www.howtogeek.com/66214/how-to-forward-ports-on-your-router/ 10 | # 11 | # 12 | # JammerNetz Server config file 13 | # 14 | # optional server command line arguments 15 | # 16 | # KEY= # default: /home/pi/JammerNetz/zeros.bin 17 | # PORT= # default: 7777 18 | # BUFFER= # default: 4 19 | # WAIT= # default: 6 20 | # PREFILL= # default: 4 21 | # WINDOW_TITLE="" # default: JammerNetzServer 22 | # 23 | 24 | #KEY=/home/pi/JammerNetz/zeros.bin 25 | #PORT=7777 26 | #BUFFER=4 27 | #WAIT=6 28 | #PREFILL=4 29 | #WINDOW_TITLE="JammerNetzServer" 30 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/libfm.conf: -------------------------------------------------------------------------------- 1 | # Configuration file for the libfm version 1.3.1. 2 | # Autogenerated file, don't edit, your changes will be overwritten. 3 | 4 | [config] 5 | single_click=0 6 | use_trash=1 7 | confirm_del=1 8 | confirm_trash=1 9 | advanced_mode=0 10 | si_unit=0 11 | force_startup_notify=1 12 | backup_as_hidden=1 13 | no_usb_trash=1 14 | no_child_non_expandable=0 15 | show_full_names=0 16 | only_user_templates=0 17 | template_run_app=0 18 | template_type_once=0 19 | auto_selection_delay=600 20 | drop_default_action=auto 21 | defer_content_test=0 22 | quick_exec=1 23 | show_internal_volumes=0 24 | terminal=x-terminal-emulator %s 25 | archiver=xarchiver 26 | thumbnail_local=1 27 | thumbnail_max=2048 28 | smart_desktop_autodrop=1 29 | cutdown_menus=1 30 | cutdown_places=1 31 | real_expanders=1 32 | 33 | [ui] 34 | big_icon_size=48 35 | small_icon_size=24 36 | pane_icon_size=24 37 | thumbnail_size=80 38 | show_thumbnail=1 39 | shadow_hidden=0 40 | 41 | [places] 42 | places_home=1 43 | places_desktop=0 44 | places_root=1 45 | places_computer=0 46 | places_trash=0 47 | places_applications=0 48 | places_network=0 49 | places_unmounted=1 50 | places_volmounts=1 51 | -------------------------------------------------------------------------------- /stage3/04-install-sw/02-run.sh: -------------------------------------------------------------------------------- 1 | # Setup VNC server. 2 | 3 | # install noVNC 4 | git clone --depth 1 --branch v1.3.0 https://github.com/novnc/noVNC.git ${ROOTFS_DIR}/usr/local/noVNC 5 | git clone --depth 1 --branch v0.10.0 https://github.com/novnc/websockify.git ${ROOTFS_DIR}/usr/local/noVNC/utils/websockify 6 | cp ${ROOTFS_DIR}/usr/local/noVNC/vnc.html ${ROOTFS_DIR}/usr/local/noVNC/index.html 7 | 8 | # install novnc service file 9 | install -m 644 files/novnc.service ${ROOTFS_DIR}/lib/systemd/system 10 | 11 | # VNC password is stored in encrypted form. 12 | # generate encrypted password with: 13 | # echo <vnc_password> | vncpasswd -print 14 | # Default VNC password is "jambox" 15 | # VNC password may be set in config file as follows: 16 | # export VNC_PASS_CRYPT="70dc86dbbe2f1bc7" 17 | # 18 | [[ -z "$VNC_PASS_CRYPT" ]] && VNC_PASS_CRYPT="70dc86dbbe2f1bc7" 19 | 20 | mkdir -p ${ROOTFS_DIR}/root/.vnc/config.d 21 | cat << EOF >> ${ROOTFS_DIR}/root/.vnc/config.d/vncserver-x11 22 | Authentication=VncAuth 23 | Encryption=PreferOff 24 | Password=${VNC_PASS_CRYPT} 25 | EOF 26 | 27 | on_chroot << EOF 28 | systemctl enable vncserver-x11-serviced.service 29 | systemctl enable novnc.service 30 | EOF 31 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-patches/05-path.diff: -------------------------------------------------------------------------------- 1 | Index: jessie-stage2/rootfs/etc/login.defs 2 | =================================================================== 3 | --- jessie-stage2.orig/rootfs/etc/login.defs 4 | +++ jessie-stage2/rootfs/etc/login.defs 5 | @@ -100,7 +100,7 @@ HUSHLOGIN_FILE .hushlogin 6 | # 7 | # (they are minimal, add the rest in the shell startup files) 8 | ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | -ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games 10 | +ENV_PATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games 11 | 12 | # 13 | # Terminal permissions 14 | Index: jessie-stage2/rootfs/etc/profile 15 | =================================================================== 16 | --- jessie-stage2.orig/rootfs/etc/profile 17 | +++ jessie-stage2/rootfs/etc/profile 18 | @@ -4,7 +4,7 @@ 19 | if [ "`id -u`" -eq 0 ]; then 20 | PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 21 | else 22 | - PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" 23 | + PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games" 24 | fi 25 | export PATH 26 | 27 | -------------------------------------------------------------------------------- /stage3/12-install-hpsjam/files/hpsjam-server.conf: -------------------------------------------------------------------------------- 1 | # 2 | # File: /home/pi/.config/hpsjam-server.conf 3 | # 4 | # To start hpsjam-server: sudo systemctl start hpsjam-server 5 | # To enable automatic startup: sudo systemctl enable hpsjam-server 6 | # 7 | # Running an HpsJam server behind a NAT router may 8 | # require port forwarding to be set up on your router. 9 | # see: https://www.howtogeek.com/66214/how-to-forward-ports-on-your-router/ 10 | # 11 | # HpsJam Server on Jambox runs in a terminal window. 12 | # This is not required, because there is no output to display. 13 | # It is done to give a visual indication that it is running, 14 | # and to make it easy to shut down. 15 | # 16 | # 17 | # HpsJam Server config file 18 | # 19 | # optional server command line arguments 20 | # 21 | 22 | # PORT=<UDP port number> # default: 22124 23 | # PEERS=<1..256t> # default: 8 24 | # HTTPD=<servername:port> # default: 127.0.0.1:80 25 | # HTTPD_CONNS=<max number of connections> # default: 1 26 | # NCPU=<# CPUS> # default: 4 27 | # WELCOME_MSG_FILE=</path/to/file> # default: unset 28 | # WINDOW_TITLE # default: "HpsJam Server" 29 | 30 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/jns/jamulus_start.conf: -------------------------------------------------------------------------------- 1 | # 2 | # File: ~/.config/Jamulus/jamulus_start.conf 3 | # 4 | # Optional configuration parameters for "jamulus_start.sh" 5 | # 6 | # JAMULUS_AUTOSTART=1 # 1=automatically start Jamulus at boot time 7 | # JAMULUS_SERVER=<jamulus_server_dns_name_or_ip> # automatically connect to this server, then shut down after 120 mins. (default unset) 8 | # MASTER_LEVEL=<level%> # force alsamixer master level to this value when starting. (default unset) 9 | # CAPTURE_LEVEL=<level%> # force alsamixer capture level to this value when starting. (default: unset) 10 | # AJ_SNAPSHOT=<snapshot_file_name> # file name of alsa/jack connection snapshot, default: ajs-jamulus-stereo.xml (2 input channels fed separately to Jamulus) 11 | # JAMULUS_TIMEOUT=<timeout> # if auto-connecting to JAMULUS_SERVER, time out and shut down after <timeout> (default "120m") 12 | # JAMULUS_ALSA_DEVICE=<alsa_device> # Alsa card of USB Interface (default "card 2") 13 | 14 | JAMULUS_AUTOSTART=1 15 | JAMULUS_SERVER=room1.jazznightschool.org 16 | JAMULUS_TIMEOUT=120m 17 | MASTER_LEVEL="80%" 18 | CAPTURE_LEVEL="80%" 19 | AJ_SNAPSHOT=ajs-jamulus-stereo.xml 20 | -------------------------------------------------------------------------------- /stage1/01-sys-tweaks/00-patches/01-bashrc.diff: -------------------------------------------------------------------------------- 1 | --- a/rootfs/etc/skel/.bashrc 2 | +++ b/rootfs/etc/skel/.bashrc 3 | @@ -43,7 +43,7 @@ 4 | # uncomment for a colored prompt, if the terminal has the capability; turned 5 | # off by default to not distract the user: the focus in a terminal window 6 | # should be on the output of commands, not on the prompt 7 | -#force_color_prompt=yes 8 | +force_color_prompt=yes 9 | 10 | if [ -n "$force_color_prompt" ]; then 11 | if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 12 | @@ -57,7 +57,7 @@ 13 | fi 14 | 15 | if [ "$color_prompt" = yes ]; then 16 | - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' 17 | + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\] ' 18 | else 19 | PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 20 | fi 21 | @@ -79,9 +79,9 @@ 22 | #alias dir='dir --color=auto' 23 | #alias vdir='vdir --color=auto' 24 | 25 | - #alias grep='grep --color=auto' 26 | - #alias fgrep='fgrep --color=auto' 27 | - #alias egrep='egrep --color=auto' 28 | + alias grep='grep --color=auto' 29 | + alias fgrep='fgrep --color=auto' 30 | + alias egrep='egrep --color=auto' 31 | fi 32 | 33 | # colored GCC warnings and errors 34 | -------------------------------------------------------------------------------- /stage2/02-net-tweaks/01-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | install -v -d "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d" 4 | install -v -m 644 files/wait.conf "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/" 5 | 6 | install -v -d "${ROOTFS_DIR}/etc/wpa_supplicant" 7 | install -v -m 600 files/wpa_supplicant.conf "${ROOTFS_DIR}/etc/wpa_supplicant/" 8 | 9 | if [ -v WPA_COUNTRY ]; then 10 | echo "country=${WPA_COUNTRY}" >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf" 11 | fi 12 | 13 | if [ -v WPA_ESSID ] && [ -v WPA_PASSWORD ]; then 14 | on_chroot <<EOF 15 | set -o pipefail 16 | wpa_passphrase "${WPA_ESSID}" "${WPA_PASSWORD}" | tee -a "/etc/wpa_supplicant/wpa_supplicant.conf" 17 | EOF 18 | elif [ -v WPA_ESSID ]; then 19 | cat >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf" << EOL 20 | 21 | network={ 22 | ssid="${WPA_ESSID}" 23 | key_mgmt=NONE 24 | } 25 | EOL 26 | fi 27 | 28 | # Disable wifi on 5GHz models if WPA_COUNTRY is not set 29 | mkdir -p "${ROOTFS_DIR}/var/lib/systemd/rfkill/" 30 | if [ -n "$WPA_COUNTRY" ]; then 31 | echo 0 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-3f300000.mmcnr:wlan" 32 | echo 0 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-fe300000.mmcnr:wlan" 33 | else 34 | echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-3f300000.mmcnr:wlan" 35 | echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-fe300000.mmcnr:wlan" 36 | fi 37 | -------------------------------------------------------------------------------- /stage3/10-install-jamtaba/files/ajs-jamtaba-stereo.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <aj-snapshot> 3 | <alsa> 4 | <client name="System"> 5 | <port id="0" /> 6 | <port id="1" /> 7 | </client> 8 | <client name="Midi Through"> 9 | <port id="0"> 10 | <connection client="RtMidi Input Client" port="0" /> 11 | </port> 12 | </client> 13 | <client name="jack_midi" /> 14 | <client name="RtMidi Input Client" /> 15 | <client name="Patchage" /> 16 | </alsa> 17 | <jack> 18 | <client name="system"> 19 | <port name="capture_1"> 20 | <connection port="JamTaba_INput:front-left" /> 21 | <connection port="PortAudio:in_0" /> 22 | </port> 23 | <port name="capture_2"> 24 | <connection port="JamTaba_INput:front-right" /> 25 | <connection port="PortAudio:in_1" /> 26 | </port> 27 | <port name="midi_capture_1" /> 28 | </client> 29 | <client name="PortAudio"> 30 | <port name="out_0"> 31 | <connection port="system:playback_1" /> 32 | </port> 33 | <port name="out_1"> 34 | <connection port="system:playback_2" /> 35 | </port> 36 | </client> 37 | <client name="JamTaba_OUTput"> 38 | <port name="front-left"> 39 | <connection port="system:playback_1" /> 40 | </port> 41 | <port name="front-right"> 42 | <connection port="system:playback_2" /> 43 | </port> 44 | </client> 45 | </jack> 46 | </aj-snapshot> 47 | -------------------------------------------------------------------------------- /stage3/11-install-jammernetz/files/jammernetz-server.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=jammernetz-server 3 | After=network.target 4 | After=graphical.target 5 | Conflicts=jack.service 6 | 7 | [Service] 8 | Type=simple 9 | Environment=DISPLAY=:0 10 | Environment=XAUTHORITY=/home/pi/.Xauthority 11 | # 12 | # Environment settings here are intended as defaults which can be 13 | # overridden by the EnvironmentFile /home/pi/JammerNetz/jammernetz-server.conf 14 | # Make Environment changes in that file, not here. 15 | # 16 | Environment=KEY=/home/pi/JammerNetz/zeros.bin 17 | Environment=PORT=7777 18 | Environment=BUFFER=4 19 | Environment=WAIT=6 20 | Environment=PREFILL=4 21 | Environment=WINDOW_TITLE=JammerNetzServer 22 | Environment=XDG_RUNTIME_DIR=/var/run/jammernetz-server 23 | EnvironmentFile=-/home/pi/JammerNetz/jammernetz-server.conf 24 | RuntimeDirectory=jammernetz-server 25 | User=pi 26 | NoNewPrivileges=true 27 | ProtectSystem=true 28 | IOSchedulingClass=realtime 29 | IOSchedulingPriority=1 30 | CPUSchedulingPolicy=fifo 31 | CPUSchedulingPriority=90 32 | 33 | ExecStartPre=-/bin/bash -c "XDG_RUNTIME_DIR=/run/user/$(id -u pi) /usr/bin/pulseaudio --kill" 34 | ExecStart=/usr/bin/lxterminal -t ${WINDOW_TITLE} -e '/usr/bin/JammerNetzServer --key=${KEY} --port=${PORT} --buffer=${BUFFER} --wait=${WAIT} --prefill=${PREFILL}' 35 | 36 | StandardOutput=journal 37 | StandardError=inherit 38 | SyslogIdentifier=jammernetz-server 39 | 40 | [Install] 41 | WantedBy=multi-user.target 42 | -------------------------------------------------------------------------------- /stage3/09-install-jacktrip/files/jacktrip_start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | JACK_APP=jacktrip 3 | sudo systemctl set-environment JACK_APP=jacktrip 4 | 5 | if [ -f ~/.config/jacktrip_start.conf ]; then 6 | source ~/.config/jacktrip_start.conf 7 | fi 8 | 9 | # Audio interface is chosen in /etc/jackdrc.conf 10 | # source it here to determine the device to use 11 | if [ -f /etc/jackdrc.conf ]; then 12 | source /etc/jackdrc.conf 13 | fi 14 | 15 | echo ALSA Device: $DEVICE 16 | ALSA_READY=no 17 | until [[ $ALSA_READY == "yes" ]]; do 18 | aplay -L | grep -q "$DEVICE" 19 | PLAY_RESULT=$? 20 | arecord -L | grep -q "$DEVICE" 21 | RECORD_RESULT=$? 22 | if [[ "$PLAY_RESULT" == "0" ]] && [[ "$RECORD_RESULT" == "0" ]]; then 23 | ALSA_READY=yes 24 | else 25 | echo "ALSA Device $DEVICE is not available: PLAY_RESULT: $PLAY_RESULT, RECORD_RESULT: $RECORD_RESULT" 26 | sleep 5 27 | fi 28 | done 29 | 30 | [[ -n "$MASTER_LEVEL" ]] && amixer set Master $MASTER_LEVEL 31 | [[ -n "$CAPTURE_LEVEL" ]] && amixer set Capture $CAPTURE_LEVEL 32 | 33 | sudo systemctl restart jack 34 | sleep 5 35 | 36 | # check that jack service is running 37 | while [[ "`systemctl show -p SubState --value jack`" != "running" ]] 38 | do 39 | echo "jack SubState is: `systemctl show -p SubState --value jack`; restarting jack" 40 | sudo systemctl restart jack 41 | sleep 5 42 | done 43 | 44 | jacktrip 45 | sudo systemctl unset-environment JACK_APP 46 | sudo systemctl restart jack 47 | exit 0 48 | -------------------------------------------------------------------------------- /stage3/04-install-sw/01-run.sh: -------------------------------------------------------------------------------- 1 | # Copy preconfigured Audacity settings. 2 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.audacity-data 3 | cp files/audacity.cfg ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.audacity-data/ 4 | 5 | # Install desktop shortcuts. 6 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop 7 | cp files/Desktop/*.desktop ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop/ 8 | 9 | # copy patchage initial window settings 10 | cp files/patchagerc ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/ 11 | 12 | # make QjackCtl visible in start menu 13 | #cp files/qjackctl.svg ${ROOTFS_DIR}/usr/share/icons/scalable/apps/ 14 | #sed -i 's/^NoDisplay/#NoDisplay/' ${ROOTFS_DIR}/usr/share/raspi-ui-overrides/applications/qjackctl.desktop 15 | 16 | # make lxrandr (Display Settings) visible in start menu 17 | sed -i 's/^NoDisplay/#NoDisplay/' ${ROOTFS_DIR}/usr/share/raspi-ui-overrides/applications/lxrandr.desktop 18 | 19 | # Copy preconfigured vim settings. 20 | cp files/.vimrc ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/ 21 | cp files/.vimrc ${ROOTFS_DIR}/root/ 22 | 23 | # Copy README file 24 | cp files/README.md ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/ 25 | 26 | # Copy jambox update script 27 | cp files/jambox_update.sh ${ROOTFS_DIR}/usr/local/bin/ 28 | chmod +x ${ROOTFS_DIR}/usr/local/bin/jambox_update.sh 29 | 30 | # Copy qasmixer default settings 31 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/qastools 32 | cp files/qasmixer.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/qastools/ 33 | 34 | -------------------------------------------------------------------------------- /stage3/07-install-boot-script/files/urlrelay.conf: -------------------------------------------------------------------------------- 1 | # 2 | # File: /etc/urlrelay/urlrelay.conf 3 | # 4 | # Configuration for urlrelay service, which passes a local URL to any web browser on same local network 5 | # 6 | # "urlrelay" service registers this device's local url with urlrelay.com. 7 | # urlrelay.com will redirect any access request from same source IP to this device. 8 | # 9 | # This file is sourced by /usr/local/bin/urlrelay.sh 10 | # 11 | # urlrelay Configuration Parameters: 12 | # 13 | # NODE_ID Node ID of this device (default: 1) 14 | # 15 | # URL Full url, may contain shell variable ${MY_IP} for local IP 16 | # default, redirect to noVNC: http://${MY_IP}:6080${URL_ARGS} 17 | # 18 | # URL_ARGS query string, i.e. "/?password=jambox" (default: "") 19 | # Password is the VNC password, not the linux user password. 20 | # This is set to "jambox" here and in VNC for easy login. 21 | # If you want noVNC to require typing a password, delete or comment out the "URL_ARGS" line below, 22 | # then set a different VNC password with the "vncpasswd" command. 23 | # 24 | # REQUIRE_ID 0: (default) don't require node ID if this is the only device on this local network 25 | # 1: require node ID even if this is the only device on this local network 26 | 27 | NODE_ID=1 28 | URL_ARGS=/?password=jambox 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Raspberry Pi (Trading) Ltd. 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 10 | 11 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14 | -------------------------------------------------------------------------------- /stage3/12-install-hpsjam/files/hpsjam-server.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=hpsjam-server 3 | After=network.target 4 | After=graphical.target 5 | Conflicts=jamulus-server.service jamulus-server2.service 6 | Conflicts=jack.service 7 | 8 | [Service] 9 | Type=simple 10 | Environment=DISPLAY=:0 11 | Environment=XAUTHORITY=/home/pi/.Xauthority 12 | # 13 | # Environment settings here are intended as defaults which can be 14 | # overridden by the EnvironmentFile /home/pi/.config/hpsjam-server.conf 15 | # Make Environment changes in that file, not here. 16 | # 17 | Environment=PORT=22124 18 | Environment=PEERS=8 19 | Environment=HTTPD=127.0.0.1:8080 20 | Environment=HTTPD_CONNS=1 21 | Environment=NCPU=4 22 | Environment=WINDOW_TITLE=hpsjam-server 23 | Environment=WELCOME_MSG_FILE=/dev/null 24 | Environment=XDG_RUNTIME_DIR=/var/run/hpsjam-server 25 | EnvironmentFile=-/home/pi/.config/hpsjam-server.conf 26 | 27 | RuntimeDirectory=hpsjam-server 28 | User=pi 29 | NoNewPrivileges=true 30 | ProtectSystem=true 31 | IOSchedulingClass=realtime 32 | IOSchedulingPriority=1 33 | CPUSchedulingPolicy=fifo 34 | CPUSchedulingPriority=90 35 | 36 | ExecStartPre=-/bin/bash -c "XDG_RUNTIME_DIR=/run/user/$(id -u pi) /usr/bin/pulseaudio --kill" 37 | ExecStart=/usr/bin/lxterminal -t ${WINDOW_TITLE} -e '/usr/bin/HpsJam --server --port $PORT --peers $PEERS --httpd $HTTPD --httpd-conns $HTTPD_CONNS --ncpu $NCPU --welcome-msg-file ${WELCOME_MSG_FILE}' 38 | 39 | StandardOutput=journal 40 | StandardError=inherit 41 | SyslogIdentifier=hpsjam-server 42 | 43 | [Install] 44 | WantedBy=multi-user.target 45 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/jambox_start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # On first boot, if hifiberry DAC+ ADC Pro is visible in /proc/device-tree, enable in /boot/config.txt and reboot 4 | if [ -f /proc/device-tree/hat/product ]; then 5 | if grep -q 'DAC+ ADC Pro' /proc/device-tree/hat/product; then 6 | if grep -q '^#force_eeprom_read=0' /boot/config.txt; then 7 | if grep -q '^#dtoverlay=hifiberry-dacplusadcpro' /boot/config.txt; then 8 | sudo sed -i 's/^#force_eeprom_read=0/force_eeprom_read=0/' /boot/config.txt 9 | sudo sed -i 's/^#dtoverlay=hifiberry-dacplusadcpro/dtoverlay=hifiberry-dacplusadcpro/' /boot/config.txt 10 | sudo reboot 11 | fi 12 | fi 13 | fi 14 | fi 15 | 16 | if [ -f ~/.config/Jamulus/jamulus_start.conf ]; then 17 | source ~/.config/Jamulus/jamulus_start.conf 18 | if [[ "$JAMULUS_AUTOSTART" == '1' ]]; then 19 | jamulus_start.sh 20 | exit 0 21 | fi 22 | fi 23 | 24 | if [ -f ~/.config/sonobus_start.conf ]; then 25 | source ~/.config/sonobus_start.conf 26 | if [[ "$SONOBUS_AUTOSTART" == '1' ]]; then 27 | sonobus_start.sh 28 | exit 0 29 | fi 30 | fi 31 | 32 | if [ -f ~/.config/JammerNetz/jammernetz_start.conf ]; then 33 | source ~/.config/JammerNetz/jammernetz_start.conf 34 | if [[ "$JAMMERNETZ_AUTOSTART" == '1' ]]; then 35 | jammernetz_start.sh 36 | exit 0 37 | fi 38 | fi 39 | 40 | if [ -f ~/.config/hpsjam_start.conf ]; then 41 | source ~/.config/hpsjam_start.conf 42 | if [[ "$HPSJAM_AUTOSTART" == '1' ]]; then 43 | hpsjam_start.sh 44 | exit 0 45 | fi 46 | fi 47 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/jamulus-server2.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Jamulus-Server2 3 | After=graphical.target 4 | Conflicts=jack.service 5 | Conflicts=hpsjam-server.service 6 | 7 | [Service] 8 | Type=simple 9 | Environment=DISPLAY=:0 10 | Environment=XAUTHORITY=/home/pi/.Xauthority 11 | # 12 | # Environment settings for PORT and NUMCHANNELS here are intended as defaults which can be 13 | # overridden by the EnvironmentFile /home/pi/.config/Jamulus/jamulus-server2.conf 14 | # Make Enviroment changes in that file, not here. 15 | # 16 | # Jambox runs jamulus-server with the GUI. 17 | # Most common jamulus-server settings are available in the GUI and should be set there. 18 | # 19 | Environment=NUMCHANNELS=8 20 | Environment=PORT=22134 21 | Environment=XDG_RUNTIME_DIR=/var/run/jamulus-server2 22 | EnvironmentFile=-/home/pi/.config/Jamulus/jamulus-server2.conf 23 | RuntimeDirectory=jamulus-server2 24 | User=pi 25 | NoNewPrivileges=true 26 | ProtectSystem=true 27 | IOSchedulingClass=realtime 28 | IOSchedulingPriority=1 29 | CPUSchedulingPolicy=fifo 30 | CPUSchedulingPriority=90 31 | 32 | #### See https://jamulus.io/wiki/Command-Line-Options #### 33 | 34 | ExecStartPre=-/bin/bash -c "XDG_RUNTIME_DIR=/run/user/$(id -u pi) /usr/bin/pulseaudio --kill" 35 | ExecStart=/usr/bin/jamulus --server --multithreading --htmlstatus /tmp/jamulus-server2-status.html --fastupdate --port ${PORT} --numchannels ${NUMCHANNELS} --inifile /home/pi/.config/Jamulus/Jamulusserver2.ini 36 | ExecStartPost=-/bin/bash -c "sleep 3; wmctrl -r 'Jamulus Server' -N ${WINDOW_TITLE:-jamulus-server2}" 37 | 38 | Restart=on-failure 39 | RestartSec=60 40 | StandardOutput=journal 41 | StandardError=inherit 42 | SyslogIdentifier=jamulus-server2 43 | 44 | [Install] 45 | WantedBy=multi-user.target 46 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/jamulus-server.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Jamulus-Server 3 | After=network.target 4 | After=graphical.target 5 | Conflicts=jack.service 6 | Conflicts=hpsjam-server.service 7 | 8 | [Service] 9 | Type=simple 10 | Environment=DISPLAY=:0 11 | Environment=XAUTHORITY=/home/pi/.Xauthority 12 | # 13 | # Environment settings for PORT and NUMCHANNELS here are intended as defaults which can be 14 | # overridden by the EnvironmentFile /home/pi/.config/Jamulus/jamulus-server.conf 15 | # Make Environment changes in that file, not here. 16 | # 17 | # Jambox runs jamulus-server with the GUI. 18 | # Most common jamulus-server settings are available in the GUI and should be set there. 19 | # 20 | Environment=NUMCHANNELS=8 21 | Environment=PORT=22124 22 | Environment=XDG_RUNTIME_DIR=/var/run/jamulus-server 23 | EnvironmentFile=-/home/pi/.config/Jamulus/jamulus-server.conf 24 | RuntimeDirectory=jamulus-server 25 | User=pi 26 | NoNewPrivileges=true 27 | ProtectSystem=true 28 | IOSchedulingClass=realtime 29 | IOSchedulingPriority=1 30 | CPUSchedulingPolicy=fifo 31 | CPUSchedulingPriority=90 32 | 33 | #### See https://jamulus.io/wiki/Command-Line-Options #### 34 | 35 | ExecStartPre=-/bin/bash -c "XDG_RUNTIME_DIR=/run/user/$(id -u pi) /usr/bin/pulseaudio --kill" 36 | ExecStart=/usr/bin/jamulus --server --multithreading --htmlstatus /tmp/jamulus-server-status.html --fastupdate --port ${PORT} --numchannels ${NUMCHANNELS} --inifile /home/pi/.config/Jamulus/Jamulusserver.ini 37 | ExecStartPost=-/bin/bash -c "sleep 3; wmctrl -r 'Jamulus Server' -N ${WINDOW_TITLE:-jamulus-server}" 38 | 39 | Restart=on-failure 40 | RestartSec=60 41 | StandardOutput=journal 42 | StandardError=inherit 43 | SyslogIdentifier=jamulus-server 44 | 45 | [Install] 46 | WantedBy=multi-user.target 47 | -------------------------------------------------------------------------------- /stage3/00-configure-apt/files/blokas.gpg.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | Version: GnuPG v1 3 | 4 | mQENBFnGbQoBCACgy7jiYrM+ks27KP3dKYd1AatJuHJvk9bWAxJVfZWth3F8Casf 5 | 8JC1T8z8h3c1Eoo1ZKZNuPAp41a21N5/PsIvS22r3qKKNHW/Sd4vl3/cpjrnONw1 6 | rchqZbKws5gnLoYre/dPXKC35inK9YTFlzGLKo23OQS+q7QoMk39/HoOIzrysZRp 7 | QJ/Vl9sT3mktPs57Wkx20kZw0QDovm1hDqJuxe3OqujA+KpsCj8uELGT1GT25dFB 8 | J7N84XxU4sRjNox5TfL3Z9Q1i2oKeVIKstUYCNeHvfqGYoMwnQJ4U0YKWgVn0AwB 9 | ZaDwnZAruXvXRcmWB28PV9J3nw3gp0VbcYN1ABEBAAG0JVZpbG5pYXVzIEJsb2th 10 | cyBVQUIgPGhlbGxvQGJsb2thcy5pbz6JATgEEwECACIFAlnGbQoCGwMGCwkIBwMC 11 | BhUIAgkKCwQWAgMBAh4BAheAAAoJEDeAgJj1YJCKQL8H/1YZxhUXk4WUnWJSdVZW 12 | GvXwu9e5DvtX3OC3ETONVzwS7LN3hN+N7GqJ8d6FEKMPWeTiAXjAkOjMHAyvsfLv 13 | +1CLoCMh615BAUUhT6VKWnlgL5coYTH+A0RVhMRrecD0P3YllqCrkhYzseZxd79/ 14 | jGyMJgmGkNW5YzzWGZTYjTQvknvHEtjsaQBJm8/Twojb+oB8NAJGTWRwXW/ngSBL 15 | hqHJUjICw10pH1x9xTlEl+t4FE3ewzVWuJgK1yeIcA7kOUWVyZIHNXjcG/V7QkfK 16 | JiWKPfLp8qD90nnMfOc+GUf84nb8zHvqTSI1hm0Y6wqHw1swnYs8/bJPV91t4Gml 17 | cQG5AQ0EWcZtCgEIAM8UPjVyDQZooeV5lvONnpXEfKgx8jjes1Ruv7cFGnBd5VKu 18 | jXUh0z/aAMDH0HBcKBvrYUUkKQSZcGobKhMkXbblmpSShGcjPnxp2big5/B92AAX 19 | NqXb7JlJ7WKBQ3B2ZKh7tgUYx9s3lSiwND9xFBEUE8HCc6z9VmoJHuknY9Ro0SBm 20 | yZRszJMOtRAFJDJIa1W1wsj682v2wpYDXy5PDzA6ktdxKBeDmcLeKJ7mwxoNi9qf 21 | CnGhSUppsXfBDbRj2iRbF4uJkdoyqrMNxomzLt+Rbhpy4BuezzrSnpUJoz/p3ug9 22 | mSgsq9A+OjyXhWuu8wL3HXPqK61v+EWte5h2Y68AEQEAAYkBHwQYAQIACQUCWcZt 23 | CgIbDAAKCRA3gICY9WCQilF5B/0dDFntmFQFbMn/9g71UUFIp844K5oVOUKb4/B+ 24 | pj8KzABkx9Tdhyc32a02iLPP8kNiU2x1QbPPACl8YCYZUfPJ7zFQKd5J4m4Fawdq 25 | OoGD9DyGsC5d4K52E9F1fDCFPRloUjgsQQPYcDcvrgYwxbX1YSlRZzpqvFt3RFqH 26 | NS7T1aMKvmqV/9iiASH/CMvzyApDPdQsxjPutCaMzANAefqjC4VQtikef4CVZ+mN 27 | SYPC4xhoPIx0XMOkKw+sXKQRE8zLGPaggxFQC++7T6YDOyGs3co+M93RgYLV9xI8 28 | 60OKbyUQt+HJx8s+7Yw4lXYaLZqJ0e7tDW4WQxqqVc9fm7Vm 29 | =7IOz 30 | -----END PGP PUBLIC KEY BLOCK----- 31 | -------------------------------------------------------------------------------- /stage0/00-configure-apt/files/raspberrypi.gpg.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | Version: GnuPG v1.4.12 (GNU/Linux) 3 | 4 | mQENBE/d7o8BCACrwqQacGJfn3tnMzGui6mv2lLxYbsOuy/+U4rqMmGEuo3h9m92 5 | 30E2EtypsoWczkBretzLUCFv+VUOxaA6sV9+puTqYGhhQZFuKUWcG7orf7QbZRuu 6 | TxsEUepW5lg7MExmAu1JJzqM0kMQX8fVyWVDkjchZ/is4q3BPOUCJbUJOsE+kK/6 7 | 8kW6nWdhwSAjfDh06bA5wvoXNjYoDdnSZyVdcYCPEJXEg5jfF/+nmiFKMZBraHwn 8 | eQsepr7rBXxNcEvDlSOPal11fg90KXpy7Umre1UcAZYJdQeWcHu7X5uoJx/MG5J8 9 | ic6CwYmDaShIFa92f8qmFcna05+lppk76fsnABEBAAG0IFJhc3BiZXJyeSBQaSBB 10 | cmNoaXZlIFNpZ25pbmcgS2V5iQE4BBMBAgAiBQJP3e6PAhsDBgsJCAcDAgYVCAIJ 11 | CgsEFgIDAQIeAQIXgAAKCRCCsSmSf6MwPk6vB/9pePB3IukU9WC9Bammh3mpQTvL 12 | OifbkzHkmAYxzjfK6D2I8pT0xMxy949+ThzJ7uL60p6T/32ED9DR3LHIMXZvKtuc 13 | mQnSiNDX03E2p7lIP/htoxW2hDP2n8cdlNdt0M9IjaWBppsbO7IrDppG2B1aRLni 14 | uD7v8bHRL2mKTtIDLX42Enl8aLAkJYgNWpZyPkDyOqamjijarIWjGEPCkaURF7g4 15 | d44HvYhpbLMOrz1m6N5Bzoa5+nq3lmifeiWKxioFXU+Hy5bhtAM6ljVb59hbD2ra 16 | X4+3LXC9oox2flmQnyqwoyfZqVgSQa0B41qEQo8t1bz6Q1Ti7fbMLThmbRHiuQEN 17 | BE/d7o8BCADNlVtBZU63fm79SjHh5AEKFs0C3kwa0mOhp9oas/haDggmhiXdzeD3 18 | 49JWz9ZTx+vlTq0s+I+nIR1a+q+GL+hxYt4HhxoA6vlDMegVfvZKzqTX9Nr2VqQa 19 | S4Kz3W5ULv81tw3WowK6i0L7pqDmvDqgm73mMbbxfHD0SyTt8+fk7qX6Ag2pZ4a9 20 | ZdJGxvASkh0McGpbYJhk1WYD+eh4fqH3IaeJi6xtNoRdc5YXuzILnp+KaJyPE5CR 21 | qUY5JibOD3qR7zDjP0ueP93jLqmoKltCdN5+yYEExtSwz5lXniiYOJp8LWFCgv5h 22 | m8aYXkcJS1xVV9Ltno23YvX5edw9QY4hABEBAAGJAR8EGAECAAkFAk/d7o8CGwwA 23 | CgkQgrEpkn+jMD5Figf/dIC1qtDMTbu5IsI5uZPX63xydaExQNYf98cq5H2fWF6O 24 | yVR7ERzA2w33hI0yZQrqO6pU9SRnHRxCFvGv6y+mXXXMRcmjZG7GiD6tQWeN/3wb 25 | EbAn5cg6CJ/Lk/BI4iRRfBX07LbYULCohlGkwBOkRo10T+Ld4vCCnBftCh5x2OtZ 26 | TOWRULxP36y2PLGVNF+q9pho98qx+RIxvpofQM/842ZycjPJvzgVQsW4LT91KYAE 27 | 4TVf6JjwUM6HZDoiNcX6d7zOhNfQihXTsniZZ6rky287htsWVDNkqOi5T3oTxWUo 28 | m++/7s3K3L0zWopdhMVcgg6Nt9gcjzqN1c0gy55L/g== 29 | =mNSj 30 | -----END PGP PUBLIC KEY BLOCK----- 31 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/jamulus-server.conf: -------------------------------------------------------------------------------- 1 | # 2 | # File: /home/pi/.config/Jamulus/jamulus-server.conf 3 | # 4 | # To start jamulus-server: sudo systemctl start jamulus-server 5 | # To enable automatic startup: sudo systemctl enable jamulus-server 6 | # 7 | # WARNINGS: 8 | # 1. Running Jamulus Server on Raspberry Pi 3 is not recommended due to higher jitter. Use Pi4. 9 | # 2. Running a Jamulus client on same server with Jamulus Server is not recommended. 10 | # Jamulus Server unit file will kill jack service when starting to prevent this. 11 | # 3. Recording can be enabled from the GUI but is not recommended, especially if using micro-SD card. 12 | # If you want to experiment with recording, try a USB3 SSD. 13 | # 4. Running 2 Jamulus Servers on 1 Raspberry Pi is not recommended. 14 | # Service "jamulus-server2" is included for those who want to try it anyway. 15 | # 16 | # Jamulus server on Jambox runs with the GUI. 17 | # Most common settings should be changed in the GUI. 18 | # These can be set the first time you run jamulus-server, 19 | # and will be saved and used the next time jamulus-server is started. 20 | # 21 | # The only other settings likely to need changes are PORT and NUMCHANNELS. 22 | # These can be set here, to avoid editing the systemd unit file. 23 | # 24 | # Running a Jamulus server behind a NAT router may 25 | # require port forwarding to be set up on your router. 26 | # see: https://www.howtogeek.com/66214/how-to-forward-ports-on-your-router/ 27 | # 28 | # 29 | # Jamulus Server config file 30 | # 31 | # optional server command line arguments 32 | # 33 | # NUMCHANNELS=<maximum users> # default: 8 34 | # PORT=<UDP port number> # default: 22124 35 | # WINDOW_TITLE="<title>" # default: jamulus-server 36 | # 37 | 38 | #NUMCHANNELS=8 39 | #PORT=22124 40 | #WINDOW_TITLE="jamulus-server" 41 | -------------------------------------------------------------------------------- /stage3/05-install-rt-kernel/01-run.sh: -------------------------------------------------------------------------------- 1 | # custom-built kernels are best installed from repo ( in file 00-packages ) 2 | # in order to actually boot from them, files must be copied to /boot, 3 | # and /boot/config.txt must have info added to it. 4 | 5 | install_kernel_from_deb () { 6 | 7 | KERN=$1 8 | shift 9 | mkdir -p ${ROOTFS_DIR}/boot/$KERN/overlays/ 10 | cp -d ${ROOTFS_DIR}/usr/lib/linux-image-$KERN/overlays/* ${ROOTFS_DIR}/boot/$KERN/overlays/ 11 | cp -d ${ROOTFS_DIR}/usr/lib/linux-image-$KERN/* ${ROOTFS_DIR}/boot/$KERN/ 12 | [[ -d ${ROOTFS_DIR}/usr/lib/linux-image-$KERN/broadcom ]] && cp -d ${ROOTFS_DIR}/usr/lib/linux-image-$KERN/broadcom/* ${ROOTFS_DIR}/boot/$KERN/ 13 | touch ${ROOTFS_DIR}/boot/$KERN/overlays/README 14 | mv ${ROOTFS_DIR}/boot/vmlinuz-$KERN ${ROOTFS_DIR}/boot/$KERN/ 15 | mv ${ROOTFS_DIR}/boot/initrd.img-$KERN ${ROOTFS_DIR}/boot/$KERN/ 16 | mv ${ROOTFS_DIR}/boot/System.map-$KERN ${ROOTFS_DIR}/boot/$KERN/ 17 | mv ${ROOTFS_DIR}/boot/config-$KERN ${ROOTFS_DIR}/boot/$KERN/ 18 | 19 | # append kernel options to /boot/config.txt 20 | while (( "$#" )); do 21 | cat >> ${ROOTFS_DIR}/boot/config.txt << EOF 22 | 23 | [$1] 24 | kernel=vmlinuz-$KERN 25 | #initramfs initrd.img-$KERN 26 | os_prefix=$KERN/ 27 | overlay_prefix=overlays/$(if [[ "$KERN" =~ 'v8' ]]; then echo -e "\narm_64bit=1"; fi) 28 | [all] 29 | EOF 30 | shift 31 | done 32 | } 33 | 34 | install_kernel_from_deb "5.10.74-llat-v7l+" "all" 35 | install_kernel_from_deb "5.10.74-rt54-v7l+" "none" 36 | install_kernel_from_deb "5.15.10-llat-v7l+" "none" 37 | install_kernel_from_deb "5.15.10-rt24-v7l+" "none" 38 | 39 | # give audio group ability to raise priority with "nice" 40 | sed -i "s/.*audio.*nice.*$/@audio - nice -19/g" ${ROOTFS_DIR}/etc/security/limits.d/audio.conf 41 | 42 | # copy modprobe config needed to support Focusrite Scarlett gen3 interfaces 43 | #cp files/scarlett-gen3.conf ${ROOTFS_DIR}/etc/modprobe.d/ 44 | 45 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/jamulus-server2.conf: -------------------------------------------------------------------------------- 1 | # 2 | # File: /home/pi/.config/Jamulus/jamulus-server2.conf 3 | # 4 | # To start jamulus-server2: sudo systemctl start jamulus-server2 5 | # To enable automatic startup: sudo systemctl enable jamulus-server2 6 | # 7 | # WARNINGS: 8 | # 1. Running Jamulus Server on Raspberry Pi 3 is not recommended due to higher jitter. Use Pi4. 9 | # 2. Running a Jamulus client on same server with Jamulus Server is not recommended. 10 | # Jamulus Server unit file will kill jack service when starting to prevent this. 11 | # 3. Recording can be enabled from the GUI but is not recommended, especially if using micro-SD card. 12 | # If you want to experiment with recording, try a USB3 SSD. 13 | # 4. Running 2 Jamulus Servers on 1 Raspberry Pi is not recommended. 14 | # Service "jamulus-server2" is included for those who want to try it anyway. 15 | # 16 | # Jamulus server on Jambox runs with the GUI. 17 | # Most common settings should be changed in the GUI. 18 | # These can be set the first time you run jamulus-server, 19 | # and will be saved and used the next time jamulus-server is started. 20 | # 21 | # The only other settings likely to need changes are PORT and NUMCHANNELS. 22 | # These can be set here, to avoid editing the systemd unit file. 23 | # 24 | # Running a Jamulus server behind a NAT router may 25 | # require port forwarding to be set up on your router. 26 | # see: https://www.howtogeek.com/66214/how-to-forward-ports-on-your-router/ 27 | # 28 | # 29 | # Jamulus Server config file 30 | # 31 | # optional server command line arguments 32 | # 33 | # NUMCHANNELS=<maximum users> # default: 8 34 | # PORT=<UDP port number> # default: 22134 35 | # WINDOW_TITLE="<title>" # default: jamulus-server2 36 | # 37 | 38 | #NUMCHANNELS=8 39 | #PORT=22134 40 | #WINDOW_TITLE="jamulus-server2" 41 | -------------------------------------------------------------------------------- /stage3/07-install-boot-script/01-run.sh: -------------------------------------------------------------------------------- 1 | 2 | # install urlrelay files for browser to locate access to UI 3 | cp files/urlrelay.sh ${ROOTFS_DIR}/usr/local/bin/ 4 | chmod +x ${ROOTFS_DIR}/usr/local/bin/urlrelay.sh 5 | 6 | mkdir -p ${ROOTFS_DIR}/etc/urlrelay 7 | cp files/urlrelay.conf ${ROOTFS_DIR}/etc/urlrelay/ 8 | cp files/jambox_version ${ROOTFS_DIR}/etc/ 9 | 10 | # install urlrelay service file 11 | install -m 644 files/urlrelay.service ${ROOTFS_DIR}/lib/systemd/system 12 | 13 | # set to autologin to graphical environment 14 | cat > ${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d/autologin.conf << EOF 15 | [Service] 16 | ExecStart= 17 | ExecStart=-/sbin/agetty --autologin $FIRST_USER_NAME --noclear %I \$TERM 18 | EOF 19 | 20 | sed ${ROOTFS_DIR}/etc/lightdm/lightdm.conf -i -e "s/^\(#\|\)autologin-user=.*/autologin-user=$FIRST_USER_NAME/" 21 | # disable raspi-config at boot 22 | rm -f ${ROOTFS_DIR}/etc/profile.d/raspi-config.sh 23 | #rm -r ${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d/raspi-config-override.conf 24 | 25 | # Copy payload files to boot partition and edit 26 | mkdir -p ${ROOTFS_DIR}/boot/payload/etc/urlrelay 27 | cp files/urlrelay.conf ${ROOTFS_DIR}/boot/payload/etc/urlrelay/ 28 | cp ${ROOTFS_DIR}/etc/jackdrc.conf ${ROOTFS_DIR}/boot/payload/etc/ 29 | cp ${ROOTFS_DIR}/etc/timezone ${ROOTFS_DIR}/boot/payload/etc/ 30 | 31 | # Copy pi-boot-script files 32 | cp files/unattended ${ROOTFS_DIR}/boot/ 33 | # cp files/one-time-script.conf ${ROOTFS_DIR}/boot/ 34 | 35 | # hook in the unattended config script 36 | sed -i 's|init=.*$|init=/bin/bash -c "mount -t proc proc /proc; mount -t sysfs sys /sys; mount /boot; source /boot/unattended"|' ${ROOTFS_DIR}/boot/cmdline.txt 37 | 38 | on_chroot << EOF 39 | systemctl enable urlrelay 40 | systemctl set-default graphical.target 41 | ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service 42 | EOF 43 | 44 | 45 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/jamulus_start.conf: -------------------------------------------------------------------------------- 1 | # 2 | # File: ~/.config/Jamulus/jamulus_start.conf 3 | # 4 | # Optional configuration parameters for "jamulus_start.sh" 5 | # 6 | # JAMULUS_AUTOSTART=1 # 1=automatically start Jamulus at boot time 7 | # JAMULUS_SERVER=<jamulus_server_dns_name_or_ip> # automatically connect to this server, then shut down after 120 mins. (default unset) 8 | # MASTER_LEVEL=<level%> # force alsamixer master level to this value when starting. (default unset) 9 | # CAPTURE_LEVEL=<level%> # force alsamixer capture level to this value when starting. (default: unset) 10 | # AJ_SNAPSHOT=<snapshot_file_name> # file name of alsa/jack connection snapshot, default: ajs-jamulus-stereo.xml (2 input channels fed separately to Jamulus) 11 | # JAMULUS_TIMEOUT=<timeout> # if auto-connecting to JAMULUS_SERVER, time out and shut down after <timeout> (default "120m") 12 | # # set JAMULUS_TIMEOUT=0 to disable timeout (or set to long timeout, i.e. "24h" = 24 Hours, "7d" = 7 Days) 13 | # 14 | # JAMULUS_CTRLMIDICH="<string>" # mapping sting for jamulus to use MIDI Control events to change faders,pan,mute,solo 15 | # # see: https://jamulus.io/wiki/Tips-Tricks-More 16 | # JAMULUS_MIDI_SCRIPT=/path/to/file # script file to process midi events before sending to jamulus. 17 | # # X-Touch Mini is auto-detected and uses script /usr/local/bin/midi-jamulus-xtouchmini-16ch.py 18 | # # If needed but not defined, use script /usr/local/bin/midi-jamulus-passthrough.py 19 | 20 | JAMULUS_AUTOSTART=0 21 | JAMULUS_SERVER= 22 | JAMULUS_TIMEOUT=120m 23 | MASTER_LEVEL="80%" 24 | CAPTURE_LEVEL="80%" 25 | AJ_SNAPSHOT=ajs-jamulus-stereo.xml 26 | 27 | -------------------------------------------------------------------------------- /stage3/07-install-boot-script/files/one-time-script.conf: -------------------------------------------------------------------------------- 1 | # configuration for the pi-boot-script configuration/installation scripts 2 | # to use non-default parameters, uncomment and change the value 3 | 4 | # disk management 5 | # create an additional FAT32 partition, writeable by user pi 6 | # for application logs etc. (only on Raspbian Buster and later). 7 | # if not desired, set its size to 0 (minimum for FAT32 partition is 32 MB) 8 | #new_partition_size_MB = 100 9 | #new_partition_label = logs 10 | 11 | # localisation 12 | # 13 | # locale and text encoding - a list is in /usr/share/i18n/SUPPORTED 14 | #new_locale = en_GB.UTF-8 15 | # 16 | # time zone - a file inside /usr/share/zoneinfo/ 17 | #new_timezone = Europe/London 18 | 19 | # networking 20 | # 21 | # hostname of the Pi is set automatically to e.g. pi3-2c45df 22 | # with optional tag in-between, like pi3-basement-2c45df 23 | #new_hostname_tag = 24 | # 25 | # automatic start of the SSH daemon at boot: 0 = on, 1 = off 26 | #new_ssh_setting = 0 27 | 28 | # wifi settings 29 | # country code from /usr/share/zoneinfo/iso3166.tab 30 | #new_wifi_country = GB 31 | #new_wifi_ssid = "Our network" 32 | #new_wifi_password = "Secret" 33 | 34 | # boot behaviour: what you see on the connected monitor/tv 35 | # B1 = console, B2 = cons+autologin, B3 = desktop, B4 = desktop+autologin 36 | #new_boot_behaviour = B1 37 | 38 | # some data on the /boot partition about the system, for recognising it. 39 | # the file is named SD-card-n.txt with n the card's number in your catalogue: 40 | #sd_card_number = XX 41 | 42 | # install packages (programs) 43 | # 44 | # which packages to install, as a space-separated list. 45 | # for example, tree screen reptyr ipython3 46 | #packages_to_install = 47 | # 48 | # where to get a recent version of Node.js bundled with npm. 49 | # the latest URL can be found at 50 | # https://github.com/nodesource/distributions/blob/master/README.md 51 | # and looks like https://deb.nodesource.com/setup_13.x 52 | #node_js_source_url = 53 | 54 | -------------------------------------------------------------------------------- /stage3/05-install-rt-kernel/files/gen-latency-plot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | MODEL=$(tr -d '\0' </proc/device-tree/model) 3 | [[ "$MODEL" =~ "Pi 4" ]] && PIMODEL=RPi4 4 | [[ "$MODEL" =~ "Pi 3" ]] && PIMODEL=RPi3 5 | [[ "$MODEL" =~ "Pi 2" ]] && PIMODEL=RPi2 6 | [[ -z "$PIMODEL" ]] && PIMODEL=PiUnk 7 | KERNEL=`uname -r` 8 | OUTPUTFILE=output_${PIMODEL}_${KERNEL} 9 | PLOTFILE=plot_${PIMODEL}_${KERNEL}.png 10 | CYCLICTEST_CMD="./cyclictest -l100000000 -m -Sp91 -i200 -h400 -q >$OUTPUTFILE" 11 | 12 | if ! [ -x "$(command -v gnuplot)" ]; then 13 | sudo apt -y install gnuplot 14 | fi 15 | 16 | if ! [ -d "$HOME/rt-tests" ]; then 17 | git clone --depth 1 --branch stable/v1.0 https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git $HOME/rt-tests/ 18 | fi 19 | 20 | cd $HOME/rt-tests 21 | 22 | if [[ ! -f $OUTPUTFILE ]]; then 23 | [[ ! -f ./cyclictest ]] && make 24 | echo `date`: begin cyclicttest - this will take 5+ hours 25 | echo CYCLICTEST_CMD: $CYCLICTEST_CMD 26 | eval $CYCLICTEST_CMD 27 | echo `date`: end cyclictest 28 | fi 29 | 30 | max=`grep "Max Latencies" $OUTPUTFILE | tr " " "\n" | sort -n | tail -1 | sed s/^0*//` 31 | grep -v -e "^#" -e "^$" $OUTPUTFILE | tr " " "\t" >histogram 32 | cores=`nproc` 33 | 34 | for i in `seq 1 $cores` 35 | do 36 | column=`expr $i + 1` 37 | cut -f1,$column histogram >histogram$i 38 | done 39 | 40 | echo -n -e "set title \"Latency - $PIMODEL - Linux $KERNEL\"\n\ 41 | set terminal png\n\ 42 | set xlabel \"Latency (us), max $max us\"\n\ 43 | set logscale y\n\ 44 | set xrange [0:400]\n\ 45 | set yrange [0.8:*]\n\ 46 | set ylabel \"Number of latency samples\"\n\ 47 | set output \"$PLOTFILE\"\n\ 48 | plot " >plotcmd 49 | 50 | for i in `seq 1 $cores` 51 | do 52 | if test $i != 1 53 | then 54 | echo -n ", " >>plotcmd 55 | fi 56 | cpuno=`expr $i - 1` 57 | if test $cpuno -lt 10 58 | then 59 | title=" CPU$cpuno" 60 | else 61 | title="CPU$cpuno" 62 | fi 63 | echo -n "\"histogram$i\" using 1:2 title \"$title\" with histeps" >>plotcmd 64 | done 65 | 66 | gnuplot -persist <plotcmd 67 | gpicview $PLOTFILE & 68 | exit 69 | -------------------------------------------------------------------------------- /stage1/00-boot-files/files/config.txt: -------------------------------------------------------------------------------- 1 | # For more options and information see 2 | # http://rpf.io/configtxt 3 | # Some settings may impact device functionality. See link above for details 4 | 5 | # uncomment if you get no picture on HDMI for a default "safe" mode 6 | #hdmi_safe=1 7 | 8 | # uncomment this if your display has a black border of unused pixels visible 9 | # and your display can output without overscan 10 | #disable_overscan=1 11 | 12 | # uncomment the following to adjust overscan. Use positive numbers if console 13 | # goes off screen, and negative if there is too much border 14 | #overscan_left=16 15 | #overscan_right=16 16 | #overscan_top=16 17 | #overscan_bottom=16 18 | 19 | # uncomment to force a console size. By default it will be display's size minus 20 | # overscan. 21 | #framebuffer_width=1280 22 | #framebuffer_height=720 23 | 24 | # uncomment if hdmi display is not detected and composite is being output 25 | #hdmi_force_hotplug=1 26 | 27 | # uncomment to force a specific HDMI mode (this will force VGA) 28 | #hdmi_group=1 29 | #hdmi_mode=1 30 | 31 | # uncomment to force a HDMI mode rather than DVI. This can make audio work in 32 | # DMT (computer monitor) modes 33 | #hdmi_drive=2 34 | 35 | # uncomment to increase signal to HDMI, if you have interference, blanking, or 36 | # no display 37 | #config_hdmi_boost=4 38 | 39 | # uncomment for composite PAL 40 | #sdtv_mode=2 41 | 42 | #uncomment to overclock the arm. 700 MHz is the default. 43 | #arm_freq=800 44 | 45 | # Uncomment some or all of these to enable the optional hardware interfaces 46 | #dtparam=i2c_arm=on 47 | #dtparam=i2s=on 48 | #dtparam=spi=on 49 | 50 | # Uncomment this to enable infrared communication. 51 | #dtoverlay=gpio-ir,gpio_pin=17 52 | #dtoverlay=gpio-ir-tx,gpio_pin=18 53 | 54 | # Additional overlays and parameters are documented /boot/overlays/README 55 | 56 | # Enable audio (loads snd_bcm2835) 57 | dtparam=audio=on 58 | 59 | [pi4] 60 | # Enable DRM VC4 V3D driver on top of the dispmanx display stack 61 | dtoverlay=vc4-fkms-v3d 62 | max_framebuffers=2 63 | 64 | [all] 65 | #dtoverlay=vc4-fkms-v3d 66 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/midi-jamulus-passthrough.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | # 4 | # Midi routing layer between jack and jamulus 5 | # For Behringer X-Touch Mini MIDI controller 6 | # 7 | # This is a simple "pass-through" layer which takes 8 | # all events coming in on jack midi port "in" and sends them to jamulus on port "out_2" 9 | # 10 | # it automatically makes the required jack midi connections. 11 | # 12 | # requires package python3-mididings from jambox-project repo, 13 | # sudo apt install python3-mididings 14 | # 15 | # jack creates midi ports with names like "midi_capture_1", "midi_playback_1" 16 | # These names are used to automatically connect. 17 | # If multiple MIDI devices are connected, listen and send to all of them. 18 | # See the xtouchmini script for example of how to choose one specific device. 19 | 20 | 21 | from mididings import * 22 | from mididings.event import * 23 | import time 24 | 25 | # 26 | # configure mididings with 1 input & 2 output ports: 27 | # - in from midi controller 28 | # - out_1 to midi controller, not used in this passthrough script.. 29 | # - out_2 to Jamulus, for passing events from midi controller 30 | # 31 | # use buffered jack backend to minimize impact on audio 32 | # 33 | # automatically connect on startup. 34 | 35 | # This script is lanuched in backgound before Jamulus is started 36 | # Need to wait a few seconds before connecting to Jamulus 37 | time.sleep(3) 38 | 39 | config( 40 | backend='jack', 41 | client_name='mididings', 42 | in_ports = [ 43 | ('in', 'system:midi_capture.*'), 44 | ], 45 | out_ports = [ 46 | ('out_1', 'system:midi_playback.*'), 47 | ('out_2', 'Jamulus:input midi') 48 | ], 49 | start_delay = 1 50 | ) 51 | 52 | passthrough_patch = [ 53 | # pass all events from in_1 to Jamulus on port out_2 54 | PortFilter('in') >> Port('out_2') 55 | ] 56 | 57 | jamulus_midi = SceneGroup('jamulus_midi', [ 58 | Scene('passthrough', passthrough_patch, [ 59 | [ 60 | # Scene initialization events go here 61 | ], 62 | ]) 63 | ]) 64 | 65 | run( 66 | scenes={ 67 | 1: jamulus_midi 68 | } 69 | ) 70 | 71 | -------------------------------------------------------------------------------- /stage3/08-install-sonobus/files/sonobus_start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | JACK_APP=sonobus 3 | sudo systemctl set-environment JACK_APP=sonobus 4 | 5 | if [ -f ~/.config/sonobus_start.conf ]; then 6 | source ~/.config/sonobus_start.conf 7 | fi 8 | 9 | # Audio interface is chosen in /etc/jackdrc.conf 10 | # source it here to determine the device to use 11 | if [ -f /etc/jackdrc.conf ]; then 12 | source /etc/jackdrc.conf 13 | fi 14 | 15 | echo ALSA Device: $DEVICE 16 | ALSA_READY=no 17 | until [[ $ALSA_READY == "yes" ]]; do 18 | aplay -L | grep -q "$DEVICE" 19 | PLAY_RESULT=$? 20 | arecord -L | grep -q "$DEVICE" 21 | RECORD_RESULT=$? 22 | if [[ "$PLAY_RESULT" == "0" ]] && [[ "$RECORD_RESULT" == "0" ]]; then 23 | ALSA_READY=yes 24 | else 25 | echo "ALSA Device $DEVICE is not available: PLAY_RESULT: $PLAY_RESULT, RECORD_RESULT: $RECORD_RESULT" 26 | sleep 5 27 | fi 28 | done 29 | 30 | [[ -n "$MASTER_LEVEL" ]] && amixer set Master $MASTER_LEVEL 31 | [[ -n "$CAPTURE_LEVEL" ]] && amixer set Capture $CAPTURE_LEVEL 32 | 33 | sudo systemctl restart jack 34 | sleep 5 35 | 36 | # check that jack service is running 37 | while [[ "`systemctl show -p SubState --value jack`" != "running" ]] 38 | do 39 | echo "jack SubState is: `systemctl show -p SubState --value jack`; restarting jack" 40 | sudo systemctl restart jack 41 | sleep 5 42 | done 43 | 44 | # Start aj-snapshot as a background process if SonoBus had $AJ_SNAPSHOT set 45 | # Default is unset (SonoBus makes alsa-jack connections). 46 | # If set, this will make the alsa/jack connections specified in snapshot file $AJ_SNAPSHOT after SonoBus starts 47 | if [[ -f ~/.config/aj-snapshot/$AJ_SNAPSHOT ]]; then 48 | echo "Starting aj-snapshot daemon" 49 | aj-snapshot --remove --daemon ~/.config/aj-snapshot/$AJ_SNAPSHOT & 50 | AJ_SNAPSHOT_PID=$! 51 | fi 52 | 53 | if [[ -n "$SONOBUS_PRIORITY" ]]; then 54 | nice -n ${SONOBUS_NICEADJ:-0} chrt --${SONOBUS_SCHED:-rr} ${SONOBUS_PRIORITY} sonobus 55 | else 56 | nice -n ${SONOBUS_NICEADJ:-0} sonobus 57 | fi 58 | 59 | [[ -n "$AJ_SNAPSHOT_PID" ]] && kill $AJ_SNAPSHOT_PID # kill aj-snapshot background process 60 | sudo systemctl unset-environment JACK_APP 61 | sudo systemctl restart jack 62 | exit 0 63 | -------------------------------------------------------------------------------- /stage3/13-install-midi/files/Qsynth.conf: -------------------------------------------------------------------------------- 1 | [Custom] 2 | ColorTheme= 3 | StyleTheme= 4 | 5 | [Defaults] 6 | PresetPreview=false 7 | SoundFontDir= 8 | 9 | [Geometry] 10 | qsynthChannelsForm\geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x2\0\0\0\0\x1\x2\0\0\x1:\0\0\x3\t\0\0\x2y\0\0\x1\x2\0\0\x1:\0\0\x3\t\0\0\x2y\0\0\0\0\0\0\0\0\x4\0) 11 | qsynthChannelsForm\visible=false 12 | qsynthMainForm\geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x2\0\0\0\0\0\x33\0\0\x1\xad\0\0\x3y\0\0\x2\x8f\0\0\0\x35\0\0\x1\xcb\0\0\x3y\0\0\x2\x8f\0\0\0\0\0\0\0\0\x4\0) 13 | qsynthMainForm\visible=true 14 | qsynthMessagesForm\geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x2\0\0\0\0\0\xfe\0\0\x1&\0\0\x3\a\0\0\x2\x33\0\0\x1\0\0\0\x1\x44\0\0\x3\a\0\0\x2\x33\0\0\0\0\0\0\0\0\x4\0) 15 | qsynthMessagesForm\visible=true 16 | 17 | [Options] 18 | BaseFontSize=0 19 | KeepOnTop=false 20 | KnobMotion=1 21 | KnobStyle=0 22 | MessagesFont="Sans Serif,9,-1,5,50,0,0,0,0,0" 23 | MessagesLimit=true 24 | MessagesLimitLines=1000 25 | MessagesLog=false 26 | MessagesLogPath=qsynth.log 27 | OutputMeters=false 28 | QueryClose=true 29 | StartMinimized=false 30 | StdoutCapture=true 31 | SystemTray=false 32 | SystemTrayQueryClose=true 33 | 34 | [Presets] 35 | DefPreset=(default) 36 | 37 | [Program] 38 | Version=0.9.4.1.dirty 39 | 40 | [Settings] 41 | AlsaName=qsynth 42 | AudioBufCount=2 43 | AudioBufSize=64 44 | AudioChannels=2 45 | AudioDevice= 46 | AudioDriver=jack 47 | AudioGroups=1 48 | ChorusActive=true 49 | ChorusDepth=8 50 | ChorusLevel=1 51 | ChorusNr=3 52 | ChorusSpeed=0.30000001192092896 53 | ChorusType=0 54 | DisplayName=Qsynth1 55 | Gain=@Variant(\0\0\0\x87?\x80\0\0) 56 | JackAutoConnect=true 57 | JackMulti=false 58 | JackName=qsynth 59 | LadspaActive=false 60 | MidiAutoConnect=true 61 | MidiBankSelect=gm 62 | MidiChannels=16 63 | MidiDevice= 64 | MidiDriver=alsa_seq 65 | MidiDump=false 66 | MidiIn=true 67 | Polyphony=256 68 | ReverbActive=true 69 | ReverbDamp=0 70 | ReverbLevel=0.8999999761581421 71 | ReverbRoom=0.20000000298023224 72 | ReverbWidth=0.5 73 | SampleFormat=16bits 74 | SampleRate="@Variant(\0\0\0\x87G;\x80\0)" 75 | Server=false 76 | Verbose=false 77 | WasapiExclusive=false 78 | 79 | [SoundFonts] 80 | BankOffset1=0 81 | SoundFont1=/usr/share/sounds/sf2/FluidR3_GM.sf2 82 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/01-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | install -m 755 files/resize2fs_once "${ROOTFS_DIR}/etc/init.d/" 4 | 5 | install -d "${ROOTFS_DIR}/etc/systemd/system/rc-local.service.d" 6 | install -m 644 files/ttyoutput.conf "${ROOTFS_DIR}/etc/systemd/system/rc-local.service.d/" 7 | 8 | install -m 644 files/50raspi "${ROOTFS_DIR}/etc/apt/apt.conf.d/" 9 | 10 | install -m 644 files/console-setup "${ROOTFS_DIR}/etc/default/" 11 | 12 | install -m 755 files/rc.local "${ROOTFS_DIR}/etc/" 13 | 14 | if [ -n "${PUBKEY_SSH_FIRST_USER}" ]; then 15 | install -v -m 0700 -o 1000 -g 1000 -d "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh 16 | echo "${PUBKEY_SSH_FIRST_USER}" >"${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh/authorized_keys 17 | chown 1000:1000 "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh/authorized_keys 18 | chmod 0600 "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh/authorized_keys 19 | fi 20 | 21 | if [ "${PUBKEY_ONLY_SSH}" = "1" ]; then 22 | sed -i -Ee 's/^#?[[:blank:]]*PubkeyAuthentication[[:blank:]]*no[[:blank:]]*$/PubkeyAuthentication yes/ 23 | s/^#?[[:blank:]]*PasswordAuthentication[[:blank:]]*yes[[:blank:]]*$/PasswordAuthentication no/' "${ROOTFS_DIR}"/etc/ssh/sshd_config 24 | fi 25 | 26 | on_chroot << EOF 27 | systemctl disable hwclock.sh 28 | systemctl disable nfs-common 29 | systemctl disable rpcbind 30 | if [ "${ENABLE_SSH}" == "1" ]; then 31 | systemctl enable ssh 32 | else 33 | systemctl disable ssh 34 | fi 35 | systemctl enable regenerate_ssh_host_keys 36 | EOF 37 | 38 | if [ "${USE_QEMU}" = "1" ]; then 39 | echo "enter QEMU mode" 40 | install -m 644 files/90-qemu.rules "${ROOTFS_DIR}/etc/udev/rules.d/" 41 | on_chroot << EOF 42 | systemctl disable resize2fs_once 43 | EOF 44 | echo "leaving QEMU mode" 45 | else 46 | on_chroot << EOF 47 | systemctl enable resize2fs_once 48 | EOF 49 | fi 50 | 51 | on_chroot <<EOF 52 | for GRP in input spi i2c gpio; do 53 | groupadd -f -r "\$GRP" 54 | done 55 | for GRP in adm dialout cdrom audio users sudo video games plugdev input gpio spi i2c netdev; do 56 | adduser $FIRST_USER_NAME \$GRP 57 | done 58 | EOF 59 | 60 | on_chroot << EOF 61 | setupcon --force --save-only -v 62 | EOF 63 | 64 | on_chroot << EOF 65 | usermod --pass='*' root 66 | EOF 67 | 68 | rm -f "${ROOTFS_DIR}/etc/ssh/"ssh_host_*_key* 69 | -------------------------------------------------------------------------------- /stage3/11-install-jammernetz/01-run.sh: -------------------------------------------------------------------------------- 1 | # Install desktop shortcut. 2 | 3 | JAMMERNETZ_CONFIG_DIR=home/${FIRST_USER_NAME}/JammerNetz 4 | 5 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop 6 | cp files/Desktop/*.desktop ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop/ 7 | cp files/Desktop/*.desktop ${ROOTFS_DIR}/usr/share/applications/ 8 | cp files/*.png ${ROOTFS_DIR}/usr/share/icons 9 | 10 | cp files/jammernetz_start.sh ${ROOTFS_DIR}/usr/local/bin/ 11 | chmod +x ${ROOTFS_DIR}/usr/local/bin/jammernetz_start.sh 12 | 13 | mkdir -p ${ROOTFS_DIR}/$JAMMERNETZ_CONFIG_DIR 14 | mkdir -p ${ROOTFS_DIR}/boot/payload/$JAMMERNETZ_CONFIG_DIR 15 | cp files/zeros.bin ${ROOTFS_DIR}/${JAMMERNETZ_CONFIG_DIR}/ 16 | # allow custom build version by defining: 17 | # export CUSTOM_VERSION=<custom_version_name> 18 | # and placing customized files in directory: 19 | # stage3/11-install-jammernetz/files/${CUSTOM_VERSION}/ 20 | # customized files may include: 21 | # jammernetz_start.conf 22 | 23 | # install jammernetz-server files 24 | cp files/jammernetz-server.service ${ROOTFS_DIR}/usr/lib/systemd/system/ 25 | cp files/jammernetz-server.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/JammerNetz/ 26 | 27 | if [[ -n "$CUSTOM_VERSION" ]]; then 28 | if [[ -f files/${CUSTOM_VERSION}/jammernetz_start.conf ]]; then 29 | cp files/${CUSTOM_VERSION}/jammernetz_start.conf ${ROOTFS_DIR}/boot/payload/${JAMMERNETZ_CONFIG_DIR}/ 30 | cp files/${CUSTOM_VERSION}/jammernetz_start.conf ${ROOTFS_DIR}/${JAMMERNETZ_CONFIG_DIR}/ 31 | else 32 | cp files/jammernetz_start.conf ${ROOTFS_DIR}/boot/payload/${JAMMERNETZ_CONFIG_DIR}/ 33 | cp files/jammernetz_start.conf ${ROOTFS_DIR}/${JAMMERNETZ_CONFIG_DIR}/ 34 | fi 35 | if [[ -f files/${CUSTOM_VERSION}/JammerNetz.settings ]]; then 36 | cp files/${CUSTOM_VERSION}/JammerNetz.settings ${ROOTFS_DIR}/boot/payload/${JAMMERNETZ_CONFIG_DIR}/ 37 | cp files/${CUSTOM_VERSION}/JammerNetz.settings ${ROOTFS_DIR}/${JAMMERNETZ_CONFIG_DIR}/ 38 | else 39 | cp files/JammerNetz.settings ${ROOTFS_DIR}/boot/payload/${JAMMERNETZ_CONFIG_DIR}/ 40 | cp files/JammerNetz.settgins ${ROOTFS_DIR}/${JAMMERNETZ_CONFIG_DIR}/ 41 | fi 42 | else 43 | cp files/jammernetz_start.conf ${ROOTFS_DIR}/boot/payload/${JAMMERNETZ_CONFIG_DIR}/ 44 | cp files/jammernetz_start.conf ${ROOTFS_DIR}/${JAMMERNETZ_CONFIG_DIR}/ 45 | cp files/JammerNetz.settings ${ROOTFS_DIR}/boot/payload/${JAMMERNETZ_CONFIG_DIR}/ 46 | cp files/JammerNetz.settings ${ROOTFS_DIR}/${JAMMERNETZ_CONFIG_DIR}/ 47 | fi 48 | -------------------------------------------------------------------------------- /stage3/11-install-jammernetz/files/jammernetz_start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | JACK_APP=jammernetz 3 | sudo systemctl set-environment JACK_APP=jammernetz 4 | 5 | if [ -f ~/.config/jammernetz_start.conf ]; then 6 | source ~/.config/jammernetz_start.conf 7 | fi 8 | 9 | # Audio interface is chosen in /etc/jackdrc.conf 10 | # source it here to determine the device to use 11 | if [ -f /etc/jackdrc.conf ]; then 12 | source /etc/jackdrc.conf 13 | fi 14 | 15 | echo ALSA Device: $DEVICE 16 | ALSA_READY=no 17 | until [[ $ALSA_READY == "yes" ]]; do 18 | aplay -L | grep -q "$DEVICE" 19 | PLAY_RESULT=$? 20 | arecord -L | grep -q "$DEVICE" 21 | RECORD_RESULT=$? 22 | if [[ "$PLAY_RESULT" == "0" ]] && [[ "$RECORD_RESULT" == "0" ]]; then 23 | ALSA_READY=yes 24 | else 25 | echo "ALSA Device $DEVICE is not available: PLAY_RESULT: $PLAY_RESULT, RECORD_RESULT: $RECORD_RESULT" 26 | sleep 5 27 | fi 28 | done 29 | 30 | [[ -n "$MASTER_LEVEL" ]] && amixer set Master $MASTER_LEVEL 31 | [[ -n "$CAPTURE_LEVEL" ]] && amixer set Capture $CAPTURE_LEVEL 32 | 33 | sudo systemctl restart jack 34 | sleep 5 35 | 36 | # check that jack service is running 37 | while [[ "`systemctl show -p SubState --value jack`" != "running" ]] 38 | do 39 | echo "jack SubState is: `systemctl show -p SubState --value jack`; restarting jack" 40 | sudo systemctl restart jack 41 | sleep 5 42 | done 43 | 44 | # Start aj-snapshot as a background process if JammerNetzClient had $AJ_SNAPSHOT set 45 | # Default is unset (JammerNetzClient makes alsa-jack connections). 46 | # If set, this will make the alsa/jack connections specified in snapshot file $AJ_SNAPSHOT after JammerNetzClient starts 47 | if [[ -f ~/.config/aj-snapshot/$AJ_SNAPSHOT ]]; then 48 | echo "Starting aj-snapshot daemon" 49 | aj-snapshot --remove --daemon ~/.config/aj-snapshot/$AJ_SNAPSHOT & 50 | AJ_SNAPSHOT_PID=$! 51 | fi 52 | 53 | # start a subshell which will resize the JammerNetzClient window after it starts, to fit the jambox default desktop size 54 | (sleep ${WINDOW_RESIZE_DELAY:-8} >/dev/null; wmctrl -r JammerNetzClient -e ${JAMMERNETZ_WINDOW:-0,0,37,1020,699} > /dev/null) & 55 | 56 | if [[ -n "$JAMMERNETZ_PRIORITY" ]]; then 57 | chrt --${JAMMERNETZ_SCHED:-rr} ${JAMMERNETZ_PRIORITY} JammerNetzClient 58 | else 59 | nice -n ${JAMMERNETZ_NICEADJ:-0} JammerNetzClient 60 | fi 61 | 62 | [[ -n "$AJ_SNAPSHOT_PID" ]] && kill $AJ_SNAPSHOT_PID # kill aj-snapshot background process 63 | sudo systemctl unset-environment JACK_APP 64 | sudo systemctl restart jack 65 | exit 0 66 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/daemon.conf: -------------------------------------------------------------------------------- 1 | # This file is part of PulseAudio. 2 | # 3 | # PulseAudio is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # PulseAudio is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public License 14 | # along with PulseAudio; if not, see <http://www.gnu.org/licenses/>. 15 | 16 | ## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for 17 | ## more information. Default values are commented out. Use either ; or # for 18 | ## commenting. 19 | 20 | ; daemonize = no 21 | ; fail = yes 22 | ; allow-module-loading = yes 23 | ; allow-exit = yes 24 | ; use-pid-file = yes 25 | ; system-instance = no 26 | ; local-server-type = user 27 | ; enable-shm = yes 28 | ; enable-memfd = yes 29 | ; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB 30 | ; lock-memory = no 31 | ; cpu-limit = no 32 | 33 | ; high-priority = yes 34 | ; nice-level = -11 35 | 36 | realtime-scheduling = yes 37 | realtime-priority = 40 38 | 39 | ; exit-idle-time = 20 40 | ; scache-idle-time = 20 41 | 42 | ; dl-search-path = (depends on architecture) 43 | 44 | ; load-default-script-file = yes 45 | ; default-script-file = /etc/pulse/default.pa 46 | 47 | ; log-target = auto 48 | ; log-level = notice 49 | ; log-meta = no 50 | ; log-time = no 51 | ; log-backtrace = 0 52 | 53 | ; resample-method = speex-float-1 54 | ; avoid-resampling = false 55 | ; enable-remixing = yes 56 | ; remixing-use-all-sink-channels = yes 57 | ; enable-lfe-remixing = no 58 | ; lfe-crossover-freq = 0 59 | 60 | ; flat-volumes = yes 61 | 62 | ; rlimit-fsize = -1 63 | ; rlimit-data = -1 64 | ; rlimit-stack = -1 65 | ; rlimit-core = -1 66 | ; rlimit-as = -1 67 | ; rlimit-rss = -1 68 | ; rlimit-nproc = -1 69 | ; rlimit-nofile = 256 70 | ; rlimit-memlock = -1 71 | ; rlimit-locks = -1 72 | ; rlimit-sigpending = -1 73 | ; rlimit-msgqueue = -1 74 | ; rlimit-nice = 31 75 | rlimit-rtprio = 95 76 | ; rlimit-rttime = 200000 77 | 78 | ; default-sample-format = s16le 79 | default-sample-rate = 48000 80 | ; alternate-sample-rate = 48000 81 | ; default-sample-channels = 2 82 | ; default-channel-map = front-left,front-right 83 | 84 | ; default-fragments = 4 85 | default-fragment-size-msec = 15 86 | 87 | ; enable-deferred-volume = yes 88 | ; deferred-volume-safety-margin-usec = 8000 89 | ; deferred-volume-extra-delay-usec = 0 90 | -------------------------------------------------------------------------------- /stage3/08-install-sonobus/01-run.sh: -------------------------------------------------------------------------------- 1 | # Install desktop shortcut. 2 | 3 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop 4 | cp files/Desktop/*.desktop ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop/ 5 | cp files/Desktop/*.desktop ${ROOTFS_DIR}/usr/share/applications/ 6 | 7 | echo "NoDisplay=true" >> ${ROOTFS_DIR}/usr/share/applications/sonobus.desktop 8 | 9 | cp files/sonobus_start.sh ${ROOTFS_DIR}/usr/local/bin/ 10 | chmod +x ${ROOTFS_DIR}/usr/local/bin/sonobus_start.sh 11 | 12 | mkdir -p ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/sonobus 13 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/sonobus 14 | 15 | # allow custom build version by defining: 16 | # export CUSTOM_VERSION=<custom_version_name> 17 | # and placing customized files in directory: 18 | # stage3/08-install-sonobus/files/${CUSTOM_VERSION}/ 19 | # customized files may include: 20 | # sonobus_start.conf 21 | # SonoBus.settings 22 | # README.md 23 | 24 | if [[ -n "$CUSTOM_VERSION" ]]; then 25 | if [[ -f files/${CUSTOM_VERSION}/sonobus_start.conf ]]; then 26 | cp files/${CUSTOM_VERSION}/sonobus_start.conf ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/ 27 | cp files/${CUSTOM_VERSION}/sonobus_start.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/ 28 | else 29 | cp files/sonobus_start.conf ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/ 30 | cp files/sonobus_start.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/ 31 | fi 32 | if [[ -f files/${CUSTOM_VERSION}/SonoBus.settings ]]; then 33 | cp files/${CUSTOM_VERSION}/SonoBus.settings ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/sonobus/ 34 | cp files/${CUSTOM_VERSION}/SonoBus.settings ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/sonobus/ 35 | else 36 | cp files/SonoBus.settings ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/sonobus/ 37 | cp files/SonoBus.settings ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/sonobus/ 38 | fi 39 | if [[ -f files/${CUSTOM_VERSION}/README.md ]]; then 40 | cp files/${CUSTOM_VERSION}/README.md ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/ 41 | fi 42 | # if any custom version .gif files exist, copy them to /usr/local/share/ 43 | if [[ "`echo files/${CUSTOM_VERSION}/*.gif`" != "files/${CUSTOM_VERSION}/*.gif" ]]; then 44 | cp files/${CUSTOM_VERSION}/*.gif ${ROOTFS_DIR}/usr/local/share/ 45 | fi 46 | if [[ "`echo files/${CUSTOM_VERSION}/*.png`" != "files/${CUSTOM_VERSION}/*.png" ]]; then 47 | cp files/${CUSTOM_VERSION}/*.png ${ROOTFS_DIR}/usr/local/share/ 48 | fi 49 | else 50 | cp files/sonobus_start.conf ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/ 51 | cp files/sonobus_start.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/ 52 | cp files/SonoBus.settings ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/sonobus/ 53 | cp files/SonoBus.settings ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/sonobus/ 54 | fi 55 | 56 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/lxde-panel: -------------------------------------------------------------------------------- 1 | # lxpanel <profile> config file. Manually editing is not recommended. 2 | # Use preference dialog in lxpanel to adjust config when you can. 3 | 4 | Global { 5 | edge=top 6 | align=left 7 | margin=0 8 | widthtype=percent 9 | width=100 10 | height=36 11 | transparent=0 12 | tintcolor=#000000 13 | alpha=0 14 | autohide=0 15 | heightwhenhidden=2 16 | setdocktype=1 17 | setpartialstrut=1 18 | usefontcolor=0 19 | fontsize=12 20 | fontcolor=#ffffff 21 | usefontsize=0 22 | background=0 23 | backgroundfile=/usr/share/lxpanel/images/background.png 24 | iconsize=36 25 | monitor=0 26 | point_at_menu=1 27 | } 28 | Plugin { 29 | type=space 30 | Config { 31 | Size=4 32 | } 33 | } 34 | Plugin { 35 | type=menu 36 | Config { 37 | image=rpi 38 | system { 39 | } 40 | separator { 41 | } 42 | item { 43 | name=Run... 44 | image=system-run 45 | command=run 46 | } 47 | separator { 48 | } 49 | item { 50 | name=Shutdown... 51 | image=system-shutdown 52 | command=logout 53 | } 54 | } 55 | } 56 | Plugin { 57 | type=space 58 | Config { 59 | Size=8 60 | } 61 | } 62 | Plugin { 63 | type=launchbar 64 | Config { 65 | Button { 66 | id=lxde-x-www-browser.desktop 67 | } 68 | Button { 69 | id=pcmanfm.desktop 70 | } 71 | Button { 72 | id=lxterminal.desktop 73 | } 74 | } 75 | } 76 | Plugin { 77 | type=space 78 | Config { 79 | Size=8 80 | } 81 | } 82 | Plugin { 83 | type=taskbar 84 | expand=1 85 | Config { 86 | tooltips=1 87 | IconsOnly=0 88 | ShowAllDesks=0 89 | UseMouseWheel=1 90 | UseUrgencyHint=1 91 | FlatButton=0 92 | MaxTaskWidth=200 93 | spacing=1 94 | GroupedTasks=0 95 | } 96 | } 97 | Plugin { 98 | type=space 99 | Config { 100 | Size=2 101 | } 102 | } 103 | Plugin { 104 | type=tray 105 | Config { 106 | } 107 | } 108 | Plugin { 109 | type=ejecter 110 | Config { 111 | AutoHide=1 112 | } 113 | } 114 | Plugin { 115 | type=space 116 | Config { 117 | Size=2 118 | } 119 | } 120 | Plugin { 121 | type=bluetooth 122 | Config { 123 | } 124 | } 125 | Plugin { 126 | type=space 127 | Config { 128 | Size=2 129 | } 130 | } 131 | Plugin { 132 | type=dhcpcdui 133 | Config { 134 | } 135 | } 136 | Plugin { 137 | type=space 138 | Config { 139 | Size=2 140 | } 141 | } 142 | Plugin { 143 | type=dclock 144 | Config { 145 | ClockFmt=%R 146 | TooltipFmt=%A %x 147 | BoldFont=0 148 | IconOnly=0 149 | CenterText=1 150 | } 151 | } 152 | Plugin { 153 | type=space 154 | Config { 155 | Size=2 156 | } 157 | } 158 | Plugin { 159 | type=ptbatt 160 | Config { 161 | } 162 | } 163 | Plugin { 164 | type=space 165 | Config { 166 | Size=4 167 | } 168 | } 169 | -------------------------------------------------------------------------------- /scripts/common: -------------------------------------------------------------------------------- 1 | log (){ 2 | date +"[%T] $*" | tee -a "${LOG_FILE}" 3 | } 4 | export -f log 5 | 6 | bootstrap(){ 7 | local BOOTSTRAP_CMD=debootstrap 8 | local BOOTSTRAP_ARGS=() 9 | 10 | export http_proxy=${APT_PROXY} 11 | 12 | if [ "$(dpkg --print-architecture)" != "armhf" ] && [ "$(dpkg --print-architecture)" != "aarch64" ]; then 13 | BOOTSTRAP_CMD=qemu-debootstrap 14 | fi 15 | 16 | BOOTSTRAP_ARGS+=(--arch armhf) 17 | BOOTSTRAP_ARGS+=(--components "main,contrib,non-free") 18 | BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg") 19 | BOOTSTRAP_ARGS+=("$@") 20 | printf -v BOOTSTRAP_STR '%q ' "${BOOTSTRAP_ARGS[@]}" 21 | 22 | setarch linux32 capsh --drop=cap_setfcap -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true 23 | 24 | if [ -d "$2/debootstrap" ]; then 25 | rmdir "$2/debootstrap" 26 | fi 27 | } 28 | export -f bootstrap 29 | 30 | copy_previous(){ 31 | if [ ! -d "${PREV_ROOTFS_DIR}" ]; then 32 | echo "Previous stage rootfs not found" 33 | false 34 | fi 35 | mkdir -p "${ROOTFS_DIR}" 36 | rsync -aHAXx --exclude var/cache/apt/archives "${PREV_ROOTFS_DIR}/" "${ROOTFS_DIR}/" 37 | } 38 | export -f copy_previous 39 | 40 | unmount(){ 41 | if [ -z "$1" ]; then 42 | DIR=$PWD 43 | else 44 | DIR=$1 45 | fi 46 | 47 | while mount | grep -q "$DIR"; do 48 | local LOCS 49 | LOCS=$(mount | grep "$DIR" | cut -f 3 -d ' ' | sort -r) 50 | for loc in $LOCS; do 51 | umount "$loc" 52 | done 53 | done 54 | } 55 | export -f unmount 56 | 57 | unmount_image(){ 58 | sync 59 | sleep 1 60 | local LOOP_DEVICES 61 | LOOP_DEVICES=$(losetup --list | grep "$(basename "${1}")" | cut -f1 -d' ') 62 | for LOOP_DEV in ${LOOP_DEVICES}; do 63 | if [ -n "${LOOP_DEV}" ]; then 64 | local MOUNTED_DIR 65 | MOUNTED_DIR=$(mount | grep "$(basename "${LOOP_DEV}")" | head -n 1 | cut -f 3 -d ' ') 66 | if [ -n "${MOUNTED_DIR}" ] && [ "${MOUNTED_DIR}" != "/" ]; then 67 | unmount "$(dirname "${MOUNTED_DIR}")" 68 | fi 69 | sleep 1 70 | losetup -d "${LOOP_DEV}" 71 | fi 72 | done 73 | } 74 | export -f unmount_image 75 | 76 | on_chroot() { 77 | if ! mount | grep -q "$(realpath "${ROOTFS_DIR}"/proc)"; then 78 | mount -t proc proc "${ROOTFS_DIR}/proc" 79 | fi 80 | 81 | if ! mount | grep -q "$(realpath "${ROOTFS_DIR}"/dev)"; then 82 | mount --bind /dev "${ROOTFS_DIR}/dev" 83 | fi 84 | 85 | if ! mount | grep -q "$(realpath "${ROOTFS_DIR}"/dev/pts)"; then 86 | mount --bind /dev/pts "${ROOTFS_DIR}/dev/pts" 87 | fi 88 | 89 | if ! mount | grep -q "$(realpath "${ROOTFS_DIR}"/sys)"; then 90 | mount --bind /sys "${ROOTFS_DIR}/sys" 91 | fi 92 | 93 | setarch linux32 capsh --drop=cap_setfcap "--chroot=${ROOTFS_DIR}/" -- -e "$@" 94 | } 95 | export -f on_chroot 96 | 97 | update_issue() { 98 | echo -e "Raspberry Pi reference ${IMG_DATE}\nGenerated using ${PI_GEN}, ${PI_GEN_REPO}, ${GIT_HASH}, ${1}" > "${ROOTFS_DIR}/etc/rpi-issue" 99 | } 100 | export -f update_issue 101 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/config.txt: -------------------------------------------------------------------------------- 1 | # For more options and information see 2 | # http://rpf.io/configtxt 3 | # Some settings may impact device functionality. See link above for details 4 | 5 | # uncomment if you get no picture on HDMI for a default "safe" mode 6 | #hdmi_safe=1 7 | 8 | # uncomment this if your display has a black border of unused pixels visible 9 | # and your display can output without overscan 10 | #disable_overscan=1 11 | 12 | # uncomment the following to adjust overscan. Use positive numbers if console 13 | # goes off screen, and negative if there is too much border 14 | #overscan_left=16 15 | #overscan_right=16 16 | #overscan_top=16 17 | #overscan_bottom=16 18 | 19 | # uncomment to force a console size. By default it will be display's size minus 20 | # overscan. 21 | #framebuffer_width=1280 22 | #framebuffer_height=720 23 | 24 | # uncomment if hdmi display is not detected and composite is being output 25 | hdmi_force_hotplug=1 26 | 27 | # set HDMI mode to 16 (1024x768) for tablet compatibility 28 | # change hdmi_mode to 35 (1280x1024) or 82 (1920x1080) or 85 (1280x720) for larger area 29 | # see https://www.raspberrypi.org/documentation/configuration/config-txt/video.md 30 | hdmi_group=2 31 | hdmi_mode=16 32 | 33 | [none] 34 | hdmi_mode=85 35 | [all] 36 | 37 | [pi400] 38 | hdmi_mode=82 39 | [all] 40 | 41 | # uncomment to force a HDMI mode rather than DVI. This can make audio work in 42 | # DMT (computer monitor) modes 43 | #hdmi_drive=2 44 | 45 | # uncomment to increase signal to HDMI, if you have interference, blanking, or 46 | # no display 47 | #config_hdmi_boost=4 48 | 49 | # uncomment for composite PAL 50 | #sdtv_mode=2 51 | 52 | #uncomment to overclock the arm. 700 MHz is the default. 53 | #arm_freq=800 54 | 55 | # Uncomment some or all of these to enable the optional hardware interfaces 56 | #dtparam=i2c_arm=on 57 | #dtparam=i2s=on 58 | #dtparam=spi=on 59 | 60 | # Uncomment this to enable infrared communication. 61 | #dtoverlay=gpio-ir,gpio_pin=17 62 | #dtoverlay=gpio-ir-tx,gpio_pin=18 63 | 64 | # Additional overlays and parameters are documented /boot/overlays/README 65 | 66 | # Disable built-in audio (loads snd_bcm2835 if =on). It's useless for jamming. 67 | dtparam=audio=off 68 | 69 | # Enable DRM VC4 V3D driver on top of the dispmanx display stack 70 | # Allows desktop resizing from "Display Preferences" menu 71 | #dtoverlay=vc4-fkms-v3d 72 | 73 | [pi400] 74 | # Support 2 HDMI monitors for Pi4 and Pi400. 75 | dtoverlay=vc4-fkms-v3d 76 | max_framebuffers=2 77 | [all] 78 | 79 | # wireless interfaces add overhead that can impact jitter & xruns even if they are not in use. 80 | # It's best to leave wifi diabled, can't use it for jamming (too much delay & jitter) 81 | dtoverlay=disable-wifi 82 | 83 | # leave bluetooth disabled unless you have a specific need for it. 84 | dtoverlay=disable-bt 85 | 86 | # Uncomment the following 2 lines if you use hifiberry dacplusadcpro 87 | # (this will be automatically configured on first boot if hifiberry-dacplusadcpro is detected 88 | #dtoverlay=hifiberry-dacplusadcpro 89 | #force_eeprom_read=0 90 | 91 | -------------------------------------------------------------------------------- /stage3/10-install-jamtaba/files/jamtaba_start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # jack needs longer PERIOD for JamTaba. Set JACK_APP for jack to inspect. 3 | JACK_APP=jamtaba 4 | sudo systemctl set-environment JACK_APP=jamtaba 5 | 6 | # reset JamTaba window position & size to defaults 7 | if [ -f ~/.config/jamtaba_start.conf ]; then 8 | source ~/.config/jamtaba_start.conf 9 | [[ -n "$INIT_POSITION" ]] && sed -i "s/^pos=.*/pos=${INIT_POSITION}/" ~/.config/JamTaba\ 2.conf 10 | [[ -n "$INIT_SIZE" ]] && sed -i "s/^size=.*/size=${INIT_SIZE}/" ~/.config/JamTaba\ 2.conf 11 | fi 12 | 13 | # check if a MIDI device is connected 14 | MIDI_DEVICE_COUNT=`amidi -l | grep hw: | wc -l` 15 | if [[ "$MIDI_DEVICE_COUNT" != "0" ]]; then 16 | # Jack will be forced to not capture MIDI devices so they can connect to JamTaba with ALSA. Save the current state so we can set it back after JamTaba exits. 17 | JACK_MIDI_ARG_SAVE=`sudo systemctl show-environment | grep JACK_MIDI_ARG | head -n1` 18 | sudo systemctl unset-environment JACK_MIDI_ARG 19 | fi 20 | 21 | # Audio interface is chosen in /etc/jackdrc.conf 22 | # source it here to determine the device to use 23 | if [ -f /etc/jackdrc.conf ]; then 24 | source /etc/jackdrc.conf 25 | fi 26 | 27 | echo ALSA Device: $DEVICE 28 | ALSA_READY=no 29 | until [[ $ALSA_READY == "yes" ]]; do 30 | aplay -L | grep -q "$DEVICE" 31 | PLAY_RESULT=$? 32 | arecord -L | grep -q "$DEVICE" 33 | RECORD_RESULT=$? 34 | if [[ "$PLAY_RESULT" == "0" ]] && [[ "$RECORD_RESULT" == "0" ]]; then 35 | ALSA_READY=yes 36 | else 37 | echo "ALSA Device $DEVICE not available: PLAY_RESULT: $PLAY_RESULT, RECORD_RESULT: $RECORD_RESULT" 38 | sleep 5 39 | fi 40 | done 41 | 42 | [[ -n "$MASTER_LEVEL" ]] && amixer set Master $MASTER_LEVEL 43 | [[ -n "$CAPTURE_LEVEL" ]] && amixer set Capture $CAPTURE_LEVEL 44 | 45 | sudo systemctl restart jack 46 | sleep 5 47 | 48 | # check that jack service is running 49 | while [[ "`systemctl show -p SubState --value jack`" != "running" ]] 50 | do 51 | echo "jack SubState is: `systemctl show -p SubState --value jack`; restarting jack" 52 | sudo systemctl restart jack 53 | sleep 5 54 | done 55 | 56 | if [[ -n "$JAMTABA_PRIORITY" ]]; then 57 | chrt --${JAMTABA_SCHED:-rr} ${JAMTABA_PRIORITY} Jamtaba2 & 58 | else 59 | nice -n ${JAMTABA_NICEADJ:-0} Jamtaba2 & 60 | fi 61 | JAMTABA_PID=$! 62 | 63 | sleep 10 64 | echo JAMTABA_PID: $JAMTABA_PID 65 | PACTL_SINK_MODULE=`sudo pactl load-module module-jack-sink client_name=JamTaba_OUTput` 66 | echo PACTL_SINK_MODULE: $PACTL_SINK_MODULE 67 | PACTL_SOURCE_MODULE=`sudo pactl load-module module-jack-source client_name=JamTaba_INput` 68 | echo PACTL_SOURCE_MODULE: $PACTL_SOURCE_MODULE 69 | 70 | wait $JAMTABA_PID 71 | sudo pactl unload-module $PACTL_SINK_MODULE 72 | sudo pactl unload-module $PACTL_SOURCE_MODULE 73 | 74 | sudo systemctl unset-environment JACK_APP 75 | # restore systemd version of JACK_MIDI_ARG to previous state if set 76 | if [[ -n "$JACK_MIDI_ARG_SAVE" ]]; then 77 | eval $JACK_MIDI_ARG_SAVE 78 | sudo systemctl set-environment JACK_MIDI_ARG="$JACK_MIDI_ARG" 79 | fi 80 | sudo systemctl restart jack 81 | exit 0 82 | -------------------------------------------------------------------------------- /export-image/prerun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" 4 | 5 | unmount_image "${IMG_FILE}" 6 | 7 | rm -f "${IMG_FILE}" 8 | 9 | rm -rf "${ROOTFS_DIR}" 10 | mkdir -p "${ROOTFS_DIR}" 11 | 12 | BOOT_SIZE="$((256 * 1024 * 1024))" 13 | ROOT_SIZE=$(du --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot --block-size=1 | cut -f 1) 14 | 15 | # All partition sizes and starts will be aligned to this size 16 | ALIGN="$((4 * 1024 * 1024))" 17 | # Add this much space to the calculated file size. This allows for 18 | # some overhead (since actual space usage is usually rounded up to the 19 | # filesystem block size) and gives some free space on the resulting 20 | # image. 21 | ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.3 + 200 * 1024 * 1024) / 1" | bc)" 22 | 23 | BOOT_PART_START=$((ALIGN)) 24 | BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN)) 25 | ROOT_PART_START=$((BOOT_PART_START + BOOT_PART_SIZE)) 26 | ROOT_PART_SIZE=$(((ROOT_SIZE + ROOT_MARGIN + ALIGN - 1) / ALIGN * ALIGN)) 27 | IMG_SIZE=$((BOOT_PART_START + BOOT_PART_SIZE + ROOT_PART_SIZE)) 28 | 29 | truncate -s "${IMG_SIZE}" "${IMG_FILE}" 30 | 31 | parted --script "${IMG_FILE}" mklabel msdos 32 | parted --script "${IMG_FILE}" unit B mkpart primary fat32 "${BOOT_PART_START}" "$((BOOT_PART_START + BOOT_PART_SIZE - 1))" 33 | parted --script "${IMG_FILE}" unit B mkpart primary ext4 "${ROOT_PART_START}" "$((ROOT_PART_START + ROOT_PART_SIZE - 1))" 34 | 35 | PARTED_OUT=$(parted -sm "${IMG_FILE}" unit b print) 36 | BOOT_OFFSET=$(echo "$PARTED_OUT" | grep -e '^1:' | cut -d':' -f 2 | tr -d B) 37 | BOOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^1:' | cut -d':' -f 4 | tr -d B) 38 | 39 | ROOT_OFFSET=$(echo "$PARTED_OUT" | grep -e '^2:' | cut -d':' -f 2 | tr -d B) 40 | ROOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^2:' | cut -d':' -f 4 | tr -d B) 41 | 42 | echo "Mounting BOOT_DEV..." 43 | cnt=0 44 | until BOOT_DEV=$(losetup --show -f -o "${BOOT_OFFSET}" --sizelimit "${BOOT_LENGTH}" "${IMG_FILE}"); do 45 | if [ $cnt -lt 5 ]; then 46 | cnt=$(($cnt + 1)) 47 | echo "Error in losetup for BOOT_DEV. Retrying..." 48 | sleep 5 49 | else 50 | echo "ERROR: losetup for BOOT_DEV failed; exiting" 51 | exit 1 52 | fi 53 | done 54 | 55 | echo "Mounting ROOT_DEV..." 56 | cnt=0 57 | until ROOT_DEV=$(losetup --show -f -o "${ROOT_OFFSET}" --sizelimit "${ROOT_LENGTH}" "${IMG_FILE}"); do 58 | if [ $cnt -lt 5 ]; then 59 | cnt=$(($cnt + 1)) 60 | echo "Error in losetup for ROOT_DEV. Retrying..." 61 | sleep 5 62 | else 63 | echo "ERROR: losetup for ROOT_DEV failed; exiting" 64 | exit 1 65 | fi 66 | done 67 | 68 | echo "/boot: offset $BOOT_OFFSET, length $BOOT_LENGTH" 69 | echo "/: offset $ROOT_OFFSET, length $ROOT_LENGTH" 70 | 71 | ROOT_FEATURES="^huge_file" 72 | for FEATURE in metadata_csum 64bit; do 73 | if grep -q "$FEATURE" /etc/mke2fs.conf; then 74 | ROOT_FEATURES="^$FEATURE,$ROOT_FEATURES" 75 | fi 76 | done 77 | mkdosfs -n boot -F 32 -v "$BOOT_DEV" > /dev/null 78 | mkfs.ext4 -L rootfs -O "$ROOT_FEATURES" "$ROOT_DEV" > /dev/null 79 | 80 | mount -v "$ROOT_DEV" "${ROOTFS_DIR}" -t ext4 81 | mkdir -p "${ROOTFS_DIR}/boot" 82 | mount -v "$BOOT_DEV" "${ROOTFS_DIR}/boot" -t vfat 83 | 84 | rsync -aHAXx --exclude /var/cache/apt/archives --exclude /boot "${EXPORT_ROOTFS_DIR}/" "${ROOTFS_DIR}/" 85 | rsync -rtx "${EXPORT_ROOTFS_DIR}/boot/" "${ROOTFS_DIR}/boot/" 86 | -------------------------------------------------------------------------------- /stage3/00-configure-apt/files/repo.jambox-project.com.gpg: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | 3 | mQINBF/fH8UBEAC5scimQYLqIp1sbLwqfONvhTjnIwfX4uftKvRHYt5WwPg7v6d6 4 | ReeqQBU8zuDX0qjgMbC6Q2A2OE8V1G22IMHHClodODwfx3Vw9Za4i0VPmDKt4M5g 5 | jTzi9adSTP2JEdRCN8T7Z4nRwy9biPLvGdZ5PDEDRg6tATLAXXHsWngjV0wcf+XQ 6 | cRk5u8h8mCnrfr5pvpLJW1VrIephXP9Ks1TIMwZs1nRgQcsfKDJhzxY6dpbfDLz1 7 | gU/FBCxPoaLsY6Ly3UHZR7c2/9sUVqnqOSzBSJhmJFsB9CRrm7rAMPnLhfTFLK8S 8 | 0LVk2Mavv8NuS6Da9fyHn89pHXJdJPKaBejD4jKcNQhDR2jVTsNrnmWtGtjd0nuW 9 | AuSGZprRbXLOgmE+KTHdPhuYVY//qFa3LmwCUa9Rj4YaQu/j+cMV53S/5UxXv8CD 10 | jpeb13u19qj8Qc0mFUf0goAhsyNcu4fd48jjxiToNi8ePxYrmbemEdTfE0z7aHN1 11 | i8DT+PnTzjeA7G1nzP4qM5zsTPb7IY0qwZAADJzOg2Ahuni1B/g2eGWc2Ja8z0b5 12 | SFziZjUQAmwkWauWxn/t0Jc/Jnh/K0m4qStqoX9qBSYoaNfAtjeP1WEkItXcBhs2 13 | 9iLjE/Lhx05gA2tqWMgG+Bcgjps5YzZZn9dgrPwhn6dnHEm06dFxnOhggQARAQAB 14 | tDdLZXZpbiBEb3JlbiAocmVwby5qYW1ib3gtcHJvamVjdC5jb20pIDxrZXZpbkBk 15 | b3Jlbi5vcmc+iQJOBBMBCgA4FiEENqyVUAE518+c7elOve3b5cquPTcFAl/fH8UC 16 | GwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQve3b5cquPTeO9hAAgr+WFC+M 17 | 4qd5GrSwZAQaCAgXpPsGfhe9BpVaHHvhQfUZcdP8MjUNNEWMgtm6RJhkl5KsAsQ8 18 | XM/CDLn/Xe+piuccgn6eAk96CAWWSxfocOdio3tNbtiZ2t5/7ngD7OZEVyoOTHFr 19 | uVliixqnoFpDcogqWSj4KQRg2Asr+MiysAhnZjU+6icdMd0jAbmxN2PAf7qlfdlM 20 | qFqkIGFxU+XuQR4t1v+fJcQVIvv0StkZwdPqR6pWOB/SMLhUvpExt+mpmWmq3Dpd 21 | cXcEIkzRcPp+Nlj1r/4bAzE5KPmiBco5/17vuj13iIZA8IcPUwxsZOhlRVSy5hDy 22 | UvyMZ37q04KcCASvClEGIZk/SMwlaXANkPHl7DPQMmqIeAyGOar1kBDNCAyTZ0hB 23 | zNGFeyjJkC/4KQ19wT/DHj9+6vPYnUy0XOF5DbLB68HCnAUwZR5MVM0WHwLbDa+I 24 | xHIwXcJz36qfRMkztXgCi+1/6QgSpv2XPqiLuY+b+rG7nmLoj16FUjJUx2rGv6S9 25 | /Rl4zndxUq4JtM0IG5NxmrtFnphnJsA5UOeZQNpjBzlqTdJwbyWpEUDe/lHis63F 26 | tqTHW+WXvs91aLS4T6TziXxCjaljjcsUuCqWtwMHmY329Cvj4BvL22f843virmKq 27 | dUKO9k1n2WYVSBCUpBN5oR+/tuA10PH8QRm5Ag0EX98fxQEQALCO/ZPtFVHWctKP 28 | REwq16tyW0khwLZobrQCxqYjwXIc51Ir4lwpX1vzOjmFE2G7RVMsIHVcJDvuq9Bv 29 | cV5H9Cz4MF3fuVoECykgRwmgpWsJhVjkL0bhhRlYcKcSGPt2wGN+bdaYFXsir8G0 30 | 9u4okO2tOSHqdYdXr2y/slMtdkNyn9xgYxSy1/AbtYjj3IXQYRBuhgJdxqH7uk88 31 | HmXR47msUpVcohoMOM1BiEa8LoTT46ou+tGVwhs4UcboA/fT5O4OSkAeUibqNvEd 32 | SAkysNuL5b51RCl2cbSDabSZwWb//0AHjfe073oFzH91zQIv54bvzQHqNfCMhE7P 33 | pxPdTgqwY5AinIa/z5ymUoB1a++fq50DT4Hi51L7qDgLfPqgoxPHnv4NlXcW/oOj 34 | bWXiLAam3l/5dWqYSApsaKz5AK62pxSUfE8j6i/zHvBERxjTWo+x+gARMywlWKHi 35 | 220c2Mp11VKibaVWw95IdhjBvX9lPg8pKljLNAcydeMZHfb6tcd7gXeqR6Ew8qlx 36 | aERJRhPvB2rkih4H/pxnkSuGlWTjm2SARlmCSTGqIWNt+GrIPcf25Sad2jHSrQNX 37 | CPAyF3a6d0/PcxfwZX1l0zy+j8Vxo75nciO7nYIq2w7ekYXGchxHYTU4HeD2K6/n 38 | LZCnaRu3Q9o6sGl+Ge3TNcvJ6HrrABEBAAGJAjYEGAEKACAWIQQ2rJVQATnXz5zt 39 | 6U697dvlyq49NwUCX98fxQIbDAAKCRC97dvlyq49NxijD/9CPBjk7MseX9y4QBNi 40 | sX+2G9UHJuHkLHL/S3VmfBY26s4McnYrcJhNNfnOpqDE2rSlkNP+rfJMYx3GOS2g 41 | rF2BSyDPBOd9biNc+Y4JwnxAhb7BYwc3WUGU/MJ9KExZDKqPhOnUoVdK1/Sl4+af 42 | P0WNyt4PV3nv0RMalKXhhO8iSzxiEOY5qqfmByzdGZO1cJvL3WIi48pQTJMUmxkE 43 | t5P3lm0JTlT9utFAYiWDXr2ODir69xirSJgsOuekU8y1NvgRM/SA0sf4FBDkn5K7 44 | 0OsltIKIZQI59gvF9+rIOSPPF3HP7/lnRF1/xCaPXbgX6kxhOS5qzfVtDZO4JLi1 45 | pWp9PSvKbovGSXK22tYdpQ0dP6vbasOjqaPv1azajJsQ9KHwrfHUvD1Tm/G45KH6 46 | CI4RUE4Flm+tlUUqZmxMaEirzVpVd/Y7zFwUzoSnmE7izb0FORJaHYr35ZlV9NWM 47 | 3JwQDG610N09Z64ra3Ql87ySGEQNS0j/KTYyiKJlN81CZ6YiY8CQ8l3Pj1rslTam 48 | f37IFTRAubeWBPYXP13YdnsDBwjYF43fEtbjpho4JgV6WdgpDVcI2UbGY8wn1GmD 49 | j7wmnuaaJCzQL2x1djoSc5gx2oFDGSZNqVlVC/VQ9sah7hxueCPEe0JphMF21sBG 50 | tXbeh71aWhW7OTNh7hs2/T8LdQ== 51 | =J205 52 | -----END PGP PUBLIC KEY BLOCK----- 53 | -------------------------------------------------------------------------------- /export-image/04-finalise/01-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" 4 | INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.info" 5 | 6 | on_chroot << EOF 7 | if [ -x /etc/init.d/fake-hwclock ]; then 8 | /etc/init.d/fake-hwclock stop 9 | fi 10 | if hash hardlink 2>/dev/null; then 11 | hardlink -t /usr/share/doc 12 | fi 13 | EOF 14 | 15 | if [ -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config" ]; then 16 | chmod 700 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config" 17 | fi 18 | 19 | rm -f "${ROOTFS_DIR}/usr/bin/qemu-arm-static" 20 | 21 | if [ "${USE_QEMU}" != "1" ]; then 22 | if [ -e "${ROOTFS_DIR}/etc/ld.so.preload.disabled" ]; then 23 | mv "${ROOTFS_DIR}/etc/ld.so.preload.disabled" "${ROOTFS_DIR}/etc/ld.so.preload" 24 | fi 25 | fi 26 | 27 | rm -f "${ROOTFS_DIR}/etc/network/interfaces.dpkg-old" 28 | 29 | rm -f "${ROOTFS_DIR}/etc/apt/sources.list~" 30 | rm -f "${ROOTFS_DIR}/etc/apt/trusted.gpg~" 31 | 32 | rm -f "${ROOTFS_DIR}/etc/passwd-" 33 | rm -f "${ROOTFS_DIR}/etc/group-" 34 | rm -f "${ROOTFS_DIR}/etc/shadow-" 35 | rm -f "${ROOTFS_DIR}/etc/gshadow-" 36 | rm -f "${ROOTFS_DIR}/etc/subuid-" 37 | rm -f "${ROOTFS_DIR}/etc/subgid-" 38 | 39 | rm -f "${ROOTFS_DIR}"/var/cache/debconf/*-old 40 | rm -f "${ROOTFS_DIR}"/var/lib/dpkg/*-old 41 | 42 | rm -f "${ROOTFS_DIR}"/usr/share/icons/*/icon-theme.cache 43 | 44 | rm -f "${ROOTFS_DIR}/var/lib/dbus/machine-id" 45 | 46 | true > "${ROOTFS_DIR}/etc/machine-id" 47 | 48 | ln -nsf /proc/mounts "${ROOTFS_DIR}/etc/mtab" 49 | 50 | find "${ROOTFS_DIR}/var/log/" -type f -exec cp /dev/null {} \; 51 | 52 | rm -f "${ROOTFS_DIR}/root/.vnc/private.key" 53 | rm -f "${ROOTFS_DIR}/etc/vnc/updateid" 54 | 55 | update_issue "$(basename "${EXPORT_DIR}")" 56 | install -m 644 "${ROOTFS_DIR}/etc/rpi-issue" "${ROOTFS_DIR}/boot/issue.txt" 57 | 58 | cp "$ROOTFS_DIR/etc/rpi-issue" "$INFO_FILE" 59 | 60 | 61 | { 62 | if [ -f "$ROOTFS_DIR/usr/share/doc/raspberrypi-kernel/changelog.Debian.gz" ]; then 63 | firmware=$(zgrep "firmware as of" \ 64 | "$ROOTFS_DIR/usr/share/doc/raspberrypi-kernel/changelog.Debian.gz" | \ 65 | head -n1 | sed -n 's|.* \([^ ]*\)$|\1|p') 66 | printf "\nFirmware: https://github.com/raspberrypi/firmware/tree/%s\n" "$firmware" 67 | 68 | kernel="$(curl -s -L "https://github.com/raspberrypi/firmware/raw/$firmware/extra/git_hash")" 69 | printf "Kernel: https://github.com/raspberrypi/linux/tree/%s\n" "$kernel" 70 | 71 | uname="$(curl -s -L "https://github.com/raspberrypi/firmware/raw/$firmware/extra/uname_string7")" 72 | printf "Uname string: %s\n" "$uname" 73 | fi 74 | 75 | printf "\nPackages:\n" 76 | dpkg -l --root "$ROOTFS_DIR" 77 | } >> "$INFO_FILE" 78 | 79 | ROOT_DEV="$(mount | grep "${ROOTFS_DIR} " | cut -f1 -d' ')" 80 | 81 | unmount "${ROOTFS_DIR}" 82 | zerofree "${ROOT_DEV}" 83 | 84 | unmount_image "${IMG_FILE}" 85 | 86 | mkdir -p "${DEPLOY_DIR}" 87 | 88 | rm -f "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.zip" 89 | rm -f "${DEPLOY_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" 90 | 91 | if [ "${DEPLOY_ZIP}" == "1" ]; then 92 | pushd "${STAGE_WORK_DIR}" > /dev/null 93 | zip "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.zip" \ 94 | "$(basename "${IMG_FILE}")" 95 | popd > /dev/null 96 | else 97 | cp "$IMG_FILE" "$DEPLOY_DIR" 98 | fi 99 | 100 | cp "$INFO_FILE" "$DEPLOY_DIR" 101 | -------------------------------------------------------------------------------- /stage3/08-install-sonobus/files/SonoBus.settings: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | 3 | <PROPERTIES> 4 | <VALUE name="filterState" val="2146.S8lauITcyEzaOA..ADBTAIUPMAP.BjFY.D.CEPVYl4VYzEVcz8F.1EFa0UF.Aj.A..........D.PEjTA0D.AHPZjAP.KT.YkYlakQmX0YF.1EFa0UF.Aj.A....f2jXP8C.PEjTA0D.AHPZjAP.MT.YkY1bk4FYwUWXrAfcgwVckAP.IP.............TAIUPMAP.BjFY.DPAEPlb4AfcgwVckAP.IP.........7+..TAIUPMAP.BjFY.DvDEPVdtEVaoMlbkMWXsAGao41Y.XWXrUWY.DPBD.............UPRETS.Df.oQF.ADQAnUVXxwVXzUlaikGckMGc.XWXrUWY.DPBD.............UPRETS.Df.oQF.AfPAo41Ygkla.XWXrUWY.DPBD.....7+++9O..UPRETS.Df.oQF.A3PAo4Vau4Vau41avEla.XWXrUWY.DPBD.............UPRETS.Df.oQF.ArPAo4Vau4Fbg4VL.XWXrUWY.DPBD.........+u..UPRETS.Df.oQF.ArPAo4Vau4Fbg4lL.XWXrUWY.DPBD.........+O..UPRETS.Df.oQF.A.QAsEVZtIWY1UlbhQVXsAG.1EFa0UF.Aj.A........f+C.PEjTA0D.AHPZjAP.STPagklaxUlckImXk4VXhwVYjAfcgwVckAP.IP.............TAIUPMAP.BjFY.DPDEzVXo4lbkYWYxIFakYWYrAfcgwVckAP.IP.....nMZ.r+..TAIUPMAP.BjFY.DPDEzVXo4lbkYWYxIVauQVYrAfcgwVckAP.IP.........7+..TAIUPMAP.BjFY.D.EEzVXo4lbkYWYxIFbxUFYkwVX4AfcgwVckAP.IP.........M.A.TAIUPMAP.BjFY.D.DEzVXo4lbkYWYxI1booWY.XWXrUWY.DPBD.....zLyL7O..UPRETS.Df.oQF.AvPAsE1bzklasUGckAfcgwVckAP.IP.............TAIUPMAP.BjFY.DPCEzVXyQWau41buw1a.XWXrUWY.DPBD.............UPRETS.Df.oQF.A3PAsE1bzIWYiYWa0QWY.XWXrUWY.DPBD.............UPRETS.Df.oQF.A3PAsE1bzMWYtQVa0QWY.XWXrUWY.DPBD.............UPRETS.Df.oQF.AvPAsUFck4VXhwVYjAfcgwVckAP.IP.............TAIUPMAP.BjFY.DPBEzVYzcVXo4F.1EFa0UF.Aj.A........f+C.PEjTA0D.AHPZjAP.OTPakQWZyIWYi8lbjUFY.XWXrUWY.DPBD.........+O..UPRETS.Df.oQF.AnPAsUFczUVav8F.1EFa0UF.Aj.A........YAD.PEjTA0D.AHPZjAP.NTvbk4FYigVXt4VYrMG.1EFa0UF.Aj.A........v+C.PEjTA0D.AHPZjAP.OTvbk4FYlkFakEVcjk1a.XWXrUWY.DPBD.............UPRETS.Df.oQF.A3PAyUlaj0VYzEVcjk1a.XWXrUWY.DPBD.............UPRETS.Df.oQF.ATPA2UFc.XWXrUWY.DPBD.........+O.HUYiUlazMzat4VYiQWZu41b....EgGcxE1TzEFckAP.FT0bkUEYvA0axQG.ATP......LDZg41YkEUcgwlQuIWPrwF.ADv.DUlYgUGazIUYi8lbjklam8Dbzk1atMG.ATP.A....PTYlEVcrQmTkM1axQVZtclQuIWagQG.ATP.B....PTYlEVcrQmTkM1axQVZtclPoQ2bPUlbSEVavwVY.DPAA.A....QkYVX0wFcRU1XuIGYDklb.D.GE7BZu0VYu.WZuPzaiUWak4Fcy8xTu41aBU2b..PRtAWczUjYlU1XzMG..D.AC8VavIWYyM2axMEcgQWY.DvAk4VXhwVYjAP.AL.cnIWYyg1arQF.Aj.A........v.rbgQWZuAP.IP...........EFczE1XqAP.IP.........I.IWYrUVXyUF.Aj.A........TATagsVY0A2Ygkla.DPBD.........APgUGcu0VXqUVcvAP.AH..EgGbg4FYkI2TzEFckAP.GTlagIFakQF.ADv.zglbkMGZuwFY.DPBD........3DvxEFco8F.Aj.A..........TXzQWXisF.Aj.A........v+ibkwVYgMWY.DPBD........jFPsE1ZkUGbmEVZtAP.IP...........DVcz8VagsVY0AG.ADf..vTZskFckI2TzEFckAP.GTlagIFakQF.ADf.zglbkMGZuwFY.DPBD.........+uxEFco8F.Aj.A........P.TXzQWXisF.Aj.A.....EtdD9ibkwVYgMWY.DPBD........jEPsE1ZkUGbmEVZtAP.IP...........DVcz8VagsVY0AG.ADf...UXxEVakQmboMVQwMEcgQWY.DfBk4VXhwVYjAP.AL.ayYlbkEG.Aj.A........NADaycVXo4F.Aj.A...........ZyYlbkEG.Aj.A.......hCCDZycVXo4F.Aj.A...........bwbVXo4F.Aj.A...........bwXlbkEG.Aj.A.......fVADbwDG.Aj.A........P.DbxbVXo4F.Aj.A...........bxXlbkEG.Aj.A.......f1AD.PUVYxMEcgQWYCE1XnUVSgAG....TAIUPMAP.AjFY.DvCEHWYi8latU1XzwVXyQG..."/> 5 | <VALUE name="windowX" val="132"/> 6 | <VALUE name="windowY" val="164"/> 7 | <VALUE name="windowW" val="760"/> 8 | <VALUE name="windowH" val="440"/> 9 | <VALUE name="audioSetup"> 10 | <DEVICESETUP deviceType="JACK" audioOutputDeviceName="system" audioInputDeviceName="system" 11 | audioDeviceRate="48000.0" audioDeviceBufferSize="64"/> 12 | </VALUE> 13 | <VALUE name="shouldOverrideSampleRate" val="1"/> 14 | <VALUE name="shouldCheckForNewVersion" val="1"/> 15 | </PROPERTIES> 16 | -------------------------------------------------------------------------------- /stage3/07-install-boot-script/files/urlrelay.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # The web UI on this device can be accessed from any web browser on same local network. 4 | # However the IP address may not be known, it is assigned by DHCP. 5 | # Solution is to save the url with the urlrelay.com service, which uses source IP and nodeId as keys. 6 | # Then the url can be easily retrieved from any web browser on same local network. 7 | # 8 | # When user goes to urlrelay.com/go, urlrelay service will redirect to the saved URL. 9 | # 10 | # Node ID is required if there are multiple device on same local network registered with urlrelay.com 11 | # In that case use: urlrelay.com/go?id=<node-id> 12 | # 13 | # Source IP is the external IP address of your router, so the saved URL is only accessible from behind the same router. 14 | # nodeId can be anything, it is required when multiple devices are behind the same router. 15 | # 16 | # The default URL is for use with noVNC running on the same device. 17 | # HTTP is used to avoid needing to install a certificate for the UI browser. 18 | # If HTTPS is used, the browser will require a secure websocket (wss://), 19 | # which requires a CA certificate to be installed on the device running the browser. 20 | # 21 | # Parameters will be sourced from /etc/urlrelay/urlrelay.conf it it exists: 22 | # 23 | # NODE_ID Node ID of this device (default: 1) 24 | # 25 | # URL Full url, may contain shell variable ${MY_IP} for local IP 26 | # default: http://${MY_IP}:6080${URL_ARGS} 27 | # 28 | # URL_ARGS query string, i.e. "/?password=xyz123" (default: "") 29 | # 30 | # REQUIRE_ID 0: (default) don't require node ID if this is the only device on this local network 31 | # 1: require node ID even if this is the only device on this local network 32 | 33 | # wait until we have a network connection 34 | while [ ! "$(ping -c 1 google.com)" ]; do 35 | sleep 10 36 | done 37 | sleep 5 38 | # get route info for interface used to get to internet 39 | IP_ROUTE=`ip -o route get to 8.8.8.8` 40 | # extract the source IP and device name 41 | MY_IP=`echo "$IP_ROUTE" | sed -n 's/.*src \([0-9.]\+\).*/\1/p'` 42 | MY_INTF=`echo "$IP_ROUTE" | sed -n 's/.*dev \([a-zA-Z0-9:-]\+\).*/\1/p'` 43 | # lookup the MAC address 44 | MACADDR=`cat /sys/class/net/$MY_INTF/address` 45 | 46 | if [ -f /etc/jambox_version ]; then 47 | read -r JAMBOX_VERSION < /etc/jambox_version 48 | CLIENT="Jambox/${JAMBOX_VERSION}" 49 | else 50 | CLIENT="Jambox" 51 | fi 52 | 53 | if [ -f /etc/urlrelay/urlrelay.conf ]; then 54 | source /etc/urlrelay/urlrelay.conf 55 | fi 56 | 57 | [[ -z "$NODE_ID" ]] && NODE_ID=1 58 | [[ -z "$REQUIRE_ID" ]] && REQUIRE_ID=0 59 | [[ -z "$URL" ]] && URL="http://${MY_IP}:6080${URL_ARGS}" 60 | 61 | PYTHON_VERSION=`python --version 2>&1` 62 | 63 | while [ 1 ] 64 | do 65 | if [[ "$PYTHON_VERSION" =~ ^Python.2.*$ ]]; then 66 | # python2: 67 | ENC_URL=$(python -c "import urllib, sys; print urllib.quote(sys.argv[1])" "$URL") 68 | ENC_CLIENT=$(python -c "import urllib, sys; print urllib.quote(sys.argv[1])" "$CLIENT") 69 | else 70 | # python3 71 | ENC_URL=$(python3 -c "import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))" "$URL") 72 | ENC_CLIENT=$(python3 -c "import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))" "$CLIENT") 73 | fi 74 | curl -s "https://urlrelay.com/set?id=${NODE_ID}&url=${ENC_URL}&requireId=${REQUIRE_ID}&macaddr=${MACADDR}&client=${ENC_CLIENT}" 75 | # re-register once per day 76 | sleep 1d 77 | done 78 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/audacity.cfg: -------------------------------------------------------------------------------- 1 | PrefsVersion=1.1.1r1 2 | SelectionFormat=hh:mm:ss + milliseconds 3 | FrequencySelectionFormatName=Hz 4 | BandwidthSelectionFormatName=octaves 5 | [Version] 6 | Major=2 7 | Minor=1 8 | Micro=2 9 | [Directories] 10 | TempDir=/var/tmp/audacity-pi 11 | [AudioIO] 12 | RecordingDevice=system 13 | Host=JACK Audio Connection Kit 14 | PlaybackDevice=system 15 | RecordingSourceIndex=-1 16 | RecordingSource= 17 | RecordChannels=2 18 | EffectsPreviewLen=6 19 | CutPreviewBeforeLen=2 20 | CutPreviewAfterLen=1 21 | SeekShortPeriod=1 22 | SeekLongPeriod=15 23 | Duplex=1 24 | SWPlaythrough=0 25 | LatencyDuration=100 26 | LatencyCorrection=-130 27 | SoundActivatedRecord=0 28 | SilenceLevel=-50 29 | [FFmpeg] 30 | Enabled=1 31 | [GUI] 32 | DefaultViewModeNew=0 33 | ErgonomicTransportButtons=1 34 | ShowSplashScreen=1 35 | EnvdBRange=60 36 | Help=Local 37 | BeepOnCompletion=0 38 | ShowTrackNameInWaveform=0 39 | RetainLabels=0 40 | AutoScroll=1 41 | TracksFitVerticallyZoomed=0 42 | SelectAllOnNone=1 43 | EnableCutLines=0 44 | AdjustSelectionEdges=1 45 | CircularTrackNavigation=0 46 | EditClipCanMove=1 47 | ScrollBeyondZero=0 48 | Solo=Standard 49 | EmptyCanBeDirty=1 50 | [GUI/ToolBars] 51 | [GUI/ToolBars/Control] 52 | Dock=1 53 | Order=1 54 | Show=1 55 | X=-1 56 | Y=-1 57 | W=327 58 | H=55 59 | [GUI/ToolBars/Tools] 60 | Dock=1 61 | Order=2 62 | Show=1 63 | X=-1 64 | Y=-1 65 | W=94 66 | H=55 67 | [GUI/ToolBars/CombinedMeter] 68 | Dock=1 69 | Order=999 70 | Show=0 71 | X=-1 72 | Y=-1 73 | W=338 74 | H=55 75 | [GUI/ToolBars/RecordMeter] 76 | Dock=1 77 | Order=3 78 | Show=1 79 | X=-1 80 | Y=-1 81 | W=460 82 | H=27 83 | [GUI/ToolBars/PlayMeter] 84 | Dock=1 85 | Order=4 86 | Show=1 87 | X=-1 88 | Y=-1 89 | W=460 90 | H=27 91 | [GUI/ToolBars/Mixer] 92 | Dock=1 93 | Order=5 94 | Show=1 95 | X=-1 96 | Y=-1 97 | W=323 98 | H=27 99 | [GUI/ToolBars/Edit] 100 | Dock=1 101 | Order=6 102 | Show=1 103 | X=-1 104 | Y=-1 105 | W=377 106 | H=27 107 | [GUI/ToolBars/Transcription] 108 | Dock=1 109 | Order=7 110 | Show=1 111 | X=-1 112 | Y=-1 113 | W=140 114 | H=27 115 | [GUI/ToolBars/Device] 116 | Dock=1 117 | Order=8 118 | Show=1 119 | X=-1 120 | Y=-1 121 | W=616 122 | H=31 123 | [GUI/ToolBars/Selection] 124 | Dock=2 125 | Order=1 126 | Show=1 127 | X=-1 128 | Y=-1 129 | W=719 130 | H=55 131 | [GUI/ToolBars/SpectralSelection] 132 | Dock=2 133 | Order=999 134 | Show=0 135 | X=-1 136 | Y=-1 137 | W=253 138 | H=55 139 | [SamplingRate] 140 | DefaultProjectSampleRate=48000 141 | DefaultProjectSampleFormat=262159 142 | [Quality] 143 | LibsoxrSampleRateConverter=1 144 | DitherAlgorithm=0 145 | LibsoxrHQSampleRateConverter=3 146 | HQDitherAlgorithm=3 147 | [Locale] 148 | Language= 149 | [Spectrum] 150 | MinFreq=0 151 | MaxFreq=8000 152 | Range=80 153 | Gain=20 154 | FrequencyGain=0 155 | FFTSize=256 156 | ZeroPaddingFactor=1 157 | WindowType=3 158 | Grayscale=0 159 | ScaleType=0 160 | EnableSpectralSelection=0 161 | Algorithm=0 162 | [FileFormats] 163 | CopyOrEditUncompressedData=copy 164 | ExportDownMix=1 165 | AllegroStyle=1 166 | SaveProjectWithDependencies=ask 167 | [AudioFiles] 168 | NormalizeOnLoad=0 169 | ShowId3Dialog=1 170 | [ExtendedImport] 171 | OverrideExtendedImportByOpenFileDialogChoice=1 172 | [Warnings] 173 | FirstProjectSave=1 174 | DiskSpaceWarning=1 175 | MixStereo=1 176 | MixMono=1 177 | CopyOrEditUncompressedDataAsk=1 178 | [Ladspa] 179 | Enable=1 180 | [LV2] 181 | Enable=1 182 | [Nyquist] 183 | Enable=1 184 | [VAMP] 185 | Enable=1 186 | [VST] 187 | Enable=1 188 | [Effects] 189 | GroupBy=sortby:name 190 | MaxPerGroup=15 191 | [Prefs] 192 | PrefsCategory=3 193 | [Prefs/KeyConfig] 194 | ViewBy=tree 195 | [Window] 196 | X=122 197 | Y=146 198 | Width=940 199 | Height=694 200 | Maximized=0 201 | Normal_X=122 202 | Normal_Y=146 203 | Normal_Width=940 204 | Normal_Height=694 205 | Iconized=0 206 | -------------------------------------------------------------------------------- /stage3/12-install-hpsjam/files/hpsjam_start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | JACK_APP=hpsjam 3 | sudo systemctl set-environment JACK_APP=hpsjam 4 | 5 | if [ -f ~/.config/hpsjam_start.conf ]; then 6 | source ~/.config/hpsjam_start.conf 7 | fi 8 | 9 | # Audio interface is chosen in /etc/jackdrc.conf 10 | # source it here to determine the device to use 11 | if [ -f /etc/jackdrc.conf ]; then 12 | source /etc/jackdrc.conf 13 | fi 14 | 15 | echo ALSA Device: $DEVICE 16 | ALSA_READY=no 17 | until [[ $ALSA_READY == "yes" ]]; do 18 | aplay -L | grep -q "$DEVICE" 19 | PLAY_RESULT=$? 20 | arecord -L | grep -q "$DEVICE" 21 | RECORD_RESULT=$? 22 | if [[ "$PLAY_RESULT" == "0" ]] && [[ "$RECORD_RESULT" == "0" ]]; then 23 | ALSA_READY=yes 24 | else 25 | echo "ALSA Device $DEVICE is not available: PLAY_RESULT: $PLAY_RESULT, RECORD_RESULT: $RECORD_RESULT" 26 | sleep 5 27 | fi 28 | done 29 | 30 | # if HPSJAM_SERVER is defined, check for connectivity 31 | if [ -n "$HPSJAM_SERVER" ]; then 32 | if [[ "$HPSJAM_SERVER" == *:* ]]; then 33 | HPSJAM_PORT="${HPSJAM_SERVER##*:}" 34 | else 35 | HPSJAM_PORT=22124 36 | fi 37 | # Check that HpsJam server is reachable by sending an HpsJam UDP ping, and checking if server replies 38 | # This should work even if server is behind a NAT 39 | PING='\x00\x13\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 40 | PING+='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 41 | PING+='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 42 | PING+='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 43 | PING+='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x41\x00' 44 | PING+='\x00\x00\x00\xeb\x0d\x00\x00\x00\x00\x00\x00\x00\x00' 45 | while [[ "`echo -n -e ${PING} | nc -u -w 2 ${HPSJAM_SERVER%:*} ${HPSJAM_PORT} 2>/dev/null | wc -c`" == "0" ]] 46 | do 47 | echo "HpsJam Server ${HPSJAM_SERVER%:*} is not reachable on UDP port ${HPSJAM_PORT}, retrying in 15 seconds." 48 | sleep 15 49 | done 50 | fi 51 | 52 | [[ -n "$MASTER_LEVEL" ]] && amixer set Master $MASTER_LEVEL 53 | [[ -n "$CAPTURE_LEVEL" ]] && amixer set Capture $CAPTURE_LEVEL 54 | 55 | sudo systemctl restart jack 56 | sleep 5 57 | 58 | # check that jack service is running 59 | while [[ "`systemctl show -p SubState --value jack`" != "running" ]] 60 | do 61 | echo "jack SubState is: `systemctl show -p SubState --value jack`; restarting jack" 62 | sudo systemctl restart jack 63 | sleep 5 64 | done 65 | 66 | # Start aj-snapshot as a background process if HpsJam had $AJ_SNAPSHOT set 67 | # Default is unset (HpsJam makes alsa-jack connections). 68 | # If set, this will make the alsa/jack connections specified in snapshot file $AJ_SNAPSHOT after HpsJam starts 69 | if [[ -f ~/.config/aj-snapshot/$AJ_SNAPSHOT ]]; then 70 | echo "Starting aj-snapshot daemon" 71 | aj-snapshot --remove --daemon ~/.config/aj-snapshot/$AJ_SNAPSHOT & 72 | AJ_SNAPSHOT_PID=$! 73 | JACKARG="--jacknoconnect" 74 | fi 75 | 76 | # start HpsJam with --jacknoconnect option if aj-snapshot is controlling the connections. 77 | if [ -n "$HPSJAM_SERVER" ]; then 78 | if [[ -n "$HPSJAM_PRIORITY" ]]; then 79 | timeout ${HPSJAM_TIMEOUT:-120m} chrt --${HPSJAM_SCHED:-fifo} ${HPSJAM_PRIORITY:-70} HpsJam $JACKARG --connect $HPSJAM_SERVER 80 | else 81 | timeout ${HPSJAM_TIMEOUT:-120m} nice -n ${HPSJAM_NICEADJ:-0} HpsJam $JACKARG --connect $HPSJAM_SERVER 82 | fi 83 | RESULT=$? 84 | # shutdown if ended due to timeout 85 | [[ "$RESULT" != "0" ]] && sudo shutdown now 86 | else 87 | if [[ -n "$HPSJAM_PRIORITY" ]]; then 88 | chrt --${HPSJAM_SCHED:-rr} ${HPSJAM_PRIORITY} HpsJam $JACKARG 89 | else 90 | nice -n ${HPSJAM_NICEADJ:-0} HpsJam $JACKARG 91 | fi 92 | fi 93 | 94 | [[ -n "$AJ_SNAPSHOT_PID" ]] && kill $AJ_SNAPSHOT_PID # kill aj-snapshot background process 95 | sudo systemctl unset-environment JACK_APP 96 | sudo systemctl restart jack 97 | exit 0 98 | -------------------------------------------------------------------------------- /stage3/10-install-jamtaba/files/Jamtaba.json: -------------------------------------------------------------------------------- 1 | { 2 | "Collapse": { 3 | "bottomSection": false, 4 | "chatSection": false, 5 | "localChannels": false 6 | }, 7 | "Looper": { 8 | "bitDepth": 16, 9 | "encodeAudio": false, 10 | "loopsFolder": "/home/pi/Documents/JamTaba/Looper", 11 | "preferredMode": 0, 12 | "preferresLayersCount": 4 13 | }, 14 | "Metering": { 15 | "meterOption": 0, 16 | "refreshRate": 30, 17 | "showMaxPeak": true, 18 | "waveDrawingMode": 3 19 | }, 20 | "PrivateServer": { 21 | "lastPassword": "", 22 | "lastPort": 2049, 23 | "lastServers": [ 24 | "localhost" 25 | ] 26 | }, 27 | "Remember": { 28 | "boost": true, 29 | "bottomSection": true, 30 | "chatSection": true, 31 | "level": true, 32 | "localChannels": true, 33 | "lowCut": true, 34 | "mute": true, 35 | "pan": true 36 | }, 37 | "VST": { 38 | "BlackListPlugins": [ 39 | ], 40 | "cachedPlugins": [ 41 | ], 42 | "scanPaths": [ 43 | "/home/pi" 44 | ] 45 | }, 46 | "audio": { 47 | "audioInputDevice": "system", 48 | "audioOutputDevice": "system", 49 | "bufferSize": 256, 50 | "encodingQuality": 0, 51 | "firstIn": 0, 52 | "firstOut": 0, 53 | "lastIn": 1, 54 | "lastOut": 1, 55 | "sampleRate": 48000 56 | }, 57 | "chatFontSizeOffset": 0, 58 | "inputs": { 59 | "channels": [ 60 | { 61 | "instrument": -1, 62 | "subchannels": [ 63 | { 64 | "boost": 0, 65 | "channelsCount": 2, 66 | "firstInput": 0, 67 | "gain": 1, 68 | "higherNote": 127, 69 | "lowerNote": 0, 70 | "midiChannel": -1, 71 | "midiDevice": -1, 72 | "muted": false, 73 | "pan": 0, 74 | "plugins": [ 75 | ], 76 | "stereoInverted": false, 77 | "transpose": 0 78 | } 79 | ] 80 | } 81 | ] 82 | }, 83 | "intervalProgressShape": 0, 84 | "intervalsBeforeInactivityWarning": 5, 85 | "masterGain": 1, 86 | "metronome": { 87 | "builtInMetronome": "Clave", 88 | "customAccentBeatAudioFile": "", 89 | "customOffBeatAudioFile": "", 90 | "customPrimaryBeatAudioFile": "", 91 | "gain": 1, 92 | "muted": false, 93 | "pan": 0, 94 | "usingCustomSounds": false 95 | }, 96 | "midi": { 97 | "inputsState": [ 98 | true 99 | ] 100 | }, 101 | "publicChatActivated": false, 102 | "recording": { 103 | "dirNameDateFormat": "Qt::TextDate", 104 | "jamRecorders": { 105 | "ClipSortLogGenerator": { 106 | "activated": false 107 | }, 108 | "ReaperProjectGenerator": { 109 | "activated": false 110 | } 111 | }, 112 | "recordActivated": false, 113 | "recordingPath": "/home/pi/Documents/JamTaba/Jams" 114 | }, 115 | "sync": { 116 | "syncOutputsState": [ 117 | ] 118 | }, 119 | "theme": "Ice", 120 | "tracksLayoutOrientation": 2, 121 | "translation": "en", 122 | "userName": "jambox", 123 | "usingNarrowTracks": false, 124 | "window": { 125 | "fullScreenView": false, 126 | "location": { 127 | "x": -0.001953125, 128 | "y": 0.0390625 129 | }, 130 | "maximized": false, 131 | "size": { 132 | "height": 695, 133 | "width": 1100 134 | } 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/jns/jackdrc.conf: -------------------------------------------------------------------------------- 1 | # 2 | # configuraton parameters for /etc/jackdrc 3 | # 4 | # DEVICE=<device> # alsa device ID of USB interface (default: last record device) 5 | # PERIOD=<period> # Jack Audio samples per period (default: 64) 6 | # NPERIODS=<nperiods> # Jack Audio number of periods per buffer (default: 8) 7 | 8 | # NPERIODS defaults to 8, which works with most interfaces with PERIOD=64 9 | # Many interfaces can achieve lower latency by using smaller NPERIODS. 10 | # You can experiment with lower values. Too low can result audio problems such as crackling or distortion. 11 | # Be aware that if NPERIODS is too low, the interface can sound fine for a while, 12 | # or sound fine until a reboot, then problems can show up. 13 | 14 | # DEVICE is set by default to be the last capture device listed by the command: arecord -L | grep ^hw: 15 | # 16 | # This file /etc/jackdrc.conf is sourced by the following scripts which need to know which device to use: 17 | # /etc/jackdrc 18 | # /usr/local/bin/jamulus_start.sh (for checking device readiness) 19 | # /usr/local/bin/sonobus_start.sh (for checking device readiness) 20 | # /usr/local/bin/jamtaba_start.sh (for checking device readiness) 21 | # /usr/local/bin/jacktrip_start.sh (for checking device readiness) 22 | # /usr/local/bin/jammernetz_start.sh 23 | # 24 | # Device naming can vary by kernel or Pi model. 25 | # 26 | # If you only have one audio interface, you don't need to set DEVICE. 27 | # If the interface you want is the last one listed by "arecord -L", you don't need to set DEVICE. 28 | # 29 | # You only need to set DEVICE if you have more then one interface, 30 | # and the interface you want is not the (default) last one listed by 'arecord -L | grep ^hw:' 31 | # 32 | # If you want the first interface, just comment out the DEVICE= command with "tail", 33 | # and uncomment the DEVICE= command with "head". 34 | # 35 | # If you have more than 2 interfaces, and you don't want the first or last, 36 | # then you will need to set DEVICE to a device listed by: arecord -L | grep ^hw: 37 | # for example: DEVICE=hw:CARD=CODEC,DEV=0 38 | 39 | # The following command sets the Jack Device to be the last recording device. 40 | # Remove or comment out this command if a different device is required 41 | DEVICE=`arecord -L | grep ^hw: | tail -n1` 42 | 43 | # Use the following command if you want the first recording interface to always be chosen. 44 | # DEVICE=`arecord -L | grep ^hw: | head -n1` 45 | 46 | ## Here is where to change the settings for PERIOD and NPERIODS. 47 | ## PERIOD=64 will work in most cases for Pi4, and is required for Jamulus "small network buffers" setting to work. 48 | ## PERIOD=128 may be needed on Pi3 to avoid Xruns. 49 | ## You may be able to decrease NPERIODS for lower latency. 50 | ## You may need to increase NPERIODS if you get clicks/pops or severe distortion 51 | ## Values here may be overridden by app-specific settings below. 52 | 53 | # get which model Pi we are running on, for any model-specific settings 54 | MODEL=$(tr -d '\0' </proc/device-tree/model) 55 | 56 | if [[ "$MODEL" =~ "Pi 4" ]]; then 57 | PERIOD=64 # Pi4 can use PERIOD=64 in most cases 58 | NPERIODS=3 59 | else 60 | PERIOD=128 # If not running on Pi4, use longer PERIOD to avoid XRuns 61 | NPERIODS=3 62 | fi 63 | 64 | JACK_PRIORITY=90 65 | 66 | # App-specific settings needed by app start script and/or systemd jack service restart can go here. 67 | # The environment var $JACK_APP is set at the beinning of any jambox app start script. 68 | # JACK_APP is also set in systemd environment, it exists when the script restarts the jack service. 69 | # Any values set below will override values set above. 70 | case "$JACK_APP" in 71 | jamulus) 72 | JAMULUS_NICEADJ=-18 73 | ;; 74 | sonobus) 75 | SONOBUS_PRIORITY=40 76 | SONOBUS_NICEADJ=-10 77 | ;; 78 | jacktrip) 79 | ;; 80 | jammernetz) 81 | PERIOD=128 82 | NPERIODS=3 83 | ;; 84 | jamtaba) 85 | # jamtaba is not stable with PERIOD=64, requires special settings 86 | JACK_PRIORITY=90 87 | JAMTABA_NICEADJ=-18 88 | if [[ "$MODEL" =~ "Pi 4" ]]; then 89 | PERIOD=128 90 | NPERIODS=3 91 | else 92 | PERIOD=512 93 | NPERIODS=2 94 | fi 95 | ;; 96 | *) 97 | ;; 98 | esac 99 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/01-run.sh: -------------------------------------------------------------------------------- 1 | # Install desktop shortcuts. 2 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/lxsession/LXDE-pi 3 | cp files/autostart ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/lxsession/LXDE-pi/autostart 4 | cp files/jackdrc ${ROOTFS_DIR}/etc/jackdrc 5 | chmod +x ${ROOTFS_DIR}/etc/jackdrc 6 | 7 | cp files/jamulus-server.png /${ROOTFS_DIR}/usr/share/icons/ 8 | 9 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop 10 | cp files/Desktop/*.desktop ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Desktop/ 11 | cp files/Desktop/*.desktop ${ROOTFS_DIR}/usr/share/applications/ 12 | 13 | echo "NoDisplay=true" >> ${ROOTFS_DIR}/usr/share/applications/jamulus.desktop 14 | 15 | cp files/midi*.py ${ROOTFS_DIR}/usr/local/bin/ 16 | chmod +x ${ROOTFS_DIR}/usr/local/bin/midi*.py 17 | 18 | cp files/jamulus_start.sh ${ROOTFS_DIR}/usr/local/bin/ 19 | chmod +x ${ROOTFS_DIR}/usr/local/bin/jamulus_start.sh 20 | 21 | cp files/jambox_start.sh ${ROOTFS_DIR}/usr/local/bin/ 22 | chmod +x ${ROOTFS_DIR}/usr/local/bin/jambox_start.sh 23 | 24 | mkdir -p ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/Jamulus 25 | mkdir -p ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus 26 | 27 | mkdir -p ${ROOTFS_DIR}/boot/payload/etc 28 | 29 | # allow custom build version by defining: 30 | # export CUSTOM_VERSION=<custom_version_name> 31 | # and placing customized files in directory: 32 | # stage3/06-install-jamulus/files/${CUSTOM_VERSION}/ 33 | # customized files may include: 34 | # jackdrc.conf 35 | # jamulus_start.conf 36 | # Jamulus.ini 37 | # README.md 38 | 39 | if [[ -n "$CUSTOM_VERSION" ]]; then 40 | if [[ -f files/${CUSTOM_VERSION}/jamulus_start.conf ]]; then 41 | cp files/${CUSTOM_VERSION}/jamulus_start.conf ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/Jamulus/ 42 | cp files/${CUSTOM_VERSION}/jamulus_start.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus/ 43 | else 44 | cp files/jamulus_start.conf ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/Jamulus/ 45 | cp files/jamulus_start.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus/ 46 | fi 47 | if [[ -f files/${CUSTOM_VERSION}/Jamulus.ini ]]; then 48 | cp files/${CUSTOM_VERSION}/Jamulus.ini ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/Jamulus/ 49 | cp files/${CUSTOM_VERSION}/Jamulus.ini ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus/ 50 | else 51 | cp files/Jamulus.ini ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/Jamulus/ 52 | cp files/Jamulus.ini ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus/ 53 | fi 54 | if [[ -f files/${CUSTOM_VERSION}/jackdrc.conf ]]; then 55 | cp files/${CUSTOM_VERSION}/jackdrc.conf ${ROOTFS_DIR}/boot/payload/etc/ 56 | cp files/${CUSTOM_VERSION}/jackdrc.conf ${ROOTFS_DIR}/etc/ 57 | else 58 | cp files/jackdrc.conf ${ROOTFS_DIR}/boot/payload/etc/ 59 | cp files/jackdrc.conf ${ROOTFS_DIR}/etc/ 60 | fi 61 | if [[ -f files/${CUSTOM_VERSION}/README.md ]]; then 62 | cp files/${CUSTOM_VERSION}/README.md ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/ 63 | fi 64 | # if any custom version .gif files exist, copy them to /usr/local/share/ 65 | if [[ "`echo files/${CUSTOM_VERSION}/*.gif`" != "files/${CUSTOM_VERSION}/*.gif" ]]; then 66 | cp files/${CUSTOM_VERSION}/*.gif ${ROOTFS_DIR}/usr/local/share/ 67 | fi 68 | if [[ "`echo files/${CUSTOM_VERSION}/*.png`" != "files/${CUSTOM_VERSION}/*.png" ]]; then 69 | cp files/${CUSTOM_VERSION}/*.png ${ROOTFS_DIR}/usr/local/share/ 70 | fi 71 | else 72 | cp files/jamulus_start.conf ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/Jamulus/ 73 | cp files/jamulus_start.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus/ 74 | cp files/Jamulus.ini ${ROOTFS_DIR}/boot/payload/home/${FIRST_USER_NAME}/.config/Jamulus/ 75 | cp files/Jamulus.ini ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus/ 76 | cp files/jackdrc.conf ${ROOTFS_DIR}/boot/payload/etc/ 77 | cp files/jackdrc.conf ${ROOTFS_DIR}/etc/ 78 | fi 79 | 80 | # install jamulus-server files (binary is same as jamulus client) 81 | cp files/jamulus-server.service ${ROOTFS_DIR}/usr/lib/systemd/system/ 82 | cp files/jamulus-server2.service ${ROOTFS_DIR}/usr/lib/systemd/system/ 83 | cp files/jamulus-server.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus/ 84 | cp files/jamulus-server2.conf ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus/ 85 | cp files/Jamulusserver.ini ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus/ 86 | cp files/Jamulusserver2.ini ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/Jamulus/ 87 | mkdir -p ${ROOTFS_DIR}/var/recordings 88 | 89 | on_chroot << EOF 90 | chown ${FIRST_USER_NAME} /var/recordings 91 | chgrp audio /var/recordings 92 | EOF 93 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/jackdrc.conf: -------------------------------------------------------------------------------- 1 | # 2 | # configuraton parameters for /etc/jackdrc 3 | # 4 | # DEVICE=<device> # alsa device ID of USB interface (default: last record device) 5 | # PERIOD=<period> # Jack Audio samples per period (default: 64) 6 | # NPERIODS=<nperiods> # Jack Audio number of periods per buffer (default: 8) 7 | 8 | # NPERIODS defaults to 8, which works with most interfaces with PERIOD=64 9 | # Many interfaces can achieve lower latency by using smaller NPERIODS. 10 | # You can experiment with lower values. Too low can result audio problems such as crackling or distortion. 11 | # Be aware that if NPERIODS is too low, the interface can sound fine for a while, 12 | # or sound fine until a reboot, then problems can show up. 13 | 14 | # DEVICE is set by default to be the last capture device listed by the command: arecord -L | grep ^hw: 15 | # 16 | # This file /etc/jackdrc.conf is sourced by the following scripts which need to know which device to use: 17 | # /etc/jackdrc 18 | # /usr/local/bin/jamulus_start.sh (for checking device readiness) 19 | # /usr/local/bin/sonobus_start.sh (for checking device readiness) 20 | # /usr/local/bin/jamtaba_start.sh (for checking device readiness) 21 | # /usr/local/bin/jacktrip_start.sh (for checking device readiness) 22 | # /usr/local/bin/jammernetz_start.sh 23 | # 24 | # Device naming can vary by kernel or Pi model. 25 | # 26 | # If you only have one audio interface, you don't need to set DEVICE. 27 | # If the interface you want is the last one listed by "arecord -L", you don't need to set DEVICE. 28 | # 29 | # You only need to set DEVICE if you have more then one interface, 30 | # and the interface you want is not the (default) last one listed by 'arecord -L | grep ^hw:' 31 | # 32 | # If you want the first interface, just comment out the DEVICE= command with "tail", 33 | # and uncomment the DEVICE= command with "head". 34 | # 35 | # If you have more than 2 interfaces, and you don't want the first or last, 36 | # then you will need to set DEVICE to a device listed by: arecord -L | grep ^hw: 37 | # for example: DEVICE=hw:CARD=CODEC,DEV=0 38 | 39 | # The following command sets the Jack Device to be the last record + play device. 40 | # Filtering for record + play devices will avoid unidirectional devices such as camera or headphones. 41 | # Remove or comment out this command if a different device is required 42 | DEVICE=`comm -12 <(arecord -L | grep ^hw: | sort) <(aplay -L | grep ^hw: | sort) | tail -n1` 43 | 44 | # Use the following command if you want the first record + plqy interface to always be chosen. 45 | #DEVICE=`comm -12 <(arecord -L | grep ^hw: | sort) <(aplay -L | grep ^hw: | sort) | head -n1` 46 | 47 | ## Here is where to change the settings for PERIOD and NPERIODS. 48 | ## PERIOD=64 will work in most cases for Pi4, and is required for Jamulus "small network buffers" setting to work. 49 | ## PERIOD=128 may be needed on Pi3 to avoid Xruns. 50 | ## You may be able to decrease NPERIODS for lower latency. 51 | ## You may need to increase NPERIODS if you get clicks/pops or severe distortion 52 | ## Values here may be overridden by app-specific settings below. 53 | 54 | # get which model Pi we are running on, for any model-specific settings 55 | MODEL=$(tr -d '\0' </proc/device-tree/model) 56 | 57 | if [[ "$MODEL" =~ "Pi 4" ]]; then 58 | PERIOD=64 # Pi4 can use PERIOD=64 in most cases 59 | NPERIODS=3 60 | else 61 | PERIOD=128 # If not running on Pi4, use longer PERIOD to avoid XRuns 62 | NPERIODS=3 63 | fi 64 | 65 | JACK_PRIORITY=90 66 | 67 | # App-specific settings needed by app start script and/or systemd jack service restart can go here. 68 | # The environment var $JACK_APP is set at the beinning of any jambox app start script. 69 | # JACK_APP is also set in systemd environment, it exists when the script restarts the jack service. 70 | # Any values set below will override values set above. 71 | case "$JACK_APP" in 72 | hpsjam) 73 | HPSJAM_PRIORITY=40 74 | ;; 75 | jamulus) 76 | JAMULUS_NICEADJ=-18 77 | ;; 78 | sonobus) 79 | SONOBUS_PRIORITY=40 80 | SONOBUS_NICEADJ=-10 81 | ;; 82 | jacktrip) 83 | ;; 84 | jammernetz) 85 | PERIOD=128 86 | NPERIODS=3 87 | ;; 88 | jamtaba) 89 | # jamtaba is not stable with PERIOD=64, requires special settings 90 | JACK_PRIORITY=90 91 | JAMTABA_NICEADJ=-18 92 | if [[ "$MODEL" =~ "Pi 4" ]]; then 93 | PERIOD=128 94 | NPERIODS=3 95 | else 96 | PERIOD=512 97 | NPERIODS=2 98 | fi 99 | ;; 100 | *) 101 | ;; 102 | esac 103 | -------------------------------------------------------------------------------- /stage3/06-install-jamulus/files/jamulus_start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | JACK_APP=jamulus 3 | sudo systemctl set-environment JACK_APP=jamulus 4 | 5 | if [ -f ~/.config/Jamulus/jamulus_start.conf ]; then 6 | source ~/.config/Jamulus/jamulus_start.conf 7 | fi 8 | 9 | # check if a MIDI device is connected 10 | MIDI_DEVICE_COUNT=`amidi -l | grep hw: | wc -l` 11 | if [[ "$MIDI_DEVICE_COUNT" == "0" ]]; then 12 | # if no MIDI devices, don't pass any string to Jamulus even if one was configured 13 | unset JAMULUS_CTRLMIDICH 14 | unset JAMULUS_MIDI_SCRIPT 15 | sudo systemctl unset-environment JACK_MIDI_ARG 16 | else 17 | # If a MIDI device is connected, check for known MIDI controllers (currently only X-Touch Mini) 18 | MIDI_DEVICE=`amidi -l | grep "X-TOUCH MINI" | head -n1` 19 | if [[ -n "$MIDI_DEVICE" ]]; then 20 | [[ -z "$JAMULUS_CTRLMIDICH" ]] && JAMULUS_CTRLMIDICH="11;f1*16;m19*16;s35*16;p51*16" 21 | [[ -z "$JAMULUS_MIDI_SCRIPT" ]] && JAMULUS_MIDI_SCRIPT=/usr/local/bin/midi-jamulus-xtouchmini-16ch.py 22 | fi 23 | # If no match, check for additional known MIDI controllers here 24 | # 25 | # if still no JAMULUS_MIDI_SCRIPT set, but JAMULUS_CTRLMIDICH is set, use a default script that connects jack midi to jamulus 26 | [[ -n "$JAMULUS_CTRLMIDICH" ]] && [[ -z "$JAMULUS_MIDI_SCRIPT" ]] && JAMULUS_MIDI_SCRIPT=/usr/local/bin/midi-jamulus-passthrough.py 27 | 28 | if [[ -n "$JAMULUS_CTRLMIDICH" ]]; then 29 | # we are using MIDI with jamulus. Set a default MIDI script if none has been selected. 30 | [[ -z "$JAMULUS_MIDI_SCRIPT" ]] && JAMULUS_MIDI_SCRIPT=/usr/local/bin/midi-jamulus-passthrough.py 31 | # Jack will be forced to capture MIDI devices and send to jack. Save the current state so we can set it back after Jamulus exits. 32 | JACK_MIDI_ARG_SAVE=`sudo systemctl show-environment | grep JACK_MIDI_ARG | head -n1` 33 | sudo systemctl set-environment JACK_MIDI_ARG="-X raw" 34 | else 35 | sudo systemctl unset-environment JACK_MIDI_ARG 36 | fi 37 | fi 38 | 39 | # Audio interface is chosen in /etc/jackdrc.conf 40 | # source it here to determine the device to use 41 | if [ -f /etc/jackdrc.conf ]; then 42 | source /etc/jackdrc.conf 43 | fi 44 | 45 | echo ALSA Device: $DEVICE 46 | ALSA_READY=no 47 | until [[ $ALSA_READY == "yes" ]]; do 48 | aplay -L | grep -q "$DEVICE" 49 | PLAY_RESULT=$? 50 | arecord -L | grep -q "$DEVICE" 51 | RECORD_RESULT=$? 52 | if [[ "$PLAY_RESULT" == "0" ]] && [[ "$RECORD_RESULT" == "0" ]]; then 53 | ALSA_READY=yes 54 | else 55 | echo "ALSA Device $DEVICE not available: PLAY_RESULT: $PLAY_RESULT, RECORD_RESULT: $RECORD_RESULT" 56 | sleep 5 57 | fi 58 | done 59 | 60 | [[ -n "$MASTER_LEVEL" ]] && amixer set Master $MASTER_LEVEL 61 | [[ -n "$CAPTURE_LEVEL" ]] && amixer set Capture $CAPTURE_LEVEL 62 | 63 | # if JAMULUS_SERVER is defined, check for connectivity 64 | if [ -n "$JAMULUS_SERVER" ]; then 65 | if [[ "$JAMULUS_SERVER" == *:* ]]; then 66 | JAMULUS_PORT="${JAMULUS_SERVER##*:}" 67 | else 68 | JAMULUS_PORT=22124 69 | fi 70 | # Check that Jamulus server is reachable by sending a Jamulus UDP ping, and checking if server replies 71 | # This should work even if server is behind a NAT 72 | while [[ "`echo -n -e '\x00\x00\xea\x03\x00\x05\x00\xab\x2e\x04\x00\x00\x48\x9b' | nc -u -w 2 ${JAMULUS_SERVER%:*} ${JAMULUS_PORT} 2>/dev/null | wc -c`" == "0" ]] 73 | do 74 | echo "Jamulus Server ${JAMULUS_SERVER%:*} is not reachable on UDP port ${JAMULUS_PORT}, retrying in 15 seconds." 75 | sleep 15 76 | done 77 | fi 78 | 79 | sudo systemctl restart jack 80 | sleep 5 81 | 82 | # check that jack service is running 83 | while [[ "`systemctl show -p SubState --value jack`" != "running" ]] 84 | do 85 | echo "jack SubState is: `systemctl show -p SubState --value jack`; restarting jack" 86 | sudo systemctl restart jack 87 | sleep 5 88 | done 89 | 90 | # Start aj-snapshot as a background process. 91 | # this will make the alsa/jack connections specified in snapshot file $AJ_SNAPSHOT after Jamulus starts 92 | if [[ -f ~/.config/aj-snapshot/$AJ_SNAPSHOT ]]; then 93 | echo "Starting aj-snapshot daemon" 94 | aj-snapshot --remove --daemon ~/.config/aj-snapshot/$AJ_SNAPSHOT & 95 | AJ_SNAPSHOT_PID=$! 96 | JACKARG="--nojackconnect" 97 | fi 98 | 99 | # Start midi script as a background process 100 | # This script needs to wait for Jamulus to start, then connect its midi ports and start processing 101 | if [[ -f "$JAMULUS_MIDI_SCRIPT" ]]; then 102 | echo "starting Jamulus MIDI script $JAMULUS_MIDI_SCRIPT" 103 | $JAMULUS_MIDI_SCRIPT & 104 | MIDI_SCRIPT_PID=$! 105 | fi 106 | 107 | # start Jamulus with --nojackconnect option if aj-snapshot is controlling the connections. 108 | # Jamulus will create a Jack MIDI input port only if parameter $JAMULUS_CTRLMIDICH is non-empty 109 | if [ -n "$JAMULUS_SERVER" ]; then 110 | if [[ -n "$JAMULUS_PRIORITY" ]]; then 111 | timeout ${JAMULUS_TIMEOUT:-120m} chrt --${JAMULUS_SCHED:-fifo} ${JAMULUS_PRIORITY:-70} jamulus $JACKARG -c $JAMULUS_SERVER --ctrlmidich "${JAMULUS_CTRLMIDICH}" 112 | else 113 | timeout ${JAMULUS_TIMEOUT:-120m} nice -n ${JAMULUS_NICEADJ:-0} jamulus $JACKARG -c $JAMULUS_SERVER --ctrlmidich "${JAMULUS_CTRLMIDICH}" 114 | fi 115 | RESULT=$? 116 | # shutdown if ended due to timeout 117 | [[ "$RESULT" != "0" ]] && sudo shutdown now 118 | else 119 | if [[ -n "$JAMULUS_PRIORITY" ]]; then 120 | nice -n ${JAMULUS_NICEADJ:-0} chrt --${JAMULUS_SCHED:-rr} ${JAMULUS_PRIORITY} jamulus $JACKARG --ctrlmidich "${JAMULUS_CTRLMIDICH}" 121 | else 122 | nice -n ${JAMULUS_NICEADJ:-0} jamulus $JACKARG --ctrlmidich "${JAMULUS_CTRLMIDICH}" 123 | fi 124 | fi 125 | 126 | [[ -n "$AJ_SNAPSHOT_PID" ]] && kill $AJ_SNAPSHOT_PID # kill aj-snapshot background process 127 | [[ -n "$MIDI_SCRIPT_PID" ]] && kill $MIDI_SCRIPT_PID # kill midiscript background process 128 | sudo systemctl unset-environment JACK_APP 129 | # restore systemd version of JACK_MIDI_ARG to previous state if set 130 | if [[ -n "$JACK_MIDI_ARG_SAVE" ]]; then 131 | eval $JACK_MIDI_ARG_SAVE 132 | sudo systemctl set-environment JACK_MIDI_ARG="$JACK_MIDI_ARG" 133 | else 134 | [[ -n "$JAMULUS_CTRLMIDICH" ]] && sudo systemctl unset-environment JACK_MIDI_ARG 135 | fi 136 | sudo systemctl restart jack 137 | exit 0 138 | -------------------------------------------------------------------------------- /stage0/01-locale/00-debconf: -------------------------------------------------------------------------------- 1 | # Locales to be generated: 2 | # Choices: All locales, aa_DJ ISO-8859-1, aa_DJ.UTF-8 UTF-8, aa_ER UTF-8, aa_ER@saaho UTF-8, aa_ET UTF-8, af_ZA ISO-8859-1, af_ZA.UTF-8 UTF-8, ak_GH UTF-8, am_ET UTF-8, an_ES ISO-8859-15, an_ES.UTF-8 UTF-8, anp_IN UTF-8, ar_AE ISO-8859-6, ar_AE.UTF-8 UTF-8, ar_BH ISO-8859-6, ar_BH.UTF-8 UTF-8, ar_DZ ISO-8859-6, ar_DZ.UTF-8 UTF-8, ar_EG ISO-8859-6, ar_EG.UTF-8 UTF-8, ar_IN UTF-8, ar_IQ ISO-8859-6, ar_IQ.UTF-8 UTF-8, ar_JO ISO-8859-6, ar_JO.UTF-8 UTF-8, ar_KW ISO-8859-6, ar_KW.UTF-8 UTF-8, ar_LB ISO-8859-6, ar_LB.UTF-8 UTF-8, ar_LY ISO-8859-6, ar_LY.UTF-8 UTF-8, ar_MA ISO-8859-6, ar_MA.UTF-8 UTF-8, ar_OM ISO-8859-6, ar_OM.UTF-8 UTF-8, ar_QA ISO-8859-6, ar_QA.UTF-8 UTF-8, ar_SA ISO-8859-6, ar_SA.UTF-8 UTF-8, ar_SD ISO-8859-6, ar_SD.UTF-8 UTF-8, ar_SS UTF-8, ar_SY ISO-8859-6, ar_SY.UTF-8 UTF-8, ar_TN ISO-8859-6, ar_TN.UTF-8 UTF-8, ar_YE ISO-8859-6, ar_YE.UTF-8 UTF-8, as_IN UTF-8, ast_ES ISO-8859-15, ast_ES.UTF-8 UTF-8, ayc_PE UTF-8, az_AZ UTF-8, be_BY CP1251, be_BY.UTF-8 UTF-8, be_BY@latin UTF-8, bem_ZM UTF-8, ber_DZ UTF-8, ber_MA UTF-8, bg_BG CP1251, bg_BG.UTF-8 UTF-8, bho_IN UTF-8, bn_BD UTF-8, bn_IN UTF-8, bo_CN UTF-8, bo_IN UTF-8, br_FR ISO-8859-1, br_FR.UTF-8 UTF-8, br_FR@euro ISO-8859-15, brx_IN UTF-8, bs_BA ISO-8859-2, bs_BA.UTF-8 UTF-8, byn_ER UTF-8, ca_AD ISO-8859-15, ca_AD.UTF-8 UTF-8, ca_ES ISO-8859-1, ca_ES.UTF-8 UTF-8, ca_ES.UTF-8@valencia UTF-8, ca_ES@euro ISO-8859-15, ca_ES@valencia ISO-8859-15, ca_FR ISO-8859-15, ca_FR.UTF-8 UTF-8, ca_IT ISO-8859-15, ca_IT.UTF-8 UTF-8, cmn_TW UTF-8, crh_UA UTF-8, cs_CZ ISO-8859-2, cs_CZ.UTF-8 UTF-8, csb_PL UTF-8, cv_RU UTF-8, cy_GB ISO-8859-14, cy_GB.UTF-8 UTF-8, da_DK ISO-8859-1, da_DK.UTF-8 UTF-8, de_AT ISO-8859-1, de_AT.UTF-8 UTF-8, de_AT@euro ISO-8859-15, de_BE ISO-8859-1, de_BE.UTF-8 UTF-8, de_BE@euro ISO-8859-15, de_CH ISO-8859-1, de_CH.UTF-8 UTF-8, de_DE ISO-8859-1, de_DE.UTF-8 UTF-8, de_DE@euro ISO-8859-15, de_LI.UTF-8 UTF-8, de_LU ISO-8859-1, de_LU.UTF-8 UTF-8, de_LU@euro ISO-8859-15, doi_IN UTF-8, dv_MV UTF-8, dz_BT UTF-8, el_CY ISO-8859-7, el_CY.UTF-8 UTF-8, el_GR ISO-8859-7, el_GR.UTF-8 UTF-8, en_AG UTF-8, en_AU ISO-8859-1, en_AU.UTF-8 UTF-8, en_BW ISO-8859-1, en_BW.UTF-8 UTF-8, en_CA ISO-8859-1, en_CA.UTF-8 UTF-8, en_DK ISO-8859-1, en_DK.ISO-8859-15 ISO-8859-15, en_DK.UTF-8 UTF-8, en_GB ISO-8859-1, en_GB.ISO-8859-15 ISO-8859-15, en_GB.UTF-8 UTF-8, en_HK ISO-8859-1, en_HK.UTF-8 UTF-8, en_IE ISO-8859-1, en_IE.UTF-8 UTF-8, en_IE@euro ISO-8859-15, en_IN UTF-8, en_NG UTF-8, en_NZ ISO-8859-1, en_NZ.UTF-8 UTF-8, en_PH ISO-8859-1, en_PH.UTF-8 UTF-8, en_SG ISO-8859-1, en_SG.UTF-8 UTF-8, en_US ISO-8859-1, en_US.ISO-8859-15 ISO-8859-15, en_US.UTF-8 UTF-8, en_ZA ISO-8859-1, en_ZA.UTF-8 UTF-8, en_ZM UTF-8, en_ZW ISO-8859-1, en_ZW.UTF-8 UTF-8, eo ISO-8859-3, eo.UTF-8 UTF-8, es_AR ISO-8859-1, es_AR.UTF-8 UTF-8, es_BO ISO-8859-1, es_BO.UTF-8 UTF-8, es_CL ISO-8859-1, es_CL.UTF-8 UTF-8, es_CO ISO-8859-1, es_CO.UTF-8 UTF-8, es_CR ISO-8859-1, es_CR.UTF-8 UTF-8, es_CU UTF-8, es_DO ISO-8859-1, es_DO.UTF-8 UTF-8, es_EC ISO-8859-1, es_EC.UTF-8 UTF-8, es_ES ISO-8859-1, es_ES.UTF-8 UTF-8, es_ES@euro ISO-8859-15, es_GT ISO-8859-1, es_GT.UTF-8 UTF-8, es_HN ISO-8859-1, es_HN.UTF-8 UTF-8, es_MX ISO-8859-1, es_MX.UTF-8 UTF-8, es_NI ISO-8859-1, es_NI.UTF-8 UTF-8, es_PA ISO-8859-1, es_PA.UTF-8 UTF-8, es_PE ISO-8859-1, es_PE.UTF-8 UTF-8, es_PR ISO-8859-1, es_PR.UTF-8 UTF-8, es_PY ISO-8859-1, es_PY.UTF-8 UTF-8, es_SV ISO-8859-1, es_SV.UTF-8 UTF-8, es_US ISO-8859-1, es_US.UTF-8 UTF-8, es_UY ISO-8859-1, es_UY.UTF-8 UTF-8, es_VE ISO-8859-1, es_VE.UTF-8 UTF-8, et_EE ISO-8859-1, et_EE.ISO-8859-15 ISO-8859-15, et_EE.UTF-8 UTF-8, eu_ES ISO-8859-1, eu_ES.UTF-8 UTF-8, eu_ES@euro ISO-8859-15, eu_FR ISO-8859-1, eu_FR.UTF-8 UTF-8, eu_FR@euro ISO-8859-15, fa_IR UTF-8, ff_SN UTF-8, fi_FI ISO-8859-1, fi_FI.UTF-8 UTF-8, fi_FI@euro ISO-8859-15, fil_PH UTF-8, fo_FO ISO-8859-1, fo_FO.UTF-8 UTF-8, fr_BE ISO-8859-1, fr_BE.UTF-8 UTF-8, fr_BE@euro ISO-8859-15, fr_CA ISO-8859-1, fr_CA.UTF-8 UTF-8, fr_CH ISO-8859-1, fr_CH.UTF-8 UTF-8, fr_FR ISO-8859-1, fr_FR.UTF-8 UTF-8, fr_FR@euro ISO-8859-15, fr_LU ISO-8859-1, fr_LU.UTF-8 UTF-8, fr_LU@euro ISO-8859-15, fur_IT UTF-8, fy_DE UTF-8, fy_NL UTF-8, ga_IE ISO-8859-1, ga_IE.UTF-8 UTF-8, ga_IE@euro ISO-8859-15, gd_GB ISO-8859-15, gd_GB.UTF-8 UTF-8, gez_ER UTF-8, gez_ER@abegede UTF-8, gez_ET UTF-8, gez_ET@abegede UTF-8, gl_ES ISO-8859-1, gl_ES.UTF-8 UTF-8, gl_ES@euro ISO-8859-15, gu_IN UTF-8, gv_GB ISO-8859-1, gv_GB.UTF-8 UTF-8, ha_NG UTF-8, hak_TW UTF-8, he_IL ISO-8859-8, he_IL.UTF-8 UTF-8, hi_IN UTF-8, hne_IN UTF-8, hr_HR ISO-8859-2, hr_HR.UTF-8 UTF-8, hsb_DE ISO-8859-2, hsb_DE.UTF-8 UTF-8, ht_HT UTF-8, hu_HU ISO-8859-2, hu_HU.UTF-8 UTF-8, hy_AM UTF-8, hy_AM.ARMSCII-8 ARMSCII-8, ia_FR UTF-8, id_ID ISO-8859-1, id_ID.UTF-8 UTF-8, ig_NG UTF-8, ik_CA UTF-8, is_IS ISO-8859-1, is_IS.UTF-8 UTF-8, it_CH ISO-8859-1, it_CH.UTF-8 UTF-8, it_IT ISO-8859-1, it_IT.UTF-8 UTF-8, it_IT@euro ISO-8859-15, iu_CA UTF-8, iw_IL ISO-8859-8, iw_IL.UTF-8 UTF-8, ja_JP.EUC-JP EUC-JP, ja_JP.UTF-8 UTF-8, ka_GE GEORGIAN-PS, ka_GE.UTF-8 UTF-8, kk_KZ PT154, kk_KZ RK1048, kk_KZ.UTF-8 UTF-8, kl_GL ISO-8859-1, kl_GL.UTF-8 UTF-8, km_KH UTF-8, kn_IN UTF-8, ko_KR.EUC-KR EUC-KR, ko_KR.UTF-8 UTF-8, kok_IN UTF-8, ks_IN UTF-8, ks_IN@devanagari UTF-8, ku_TR ISO-8859-9, ku_TR.UTF-8 UTF-8, kw_GB ISO-8859-1, kw_GB.UTF-8 UTF-8, ky_KG UTF-8, lb_LU UTF-8, lg_UG ISO-8859-10, lg_UG.UTF-8 UTF-8, li_BE UTF-8, li_NL UTF-8, lij_IT UTF-8, lo_LA UTF-8, lt_LT ISO-8859-13, lt_LT.UTF-8 UTF-8, lv_LV ISO-8859-13, lv_LV.UTF-8 UTF-8, lzh_TW UTF-8, mag_IN UTF-8, mai_IN UTF-8, mg_MG ISO-8859-15, mg_MG.UTF-8 UTF-8, mhr_RU UTF-8, mi_NZ ISO-8859-13, mi_NZ.UTF-8 UTF-8, mk_MK ISO-8859-5, mk_MK.UTF-8 UTF-8, ml_IN UTF-8, mn_MN UTF-8, mni_IN UTF-8, mr_IN UTF-8, ms_MY ISO-8859-1, ms_MY.UTF-8 UTF-8, mt_MT ISO-8859-3, mt_MT.UTF-8 UTF-8, my_MM UTF-8, nan_TW UTF-8, nan_TW@latin UTF-8, nb_NO ISO-8859-1, nb_NO.UTF-8 UTF-8, nds_DE UTF-8, nds_NL UTF-8, ne_NP UTF-8, nhn_MX UTF-8, niu_NU UTF-8, niu_NZ UTF-8, nl_AW UTF-8, nl_BE ISO-8859-1, nl_BE.UTF-8 UTF-8, nl_BE@euro ISO-8859-15, nl_NL ISO-8859-1, nl_NL.UTF-8 UTF-8, nl_NL@euro ISO-8859-15, nn_NO ISO-8859-1, nn_NO.UTF-8 UTF-8, nr_ZA UTF-8, nso_ZA UTF-8, oc_FR ISO-8859-1, oc_FR.UTF-8 UTF-8, om_ET UTF-8, om_KE ISO-8859-1, om_KE.UTF-8 UTF-8, or_IN UTF-8, os_RU UTF-8, pa_IN UTF-8, pa_PK UTF-8, pap_AN UTF-8, pap_AW UTF-8, pap_CW UTF-8, pl_PL ISO-8859-2, pl_PL.UTF-8 UTF-8, ps_AF UTF-8, pt_BR ISO-8859-1, pt_BR.UTF-8 UTF-8, pt_PT ISO-8859-1, pt_PT.UTF-8 UTF-8, pt_PT@euro ISO-8859-15, quz_PE UTF-8, ro_RO ISO-8859-2, ro_RO.UTF-8 UTF-8, ru_RU ISO-8859-5, ru_RU.CP1251 CP1251, ru_RU.KOI8-R KOI8-R, ru_RU.UTF-8 UTF-8, ru_UA KOI8-U, ru_UA.UTF-8 UTF-8, rw_RW UTF-8, sa_IN UTF-8, sat_IN UTF-8, sc_IT UTF-8, sd_IN UTF-8, sd_IN@devanagari UTF-8, se_NO UTF-8, shs_CA UTF-8, si_LK UTF-8, sid_ET UTF-8, sk_SK ISO-8859-2, sk_SK.UTF-8 UTF-8, sl_SI ISO-8859-2, sl_SI.UTF-8 UTF-8, so_DJ ISO-8859-1, so_DJ.UTF-8 UTF-8, so_ET UTF-8, so_KE ISO-8859-1, so_KE.UTF-8 UTF-8, so_SO ISO-8859-1, so_SO.UTF-8 UTF-8, sq_AL ISO-8859-1, sq_AL.UTF-8 UTF-8, sq_MK UTF-8, sr_ME UTF-8, sr_RS UTF-8, sr_RS@latin UTF-8, ss_ZA UTF-8, st_ZA ISO-8859-1, st_ZA.UTF-8 UTF-8, sv_FI ISO-8859-1, sv_FI.UTF-8 UTF-8, sv_FI@euro ISO-8859-15, sv_SE ISO-8859-1, sv_SE.ISO-8859-15 ISO-8859-15, sv_SE.UTF-8 UTF-8, sw_KE UTF-8, sw_TZ UTF-8, szl_PL UTF-8, ta_IN UTF-8, ta_LK UTF-8, te_IN UTF-8, tg_TJ KOI8-T, tg_TJ.UTF-8 UTF-8, th_TH TIS-620, th_TH.UTF-8 UTF-8, the_NP UTF-8, ti_ER UTF-8, ti_ET UTF-8, tig_ER UTF-8, tk_TM UTF-8, tl_PH ISO-8859-1, tl_PH.UTF-8 UTF-8, tn_ZA UTF-8, tr_CY ISO-8859-9, tr_CY.UTF-8 UTF-8, tr_TR ISO-8859-9, tr_TR.UTF-8 UTF-8, ts_ZA UTF-8, tt_RU UTF-8, tt_RU@iqtelif UTF-8, ug_CN UTF-8, uk_UA KOI8-U, uk_UA.UTF-8 UTF-8, unm_US UTF-8, ur_IN UTF-8, ur_PK UTF-8, uz_UZ ISO-8859-1, uz_UZ.UTF-8 UTF-8, uz_UZ@cyrillic UTF-8, ve_ZA UTF-8, vi_VN UTF-8, wa_BE ISO-8859-1, wa_BE.UTF-8 UTF-8, wa_BE@euro ISO-8859-15, wae_CH UTF-8, wal_ET UTF-8, wo_SN UTF-8, xh_ZA ISO-8859-1, xh_ZA.UTF-8 UTF-8, yi_US CP1255, yi_US.UTF-8 UTF-8, yo_NG UTF-8, yue_HK UTF-8, zh_CN GB2312, zh_CN.GB18030 GB18030, zh_CN.GBK GBK, zh_CN.UTF-8 UTF-8, zh_HK BIG5-HKSCS, zh_HK.UTF-8 UTF-8, zh_SG GB2312, zh_SG.GBK GBK, zh_SG.UTF-8 UTF-8, zh_TW BIG5, zh_TW.EUC-TW EUC-TW, zh_TW.UTF-8 UTF-8, zu_ZA ISO-8859-1, zu_ZA.UTF-8 UTF-8 3 | locales locales/locales_to_be_generated multiselect ${LOCALE_DEFAULT} UTF-8 4 | # Default locale for the system environment: 5 | # Choices: None, C.UTF-8, en_GB.UTF-8 6 | locales locales/default_environment_locale select ${LOCALE_DEFAULT} 7 | -------------------------------------------------------------------------------- /stage2/01-sys-tweaks/00-debconf: -------------------------------------------------------------------------------- 1 | # Encoding to use on the console: 2 | # Choices: ARMSCII-8, CP1251, CP1255, CP1256, GEORGIAN-ACADEMY, GEORGIAN-PS, IBM1133, ISIRI-3342, ISO-8859-1, ISO-8859-10, ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, KOI8-R, KOI8-U, TIS-620, UTF-8, VISCII 3 | console-setup console-setup/charmap47 select UTF-8 4 | # Character set to support: 5 | # Choices: . Arabic, # Armenian, # Cyrillic - KOI8-R and KOI8-U, # Cyrillic - non-Slavic languages, # Cyrillic - Slavic languages (also Bosnian and Serbian Latin), . Ethiopic, # Georgian, # Greek, # Hebrew, # Lao, # Latin1 and Latin5 - western Europe and Turkic languages, # Latin2 - central Europe and Romanian, # Latin3 and Latin8 - Chichewa; Esperanto; Irish; Maltese and Welsh, # Latin7 - Lithuanian; Latvian; Maori and Marshallese, . Latin - Vietnamese, # Thai, . Combined - Latin; Slavic Cyrillic; Hebrew; basic Arabic, . Combined - Latin; Slavic Cyrillic; Greek, . Combined - Latin; Slavic and non-Slavic Cyrillic, Guess optimal character set 6 | console-setup console-setup/codeset47 select Guess optimal character set 7 | # Font for the console: 8 | # Choices: Fixed, Goha, GohaClassic, Terminus, TerminusBold, TerminusBoldVGA, VGA, Do not change the boot/kernel font, Let the system select a suitable font 9 | console-setup console-setup/fontface47 select Do not change the boot/kernel font 10 | # Key to function as AltGr: 11 | # Choices: The default for the keyboard layout, No AltGr key, Right Alt (AltGr), Right Control, Right Logo key, Menu key, Left Alt, Left Logo key, Keypad Enter key, Both Logo keys, Both Alt keys 12 | keyboard-configuration keyboard-configuration/altgr select The default for the keyboard layout 13 | # Keyboard model: 14 | # Choices: A4Tech KB-21, A4Tech KBS-8, A4Tech Wireless Desktop RFKB-23, Acer AirKey V, Acer C300, Acer Ferrari 4000, Acer Laptop, Advance Scorpius KI, Amiga, Apple, Apple Aluminium Keyboard (ANSI), Apple Aluminium Keyboard (ISO), Apple Aluminium Keyboard (JIS), Apple Laptop, Asus Laptop, Atari TT, Azona RF2300 wireless Internet Keyboard, BTC 5090, BTC 5113RF Multimedia, BTC 5126T, BTC 6301URF, BTC 9000, BTC 9000A, BTC 9001AH, BTC 9019U, BTC 9116U Mini Wireless Internet and Gaming, BenQ X-Touch, BenQ X-Touch 730, BenQ X-Touch 800, Brother Internet Keyboard, Cherry B.UNLIMITED, Cherry Blue Line CyBo@rd, Cherry Blue Line CyBo@rd (alternate option), Cherry CyBo@rd USB-Hub, Cherry CyMotion Expert, Cherry CyMotion Master Linux, Cherry CyMotion Master XPress, Chicony Internet Keyboard, Chicony KB-9885, Chicony KU-0108, Chicony KU-0420, Classmate PC, Compaq Easy Access Keyboard, Compaq Internet Keyboard (13 keys), Compaq Internet Keyboard (18 keys), Compaq Internet Keyboard (7 keys), Compaq iPaq Keyboard, Creative Desktop Wireless 7000, DTK2000, Dell, Dell 101-key PC, Dell Laptop/notebook Inspiron 6xxx/8xxx, Dell Laptop/notebook Precision M series, Dell Latitude series laptop, Dell Precision M65, Dell SK-8125, Dell SK-8135, Dell USB Multimedia Keyboard, Dexxa Wireless Desktop Keyboard, Diamond 9801 / 9802 series, Ennyah DKB-1008, Everex STEPnote, FL90, Fujitsu-Siemens Computers AMILO laptop, Generic 101-key PC, Generic 102-key (Intl) PC, Generic 104-key PC, Generic 105-key (Intl) PC, Genius Comfy KB-12e, Genius Comfy KB-16M / Genius MM Keyboard KWD-910, Genius Comfy KB-21e-Scroll, Genius KB-19e NB, Genius KKB-2050HS, Gyration, HTC Dream, Happy Hacking Keyboard, Happy Hacking Keyboard for Mac, Hewlett-Packard Internet Keyboard, Hewlett-Packard Mini 110 Notebook, Hewlett-Packard Omnibook 500 FA, Hewlett-Packard Omnibook 5xx, Hewlett-Packard Omnibook 6000/6100, Hewlett-Packard Omnibook XE3 GC, Hewlett-Packard Omnibook XE3 GF, Hewlett-Packard Omnibook XT1000, Hewlett-Packard Pavilion ZT11xx, Hewlett-Packard Pavilion dv5, Hewlett-Packard SK-250x Multimedia Keyboard, Hewlett-Packard nx9020, Honeywell Euroboard, Htc Dream phone, IBM Rapid Access, IBM Rapid Access II, IBM Space Saver, IBM ThinkPad 560Z/600/600E/A22E, IBM ThinkPad R60/T60/R61/T61, IBM ThinkPad Z60m/Z60t/Z61m/Z61t, Keytronic FlexPro, Kinesis, Laptop/notebook Compaq (eg. Armada) Laptop Keyboard, Laptop/notebook Compaq (eg. Presario) Internet Keyboard, Laptop/notebook eMachines m68xx, Logitech Access Keyboard, Logitech Cordless Desktop, Logitech Cordless Desktop (alternate option), Logitech Cordless Desktop EX110, Logitech Cordless Desktop LX-300, Logitech Cordless Desktop Navigator, Logitech Cordless Desktop Optical, Logitech Cordless Desktop Pro (alternate option 2), Logitech Cordless Desktop iTouch, Logitech Cordless Freedom/Desktop Navigator, Logitech G15 extra keys via G15daemon, Logitech Generic Keyboard, Logitech Internet 350 Keyboard, Logitech Internet Keyboard, Logitech Internet Navigator Keyboard, Logitech Media Elite Keyboard, Logitech Ultra-X Cordless Media Desktop Keyboard, Logitech Ultra-X Keyboard, Logitech diNovo Edge Keyboard, Logitech diNovo Keyboard, Logitech iTouch, Logitech iTouch Cordless Keyboard (model Y-RB6), Logitech iTouch Internet Navigator Keyboard SE, Logitech iTouch Internet Navigator Keyboard SE (USB), MacBook/MacBook Pro, MacBook/MacBook Pro (Intl), Macintosh, Macintosh Old, Memorex MX1998, Memorex MX2500 EZ-Access Keyboard, Memorex MX2750, Microsoft Comfort Curve Keyboard 2000, Microsoft Internet Keyboard, Microsoft Internet Keyboard Pro\, Swedish, Microsoft Natural, Microsoft Natural Keyboard Elite, Microsoft Natural Keyboard Pro / Microsoft Internet Keyboard Pro, Microsoft Natural Keyboard Pro OEM, Microsoft Natural Keyboard Pro USB / Microsoft Internet Keyboard Pro, Microsoft Natural Wireless Ergonomic Keyboard 4000, Microsoft Natural Wireless Ergonomic Keyboard 7000, Microsoft Office Keyboard, Microsoft Wireless Multimedia Keyboard 1.0A, Northgate OmniKey 101, OLPC, Ortek MCK-800 MM/Internet keyboard, PC-98xx Series, Propeller Voyager (KTEZ-1000), QTronix Scorpius 98N+, SILVERCREST Multimedia Wireless Keyboard, SK-1300, SK-2500, SK-6200, SK-7100, SVEN Ergonomic 2500, SVEN Slim 303, Samsung SDM 4500P, Samsung SDM 4510P, Sanwa Supply SKB-KG3, Sun Type 4, Sun Type 5, Sun Type 6 (Japanese layout), Sun Type 6 USB (Japanese layout), Sun Type 6 USB (Unix layout), Sun Type 6/7 USB, Sun Type 6/7 USB (European layout), Sun Type 7 USB, Sun Type 7 USB (European layout), Sun Type 7 USB (Japanese layout) / Japanese 106-key, Sun Type 7 USB (Unix layout), Super Power Multimedia Keyboard, Symplon PaceBook (tablet PC), Targa Visionary 811, Toshiba Satellite S3000, Trust Direct Access Keyboard, Trust Slimline, Trust Wireless Keyboard Classic, TypeMatrix EZ-Reach 2020, TypeMatrix EZ-Reach 2030 PS2, TypeMatrix EZ-Reach 2030 USB, TypeMatrix EZ-Reach 2030 USB (102/105:EU mode), TypeMatrix EZ-Reach 2030 USB (106:JP mode), Unitek KB-1925, ViewSonic KU-306 Internet Keyboard, Winbook Model XP5, Yahoo! Internet Keyboard 15 | keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl) PC 16 | # Keymap to use: 17 | # Choices: American English, Albanian, Arabic, Asturian, Bangladesh, Belarusian, Bengali, Belgian, Bosnian, Brazilian, British English, Bulgarian, Bulgarian (phonetic layout), Burmese, Canadian French, Canadian Multilingual, Catalan, Chinese, Croatian, Czech, Danish, Dutch, Dvorak, Dzongkha, Esperanto, Estonian, Ethiopian, Finnish, French, Georgian, German, Greek, Gujarati, Gurmukhi, Hebrew, Hindi, Hungarian, Icelandic, Irish, Italian, Japanese, Kannada, Kazakh, Khmer, Kirghiz, Korean, Kurdish (F layout), Kurdish (Q layout), Lao, Latin American, Latvian, Lithuanian, Macedonian, Malayalam, Nepali, Northern Sami, Norwegian, Persian, Philippines, Polish, Portuguese, Punjabi, Romanian, Russian, Serbian (Cyrillic), Sindhi, Sinhala, Slovak, Slovenian, Spanish, Swedish, Swiss French, Swiss German, Tajik, Tamil, Telugu, Thai, Tibetan, Turkish (F layout), Turkish (Q layout), Ukrainian, Uyghur, Vietnamese 18 | keyboard-configuration keyboard-configuration/xkb-keymap select ${KEYBOARD_KEYMAP} 19 | # Compose key: 20 | # Choices: No compose key, Right Alt (AltGr), Right Control, Right Logo key, Menu key, Left Logo key, Caps Lock 21 | keyboard-configuration keyboard-configuration/compose select No compose key 22 | # Use Control+Alt+Backspace to terminate the X server? 23 | keyboard-configuration keyboard-configuration/ctrl_alt_bksp boolean true 24 | # Keyboard layout: 25 | # Choices: English (UK), English (UK) - English (UK\, Colemak), English (UK) - English (UK\, Dvorak with UK punctuation), English (UK) - English (UK\, Dvorak), English (UK) - English (UK\, Macintosh international), English (UK) - English (UK\, Macintosh), English (UK) - English (UK\, extended WinKeys), English (UK) - English (UK\, international with dead keys), Other 26 | keyboard-configuration keyboard-configuration/variant select ${KEYBOARD_LAYOUT} 27 | -------------------------------------------------------------------------------- /stage3/04-install-sw/files/README.md: -------------------------------------------------------------------------------- 1 | # Jambox: Jamming with Raspberry Pi 2 | **Release 1.5.0** 3 | 4 | ## Changes from v1.5.0-b.2: 5 | - **Improved support for Behringer X-Touch Mini MIDI control of Jamulus** 6 | - 16 channels (8 each on layers A & B) 7 | - Push on encoder to switch between channel fader and pan (LED ring shows state) 8 | - update noVNC to v1.3.0, jacktrip to 1.4.2 9 | - bug fixes in MIDI device handling 10 | - **Newer Focusrite interfaces may be usable with some configuration effort** 11 | - use 5.15 kernel (installed but not activated), create modprobe conf file, patch with patchage 12 | 13 | ## Changes from v1.4.0-b.2: 14 | - **Added support for MIDI control of Jamulus** 15 | - Behringer X-Touch Mini is plug-and-play, supports faders, mute & solo buttons with LED feedback. Pan on Layer B. Slider control of Alsa Master & Capture levels. 16 | - Other MIDI controllers will require some configuration effort. 17 | - **jack and alsa packages are now built from current upstream sources** 18 | - **Bug fixes and performance improvements** 19 | - JamTaba webcam now works 20 | - Updated Jamulus to version 3.8.1 21 | - Updated JammerNetz to version 2.2.0 22 | - Updated HpsJam to version 1.0.20 23 | - Updated JackTrip to version 1.4.0, removed QJackTrip 24 | 25 | ## Changes from v1.3.0: 26 | - **New Jamming Apps: JammerNetz, HpsJam** 27 | - **Bug fixes, stability and performance improvements** 28 | - Reduced default NPERIODS for lower delay 29 | - Updated Jamulus to version 3.8.0 30 | - Updated SonoBus to version 1.4.6 31 | - **Added QasMixer to desktop as an alternative for interface settings** 32 | - If QasMixer has card device controls open, in some cases this can prevent jack from starting when launching a jamming app. If this happens, close QasMixer (File -> Quit, or right-click -> "Close QasMixer"on toolbar QasMixer "speaker" icon. 33 | 34 | ## Changes from v1.2.0: 35 | - **New Jamming Apps: JamTaba, QJackTrip** 36 | - **"Audio Device Settings" on desktop (pimixer) allows control of internal interface settings.** 37 | - changes should be persistent unless overriden by the app config items MASTER_LEVEL and CAPTURE_LEVEL settings (comment them out if you don't want that) 38 | - **Device settings in /etc/jackdrc.conf can be customized by app or by pi model.** 39 | - this file is now a bit more complex, but in most cases it should "just work". 40 | - in most cases, the only setting you might need to change is "NPERIODS" (decrease to lower delay, increase to get rid of distortion clicks, pops) 41 | - Pi3 default setting has been changed to use PERIOD=128 (a bit more delay) to maximize audio quality. 42 | - **System language can be changed** 43 | - Pi menu -> Preferences -> Localization 44 | - **Jamulus Server startup simplifed and placed on Desktop** 45 | - **Bug fixes and performance improvements** 46 | 47 | If you don't want to read the "Quickstart" section, scroll to the bottom to read "Other Topics". 48 | 49 | ## Quickstart: 50 | 51 | ### Get Wired: 52 | - **Raspberry Pi** Jambox has been tested primarily with Pi4B, but has also been verified to work on Pi3B. 53 | - **Ethernet cable** between Raspberry Pi and your router (can't use wireless for jamming, too much jitter). 54 | - **Headphones** to headphone out of audio interface, or to Headphone Amplifier (Rockville HPA-4 recommended). 55 | - **Raspberry Pi power supply** to USB-C port on Raspberry Pi 4, or micro USB port on Raspberry Pi 3B 56 | - **USB Audio Interface** to a USB port on Raspberry Pi, or audio HAT (i.e. HiFiBerry DAC+ ADC Pro) 57 | - Behringer UM2 is a good choice if you are buying an interface only for jamming. 58 | - verified to work with Behringer UCA222 59 | - verified to work with Focusrite 2i2. 60 | - other 2-channel recording interfaces are likely to work 61 | - other interfaces may require editing parameters in /etc/jackrdc.conf 62 | - **Microphone and/or instrument** to USB Audio Interface 63 | - Microphone preamp requires XLR cable for best sound (don't connect microphone to 1/4" jack) 64 | - Guitar/Bass to channel 2 (so channel 1 can be used for talkback) 65 | - Keyboard can be wired as mono into channel 2, using channel 1 for talkback microphone. 66 | - Stereo keyboard sounds best when using both channels (1/4" jacks) 67 | - But in that case, talkback mic will requre a mixer in front of the USB Audio Interface 68 | ### Fire It Up: 69 | - **Turn On Power** to Raspberry Pi using the switch in the power cable. 70 | - **Wait a Minute or Two** for the Raspberry Pi to boot up. 71 | - **Use a Web Browser** to connect to the Jambox user interface. 72 | - laptop, tablet, or desktop. phone screen is likely too small to be practical. 73 | - go to [urlrelay.com/go](urlrelay.com/go) 74 | - This will redirect to your Jambox (if it's the only one recently on your local network). 75 | - If more than 1 Jambox on same local network, use the full url from the label on the box 76 | - click "Connect" on noVNC screen to bring up Raspberry Pi desktop 77 | 78 | ## Connect using Jamulus (server-based) or SonoBus (peer-to-peer) 79 | 80 | ###Jamulus 81 | + **Connect to a Jamulus Server:** 82 | - Jamulus may be set to automatically launch on boot. It may also be set to auto-connect to a server. 83 | - Otherwise, double-click on the "Jamulus Start" icon on the desktop. Then click "Connect" and choose a server. 84 | - If you have auto-connected to a server, then after 2 hours of Jamulus, system will automatically shut down 85 | - If it shuts down and you need more time, power off & back on) 86 | - If you close Jamulus before the 2 hour timeout, it won't automatically shut down. 87 | + **Personalize It:** 88 | - View -> My Profile, then set your Name, Instrument, City, and Skill. 89 | - View -> Chat to see the chat window to message other musicians. 90 | + **Jamulus Features:** 91 | - Input level meters: This is the audio you are sending; keep it out of the red. 92 | - Level and Pan controls for each musician (your own Personal Mix!) 93 | + **Jamulus Settings:** 94 | - Jitter Buffer: Start with *Auto*, wait a min or two to settle, then increase each jitter buffer by 1 or 2 for better audio quality.. 95 | - Enable Small Network Buffers: Recommended. Lowers delay, but uses more bandwidth. 96 | - Audio Channels: *Mono-in/Stereo-out* - recommended for most users. It will mix both channels from USB Audio Interface into one (for mic or mono instrument) 97 | - Audio Channels: *Stereo* is for stereo sources like stereo keyboard or multiple microphones. 98 | - Audio Quality: *High*: Recommended. Uses more bandwidth than *Normal* but sounds better. 99 | - Skin: *Fancy* looks nice, but *Normal* and especially *Compact* fit more musicians on the screen. 100 | - Overall Delay: Useful number to watch. 30 ms = Fun; 50 ms = Not so much 101 | + **Jamulus Software Manual:** [https://jamulus.io/wiki/Software-Manual](https://jamulus.io/wiki/Software-Manual) 102 | 103 | ### SonoBus 104 | + **Connect with your group:** 105 | - Click "Connect" to get started 106 | - Enter your group's chosen "Group Name" that your group will use to find each other. 107 | - Enter "Your Displayed Name" for others in your group to see 108 | - Click "Connect to Group" 109 | + **SonoBus Features:** 110 | - "Monitor Level is what you hear (has no effect on what others hear). 111 | - "Output Level" is the what you are sending to others. 112 | + **SonoBus User Guide:** [https://www.sonobus.net/sonobus_userguide.html](https://www.sonobus.net/sonobus_userguide.html) 113 | + **Port Forwarding May Be Required** peer-to-peer apps may require port forwarding to be set up on certain routers, especially if multiple peers are used. 114 | 115 | ### JamTaba 116 | + **JamTaba Features** 117 | - Client for NINJAM servers - see [https://www.cockos.com/ninjam/](https://www.cockos.com/ninjam/) 118 | - Jamming is based on synchronized intervals of measures - you hear and play with what everyone else played during the last interval. 119 | - Not suited for all musical styles. 120 | - Jamming over very long distances is possible (i.e. musicians from 4 different continents). 121 | + **JamTaba user guide:** [https://github.com/elieserdejesus/JamTaba/wiki/Jamtaba%27s-user-guide](https://github.com/elieserdejesus/JamTaba/wiki/Jamtaba%27s-user-guide) 122 | 123 | ### JackTrip 124 | + **JackTrip Features** 125 | - GUI wrapper for JackTrip - see Section 3, "Using QJackTrip": [https://www.psi-borg.org/other-dev.html](https://www.psi-borg.org/other-dev.html) 126 | - jacktrip can also be used from command line, with same arguments as JackTrip. 127 | 128 | ### JammerNetz 129 | + **JammerNetz Features** 130 | - Client/Server system 131 | - No Compression, so high audio quality, and good internet connection required. 132 | - Can send multiple channels per client to the server 133 | - Built-in instrument tuner for each channel 134 | - Encrypted connection requires key - default key file is /home/pi/JammerNetz/zeros.bin 135 | **JammerNetz GitHub page:** [https://github.com/christofmuc/JammerNetz](https://github.com/christofmuc/JammerNetz) 136 | 137 | ### HpsJam 138 | + **HpsJam Features** 139 | - Client/Server system 140 | - No Compression, so high audio quality, and good internet connection required. 141 | - Additional protection against jitter by redundancy in packet transmission 142 | - Local audio effects: highpass, lowpass, bandpass, delay 143 | - built in HTTP server for streaming uncompressed audio in WAV-file format to disk or other programs 144 | **HpsJam GitHub page:** [https://github.com/hselasky/hpsjam](https://github.com/hselasky/hpsjam) 145 | 146 | ### Play! 147 | - **Make sure that "Direct Monitor" on your USB Audio Interface is "off" (pushbutton out for Behringer UM2).** 148 | - For Jamulus, **listen and play to the mix coming from the server.** Your brain will quickly adapt to any delay, up to a point. 149 | - If you run a simultaneous video call to see each other, don't use it for audio - all call participants should mute their mics. 150 | 151 | ### Wrap Up 152 | - Jamulus and Sonobus each have a "Disconnect" button which will kill your connection. 153 | - Closing the program ("x" in upper right) will exit the startup script. 154 | - To shut the system down, double-click the "Power Off" button on the desktop, wait 1 min for full shutdown, then power off the Raspberry Pi. 155 | - Try to avoid shutting down by simply killing power, it can corrupt the SD card and make system unbootable. 156 | --- 157 | ### Other Topics 158 | + **Getting & Giving Help** 159 | - Questions: Start a Discussion or answer a question on github: [https://github.com/kdoren/jambox-pi-gen/discussions](https://github.com/kdoren/jambox-pi-gen/discussions) 160 | - Bugs/Problems: Open an issue on GitHub: [https://github.com/kdoren/jambox-pi-gen/issues](https://github.com/kdoren/jambox-pi-gen/issues) 161 | + **Updating Jammming Apps (Jamulus - SonoBus - QJacktrip - JamTaba - JammerNetz)** 162 | - Jamming apps are installed as apt packages from repo.jambox-project.com, so can be easily updated. 163 | - To update, double-click the "Update Apps" desktop icon. 164 | + **Updating Jambox** 165 | - Updating other jambox scripts, etc., currently requires flashing a new image to a micro SD card. 166 | - Check GitHub for new releases: [https://github.com/kdoren/jambox-pi-gen/releases](https://github.com/kdoren/jambox-pi-gen/releases) 167 | - It's not recommended to run "sudo apt update && sudo apt-get upgrade" to blanket update other packages. Probably safe but risks breaking something. Better to update only specific packages if you have a reason. 168 | + **Customizable Settings** 169 | - See file README.md on github: [https://github.com/kdoren/jambox-pi-gen](https://github.com/kdoren/jambox-pi-gen) 170 | + **Running a Jamulus Server** 171 | - Jamulus server can run on Raspberry Pi. It needs to run on a different Raspberry Pi than Jamulus client. Starting jamulus-server on jambox will kill jack audio used by client; this is by design, because they will both perform poorly if run at the same time. If you really want to run them together, comment out the "Conflict=" line in the jack and jamulus-server systemd service files. 172 | - Your internet connection needs enough upstream bandwidth to send streams to multiple clients. DSL and Cable internet typically don't have very much. 173 | - If you run a private server, your router will require port forwarding to be set up. 174 | - Most customizable settings can be controlled from the Jamulus Server GUI, and are persistent. 175 | - The NUMCHANNELS (default 8) and PORT (default 22124) settings are set in the file /home/pi/.config/Jamulus/jamulus-server.conf 176 | - To start: Double-click the "Jamulus Server Start" desktop icon, or from command line: "sudo systemctl start jamulus-server" 177 | - To auto-start jamulus-server at boot time: "sudo systemctl enable jamulus-server" 178 | - If you want to enable session recording (experimental on Raspberry Pi), a USB3 SSD is recommended. 179 | - It's not recommended to run 2 Jamulus servers at same time on Raspberry Pi. If you really want to try it anyway, there is a second systemd service "jamulus-server2". 180 | + **Patch Changes** 181 | - Please see the topic "How do I change patches" on GitHub: [https://github.com/kdoren/jambox-pi-gen/discussions](https://github.com/kdoren/jambox-pi-gen/discussions) 182 | 183 | --------------------------------------------------------------------------------