Switch to dbus-broker.
This commit is contained in:
parent
824b68b90a
commit
00ccf36543
@ -50,9 +50,9 @@ help() {
|
|||||||
declare -A command=(
|
declare -A command=(
|
||||||
[h]="This help screen."
|
[h]="This help screen."
|
||||||
[l:]="Language default is en_US."
|
[l:]="Language default is en_US."
|
||||||
[n:]="Image name, default is stormux-pi<3|4>-<yyyy-mm-dd>.img"
|
[n:]="Image name, default is stormux-pi<32|64>-<yyyy-mm-dd>.img"
|
||||||
[s:]="image size in GB, default is 4."
|
[s:]="image size in GB, default is 4."
|
||||||
[v:]="Version of the Raspberry Pi for which you are building. (3|4 default)"
|
[v:]="Version of the Raspberry Pi for which you are building. (32|64) default is 64."
|
||||||
)
|
)
|
||||||
|
|
||||||
# Convert the keys of the associative array to a format usable by getopts
|
# Convert the keys of the associative array to a format usable by getopts
|
||||||
@ -76,10 +76,10 @@ while getopts "${args}" i ; do
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
v)
|
v)
|
||||||
if [[ "${OPTARG}" =~ ^[34]$ ]]; then
|
if [[ "${OPTARG}" =~ ^32|64$ ]]; then
|
||||||
imageVersion="${OPTARG}"
|
imageVersion="${OPTARG}"
|
||||||
else
|
else
|
||||||
echo "Image version must be 3 for the Raspberry Pi 3, or 4 for the Raspberry Pi 4 (default)."
|
echo "Image version must be 32 for 32 bit (armv7h), or 64 for 64 bit (aarch64 default)."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -90,9 +90,12 @@ while getopts "${args}" i ; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# make sure variables are set, or use defaults.
|
# make sure variables are set, or use defaults.
|
||||||
export imageVersion="${imageVersion:-4}"
|
export imageVersion="${imageVersion:-64}"
|
||||||
export imageSize="${imageSize:-4G}"
|
export imageSize="${imageSize:-4G}"
|
||||||
export imageName="${imageName:-stormux-pi${imageVersion}-$(date '+%Y-%m-%d').img}"
|
imageName="${imageName:-stormux-pi4-${imageVersion}-$(date '+%Y-%m-%d').img}"
|
||||||
|
imageName="${imageName/-64-/-aarch64-}"
|
||||||
|
imageName="${imageName/-32-/-armv7h-}"
|
||||||
|
export imageName
|
||||||
export imageLanguage="${imageLanguage:-en_US.UTF-8}"
|
export imageLanguage="${imageLanguage:-en_US.UTF-8}"
|
||||||
|
|
||||||
# Make sure the image file doesn't exist.
|
# Make sure the image file doesn't exist.
|
||||||
@ -127,10 +130,8 @@ done
|
|||||||
|
|
||||||
|
|
||||||
# Url for the image to be downloaded.
|
# Url for the image to be downloaded.
|
||||||
#url[3]="http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-aarch64-latest.tar.gz"
|
url[32]="http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-armv7-latest.tar.gz"
|
||||||
url[3]="http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz"
|
url[64]="http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-aarch64-latest.tar.gz"
|
||||||
url[4]="http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-aarch64-latest.tar.gz"
|
|
||||||
#url[4]="http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-armv7-latest.tar.gz"
|
|
||||||
|
|
||||||
fallocate -l "$imageSize" "$imageName"
|
fallocate -l "$imageSize" "$imageName"
|
||||||
loopdev="$(losetup --find --show "${imageName}")"
|
loopdev="$(losetup --find --show "${imageName}")"
|
||||||
@ -149,7 +150,15 @@ arch-chroot /mnt << EOF
|
|||||||
# set up pacman
|
# set up pacman
|
||||||
pacman-key --init
|
pacman-key --init
|
||||||
pacman-key --populate archlinuxarm
|
pacman-key --populate archlinuxarm
|
||||||
pacman -Syyu --needed --noconfirm \
|
pacman -Syy
|
||||||
|
# Change kernels for aarch64
|
||||||
|
if [[ "$imageVersion" == "64" ]]; then
|
||||||
|
pacman -R --noconfirm linux-aarch64 uboot-raspberrypi
|
||||||
|
pacman -S --noconfirm linux-rpi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
pacman -Su --needed --noconfirm \
|
||||||
alsa-firmware \
|
alsa-firmware \
|
||||||
alsa-utils \
|
alsa-utils \
|
||||||
base \
|
base \
|
||||||
@ -159,6 +168,7 @@ pacman -Syyu --needed --noconfirm \
|
|||||||
bluez-utils \
|
bluez-utils \
|
||||||
brltty \
|
brltty \
|
||||||
cronie \
|
cronie \
|
||||||
|
dbus-broker \
|
||||||
espeak-ng \
|
espeak-ng \
|
||||||
git \
|
git \
|
||||||
magic-wormhole \
|
magic-wormhole \
|
||||||
@ -181,9 +191,6 @@ pacman -Syyu --needed --noconfirm \
|
|||||||
xdg-user-dirs \
|
xdg-user-dirs \
|
||||||
xdg-utils
|
xdg-utils
|
||||||
|
|
||||||
# Change kernels
|
|
||||||
pacman -R --noconfirm linux-aarch64 uboot-raspberrypi
|
|
||||||
pacman -S --noconfirm linux-rpi
|
|
||||||
# set the language
|
# set the language
|
||||||
sed -i "s/#$imageLanguage/$imageLanguage/" /etc/locale.gen
|
sed -i "s/#$imageLanguage/$imageLanguage/" /etc/locale.gen
|
||||||
echo "LANG=$imageLanguage" > /etc/locale.conf
|
echo "LANG=$imageLanguage" > /etc/locale.conf
|
||||||
@ -212,23 +219,26 @@ cd yay
|
|||||||
makepkg -si --noconfirm
|
makepkg -si --noconfirm
|
||||||
cd ~
|
cd ~
|
||||||
rm -rf yay
|
rm -rf yay
|
||||||
yay -S --noconfirm fenrir-git growpartfs log2ram
|
yay -S --removemake --noconfirm fenrir-git growpartfs log2ram
|
||||||
rm -rf .cache/yay
|
rm -rf .cache/yay
|
||||||
/usr/share/fenrirscreenreader/tools/configure_pipewire.sh
|
/usr/share/fenrirscreenreader/tools/configure_pipewire.sh
|
||||||
exit
|
exit
|
||||||
# Enable linger so that hopefully sound will start at login.
|
# Enable linger so that hopefully sound will start at login.
|
||||||
mkdir -p /var/lib/systemd/linger
|
mkdir -p /var/lib/systemd/linger
|
||||||
touch /var/lib/systemd/linger/stormux
|
touch /var/lib/systemd/linger/stormux
|
||||||
systemctl --global enable pipewire.service pipewire-pulse.service
|
systemctl --global enable dbus-broker.service pipewire.service pipewire-pulse.service
|
||||||
/usr/share/fenrirscreenreader/tools/configure_pipewire.sh
|
/usr/share/fenrirscreenreader/tools/configure_pipewire.sh
|
||||||
# Configure sudo for group wheel, remove nopasswd for the stormux user
|
# Configure sudo for group wheel, remove nopasswd for the stormux user
|
||||||
echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel
|
echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel
|
||||||
# Set the hostname
|
# Set the hostname
|
||||||
echo stormux > /etc/hostname
|
echo stormux > /etc/hostname
|
||||||
# Enable services
|
# Configure services
|
||||||
systemctl enable brltty.path cronie.service fenrirscreenreader.service log2ram.service NetworkManager.service ntpd.service
|
systemctl enable brltty.path cronie.service dbus-broker.service fenrirscreenreader.service log2ram.service NetworkManager.service ntpd.service
|
||||||
|
systemctl disable dbus.service
|
||||||
|
# Cleanup packages
|
||||||
|
pacman -Sc --noconfirm
|
||||||
|
|
||||||
# Update fstab for Raspberry Pi 4.
|
# Update fstab for Raspberry Pi 4. Not needed until linux-aarch64 works.
|
||||||
# [[ $imageVersion -eq 4 ]] && sed -i 's/mmcblk0/mmcblk1/g' /etc/fstab
|
# [[ $imageVersion -eq 4 ]] && sed -i 's/mmcblk0/mmcblk1/g' /etc/fstab
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user