Skip to content

Commit

Permalink
🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Nov 25, 2024
1 parent 4835104 commit 4fa9d49
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_img.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: raspOVOS-bookworm-arm64-lite-${{ github.run_id }}
release_name: Release ${{ github.ref }} (draft)
release_name: raspOVOS-bookworm-arm64-lite-${{ github.run_id }}
body: |
Test upload-to-github-release works with `actions/create-release`.
draft: true
Expand Down
29 changes: 22 additions & 7 deletions build_raspOVOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,35 @@
# scroll back and figure out what went wrong.
set -e

chfn -f "RaspOVOS" pi
# set user full name, just for cosmetics
chfn -f "RaspOVOS" $USER

# Update package list and install necessary tools
echo "Updating base system..."ã
echo "Updating base system..."
apt-get update
apt-get install -y --no-install-recommends git curl i2c-tools swig libssl-dev libfann-dev portaudio19-dev libpulse-dev build-essential python3-dev python3-pip
apt-get install -y --no-install-recommends git curl i2c-tools fbi swig libssl-dev libfann-dev portaudio19-dev libpulse-dev build-essential python3-dev python3-pip

echo "Installing Pipewire..."
bash /mounted-github-repo/setup_pipewire.sh

echo "Tuning base system..."
bash /mounted-github-repo/setup_ramdisk.sh
bash /mounted-github-repo/setup_zram.sh
bash /mounted-github-repo/setup_cpugovernor.sh
bash /mounted-github-repo/setup_wlan0power.sh
bash /mounted-github-repo/setup_fstab.sh
bash /mounted-github-repo/setup_sysctl.sh
bash /mounted-github-repo/setup_udev.sh
bash /mounted-github-repo/setup_kernel_modules.sh
# Create a ramdisk
echo "tmpfs /ramdisk tmpfs rw,nodev,nosuid,size=20M 0 0" >> "/etc/fstab"


# splashscreen
echo "Creating OVOS splashscreen..."
cp -v /mounted-github-repo/splashscreen.png /opt/ovos/splashscreen.png
cp -v /mounted-github-repo/splashscreen.service /etc/systemd/system/splashscreen.service
chmod 644 /etc/systemd/system/splashscreen.service
ln -s /etc/systemd/system/splashscreen.service /etc/systemd/system/multi-user.target.wants/splashscreen.service


# Create virtual environment for ovos
echo "Creating virtual environment..."
Expand All @@ -36,12 +45,18 @@ source /home/$USER/.venvs/ovos/bin/activate

# install OVOS in venv
echo "Installing OVOS..."
pip3 install wheel cython
pip3 install sdnotify tflite_runtime
pip3 install wheel cython sdnotify tflite_runtime
pip3 install ovos-core[lgpl,mycroft,plugins,skills-audio,skills-essential,skills-internet,skills-media]
pip3 install ovos-dinkum-listener[extras,linux,onnx]
pip3 install ovos-phal[extras,linux]

echo "Installing ggwave..."
pip3 install ovos-audio-transformer-plugin-ggwave
pip3 install -U -f https://whl.smartgic.io/ ggwave

echo "Downloading default wake word models..."
# TODO - vosk
wget https://github.com/OpenVoiceOS/precise-lite-models/raw/master/wakewords/en/hey_mycroft.tflite -P /home/$USER/.local/share/precise_lite/

echo "Setting up systemd..."
# copy system scripts over
Expand Down
19 changes: 19 additions & 0 deletions setup_ramdisk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
# Exit on error
# If something goes wrong just stop.
# it allows the user to see issues at once rather than having
# scroll back and figure out what went wrong.
set -e


# Create a ramdisk
echo "tmpfs /ramdisk tmpfs rw,nodev,nosuid,size=20M 0 0" >> "/etc/fstab"
ln -s /ramdisk/mycroft/audio.log /home/$USER/.local/state/mycroft/
ln -s /ramdisk/mycroft/bus.log /home/$USER/.local/state/mycroft/
ln -s /ramdisk/mycroft/gui.log /home/$USER/.local/state/mycroft/
ln -s /ramdisk/mycroft/ovos.log /home/$USER/.local/state/mycroft/
ln -s /ramdisk/mycroft/ovos_shell.log /home/$USER/.local/state/mycroft/
ln -s /ramdisk/mycroft/phal_admin.log /home/$USER/.local/state/mycroft/
ln -s /ramdisk/mycroft/phal.log /home/$USER/.local/state/mycroft/
ln -s /ramdisk/mycroft/skills.log /home/$USER/.local/state/mycroft/
ln -s /ramdisk/mycroft/voice.log /home/$USER/.local/state/mycroft/
Binary file added splashscreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions splashscreen.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=Splash screen
DefaultDependencies=no
After=local-fs.target

[Service]
ExecStart=/usr/bin/fbi -d /dev/fb0 --noverbose -a /opt/ovos/splashscreen.png
StandardInput=tty
StandardOutput=tty

[Install]
WantedBy=sysinit.target

0 comments on commit 4fa9d49

Please sign in to comment.