Skip to content

Commit

Permalink
🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Nov 26, 2024
1 parent 52fc3de commit ba39504
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions build_raspOVOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ mkdir -p /etc/systemd/system/[email protected]
cat << EOF > /etc/systemd/system/[email protected]/autologin.conf
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin $USER --noclear %I \$TERM
ExecStart=-/sbin/agetty --autologin $USER --noclear %I 38400 linux
EOF

# Set the system to boot into multi-user.target
Expand All @@ -53,7 +53,7 @@ ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
# Update package list and install necessary tools
echo "Updating base system..."
apt-get update
apt-get install -y --no-install-recommends git unzip curl i2c-tools fbi swig libssl-dev libfann-dev portaudio19-dev libpulse-dev build-essential python3-dev python3-pip
apt-get install -y --no-install-recommends git unzip curl i2c-tools fbi swig mpv libssl-dev libfann-dev portaudio19-dev libpulse-dev build-essential python3-dev python3-pip

echo "Installing Pipewire..."
bash /mounted-github-repo/setup_pipewire.sh
Expand All @@ -64,9 +64,6 @@ cp -v /mounted-github-repo/kdeconnect.service /etc/systemd/system/kdeconnect.ser
chmod 644 /etc/systemd/system/kdeconnect.service
ln -s /etc/systemd/system/kdeconnect.service /etc/systemd/system/multi-user.target.wants/kdeconnect.service

echo "Installing Balena wifi setup..."
cp -v /mounted-github-repo/wifi-connect.bin /usr/local/sbin/wifi-connect
cp -rv /mounted-github-repo/wifi-connect /usr/local/share/

echo "Tuning base system..."
bash /mounted-github-repo/setup_ramdisk.sh
Expand All @@ -87,19 +84,13 @@ cp -v /mounted-github-repo/splashscreen.service /etc/systemd/system/splashscreen
chmod 644 /etc/systemd/system/splashscreen.service
ln -s /etc/systemd/system/splashscreen.service /etc/systemd/system/multi-user.target.wants/splashscreen.service
# Disable default rainbow splashscreen
sed -i 's/^#\(disable_splash\)=.*/\1=1/' /boot/config.txt

sed -i 's/^#\(disable_splash\)=.*/\1=1/' /boot/firmware/config.txt

echo "Creating default OVOS XDG paths..."
mkdir -p /home/$USER/.config/mycroft
mkdir -p /home/$USER/.local/share/mycroft
mkdir -p /home/$USER/.cache/mycroft/
mkdir -p /home/$USER/.cache/ovos_gui/
# Replace 1000:1000 with the correct UID:GID if needed
chown -R 1000:1000 /home/$USER/.config/mycroft
chown -R 1000:1000 /home/$USER/.local/share/mycroft
chown -R 1000:1000 /home/$USER/.cache/mycroft/
chown -R 1000:1000 /home/$USER/.cache/ovos_gui/

# add bashrc and company
echo "Creating aliases and cli login screen..."
Expand Down Expand Up @@ -136,6 +127,11 @@ echo "Installing OVOS ggwave..."
pip3 install -U -f https://whl.smartgic.io/ ggwave
pip3 install ovos-audio-transformer-plugin-ggwave

echo "Installing Balena wifi setup..."
cp -v /mounted-github-repo/wifi-connect.bin /usr/local/sbin/wifi-connect
cp -rv /mounted-github-repo/wifi-connect /usr/local/share/
pip3 install ovos-PHAL-plugin-balena-wifi ovos-PHAL-plugin-wifi-setup

echo "Downloading default TTS + wake word models..."
# Download precise-lite model
wget https://github.com/OpenVoiceOS/precise-lite-models/raw/master/wakewords/en/hey_mycroft.tflite -P /home/$USER/.local/share/precise_lite/
Expand Down Expand Up @@ -208,9 +204,12 @@ chmod +x /usr/libexec/ovos-i2csound

ln -s /etc/systemd/system/i2csound.service /etc/systemd/system/multi-user.target.wants/i2csound.service

# Enable lingering for the user
echo "Enabling lingering for the user ..."
echo "Ensuring permissions for $USER user..."
# Replace 1000:1000 with the correct UID:GID if needed
chown -R $USER:$USER /home/$USER

# Enable lingering for the user
echo "Enabling lingering for $USER user ..."
# Enable lingering by creating the directory
mkdir -p /var/lib/systemd/linger

Expand Down

0 comments on commit ba39504

Please sign in to comment.