diff --git a/build/build-stormux.sh b/build/build-stormux.sh index 9c81aa4..2141f10 100755 --- a/build/build-stormux.sh +++ b/build/build-stormux.sh @@ -45,7 +45,7 @@ help() { done | sort exit 0 } - + # Array of command line arguments declare -A command=( [h]="This help screen." @@ -54,19 +54,19 @@ declare -A command=( [s:]="image size in GB, default is 4." [v:]="Version of the Raspberry Pi for which you are building. (3|4 default)" ) - + # Convert the keys of the associative array to a format usable by getopts args="${!command[*]}" args="${args//[[:space:]]/}" while getopts "${args}" i ; do case "$i" in - h) help;; + h) help ;; l) imageLanguage="${OPTARG}.UTF-8" - ;; + ;; n) imageName="${OPTARG}" - ;; + ;; s) if [[ "${OPTARG}" =~ ^[[:digit:]]+$ ]]; then imageSize="${OPTARG}G" @@ -74,7 +74,7 @@ while getopts "${args}" i ; do echo "Image size must be numeric." exit 1 fi - ;; + ;; v) if [[ "${OPTARG}" =~ ^[34]$ ]]; then imageVersion="${OPTARG}" @@ -82,13 +82,13 @@ while getopts "${args}" i ; do echo "Image version must be 3 for the Raspberry Pi 3, or 4 for the Raspberry Pi 4 (default)." exit 1 fi - ;; + ;; *) exit 1 - ;; + ;; esac done - + # make sure variables are set, or use defaults. export imageVersion="${imageVersion:-4}" export imageSize="${imageSize:-4G}" @@ -166,7 +166,10 @@ pacman -Syyu --needed --noconfirm \ man-pages \ networkmanager \ ntp \ - pulseaudio \ + pipewire \ + pipewire-alsa \ + pipewire-jack \ + pipewire-pulse \ rhvoice-voice-bdl \ rng-tools \ rsync \ @@ -174,6 +177,7 @@ pacman -Syyu --needed --noconfirm \ w3m \ wget \ wireless-regdb \ + wireplumber \ xdg-user-dirs \ xdg-utils @@ -205,18 +209,20 @@ cd yay makepkg -si --noconfirm cd ~ rm -rf yay -yay -S --noconfirm fake-hwclock-git fenrir-git growpartfs log2ram +yay -S --noconfirm fenrir-git growpartfs log2ram rm -rf .cache/yay -/usr/share/fenrirscreenreader/tools/configure_pulse.sh +/usr/share/fenrirscreenreader/tools/configure_pipewire.sh exit -systemctl --global enable pulseaudio -/usr/share/fenrirscreenreader/tools/configure_pulse.sh +# Enable linger so that hopefully sound will start at login. +touch /var/lib/systemd/linger/stormux +systemctl --global enable pipewire.service pipewire-pulse.service +/usr/share/fenrirscreenreader/tools/configure_pipewire.sh # Configure sudo for group wheel, remove nopasswd for the stormux user echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel # Set the hostname echo stormux > /etc/hostname # Enable services -systemctl enable brltty.path cronie.service fake-hwclock.service fenrirscreenreader.service log2ram.service NetworkManager.service ntpd.service +systemctl enable brltty.path cronie.service fenrirscreenreader.service log2ram.service NetworkManager.service ntpd.service # Update fstab for Raspberry Pi 4. #[[ $imageVersion -eq 4 ]] && sed -i 's/mmcblk0/mmcblk1/g' /etc/fstab