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 6242ca3 commit bc31ddf
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 21 deletions.
22 changes: 14 additions & 8 deletions build_raspOVOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ apt-get install -y --no-install-recommends git curl i2c-tools swig libssl-dev li
echo "Installing Pipewire..."
bash /mounted-github-repo/setup_pipewire.sh


echo "Tuning base system..."
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 virtual environment for ovos
echo "Creating virtual environment..."
mkdir -p ~/.venvs
Expand Down Expand Up @@ -68,11 +78,7 @@ chmod +x /usr/libexec/ovos-i2csound
systemctl enable i2csound.service


echo "Tuning base system..."
#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

# Enable lingering for the user
echo "Enabling lingering for the user ..."
#sudo loginctl enable-linger $USER
3 changes: 3 additions & 0 deletions setup_cpugovernor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# scroll back and figure out what went wrong.
set -e


echo "Installing CPU governor"

apt-get install -y --no-install-recommends linux-cpupower

# Configure the CPU governor to "performance"
Expand Down
2 changes: 2 additions & 0 deletions setup_fstab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
set -e


echo "Configuring noatime and nodiratime..."

# Define the backup file
FSTAB="/etc/fstab"

Expand Down
2 changes: 2 additions & 0 deletions setup_kernel_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
set -e


echo "Configuring I2C, SPI, and I2S kernel modules..."

# Load I2C, SPI, and I2S kernel modules and make persistent
for module in i2c-dev spidev; do
if ! grep -q "$module" /etc/modules; then
Expand Down
5 changes: 0 additions & 5 deletions setup_pipewire.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ fi
# Add user to pipewire group
sudo usermod -aG pipewire $USER

# Enable lingering for the user
echo "Enabling lingering for the user ..."
#sudo loginctl enable-linger $USER


echo "Creating .asoundrc ..."
echo -e "pcm.!default $SOUND_SERVER\nctl.!default $SOUND_SERVER" > /home/$USER/.asoundrc
sudo chown $USER:$USER /home/$USER/.asoundrc
Expand Down
3 changes: 3 additions & 0 deletions setup_sysctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# scroll back and figure out what went wrong.
set -e


echo "Configuring sysctl..."

# Define the sysctl configuration file
SYSCTL_FILE="/etc/sysctl.d/99-ovos.conf"

Expand Down
1 change: 1 addition & 0 deletions setup_udev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# scroll back and figure out what went wrong.
set -e

echo "Configuring udev I/O scheduler rules for MMC and USB..."

# Define the udev rules file path
UDEV_RULES_FILE="/etc/udev/rules.d/60-mmc-usb-scheduler.rules"
Expand Down
3 changes: 1 addition & 2 deletions setup_wlan0power.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ set -e

echo "Copying wlan0-power systemd service to /etc/systemd/system/wlan0-power.service"
cp -v /mounted-github-repo/wlan0-power.service /etc/systemd/system/wlan0-power.service
sudo systemctl daemon-reload
sudo systemctl enable wlan0-power.service
systemctl enable wlan0-power.service
echo "wlan0-power service is now enabled."

6 changes: 0 additions & 6 deletions setup_zram.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ vm.dirty_background_ratio=1
vm.dirty_ratio=50
EOL

# Apply the sysctl settings
echo "Reloading sysctl settings..."
sudo sysctl --system

# Reload systemd to apply the configuration changes
systemctl daemon-reload
# Start the systemd ZRAM service
echo "Starting ZRAM service..."
systemctl enable /dev/zram0

0 comments on commit bc31ddf

Please sign in to comment.