diff --git a/build_raspOVOS.sh b/build_raspOVOS.sh index 1714381..9895ea8 100644 --- a/build_raspOVOS.sh +++ b/build_raspOVOS.sh @@ -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 @@ -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 \ No newline at end of file + +# Enable lingering for the user +echo "Enabling lingering for the user ..." +#sudo loginctl enable-linger $USER diff --git a/setup_cpugovernor.sh b/setup_cpugovernor.sh index 9dac141..77bde91 100644 --- a/setup_cpugovernor.sh +++ b/setup_cpugovernor.sh @@ -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" diff --git a/setup_fstab.sh b/setup_fstab.sh index c0b0183..b94814e 100644 --- a/setup_fstab.sh +++ b/setup_fstab.sh @@ -6,6 +6,8 @@ set -e +echo "Configuring noatime and nodiratime..." + # Define the backup file FSTAB="/etc/fstab" diff --git a/setup_kernel_modules.sh b/setup_kernel_modules.sh index 9df10c6..a19d9ea 100644 --- a/setup_kernel_modules.sh +++ b/setup_kernel_modules.sh @@ -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 diff --git a/setup_pipewire.sh b/setup_pipewire.sh index 436d9b0..a87f73c 100644 --- a/setup_pipewire.sh +++ b/setup_pipewire.sh @@ -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 diff --git a/setup_sysctl.sh b/setup_sysctl.sh index 4bccf5e..a460bc4 100644 --- a/setup_sysctl.sh +++ b/setup_sysctl.sh @@ -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" diff --git a/setup_udev.sh b/setup_udev.sh index 177c7d5..93f60b1 100644 --- a/setup_udev.sh +++ b/setup_udev.sh @@ -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" diff --git a/setup_wlan0power.sh b/setup_wlan0power.sh index db6ed25..610bec8 100644 --- a/setup_wlan0power.sh +++ b/setup_wlan0power.sh @@ -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." diff --git a/setup_zram.sh b/setup_zram.sh index a803ad3..f312283 100644 --- a/setup_zram.sh +++ b/setup_zram.sh @@ -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