From b95ab420263e0667b4bb79bdeacb7d7e835ba99d Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 13 Jul 2025 16:42:29 -0400 Subject: [PATCH] A few updates to make code work across x86_64 and aarch64. --- usr/local/bin/diagnostics.sh | 8 +++++--- usr/local/bin/install_to_disk.sh | 3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/usr/local/bin/diagnostics.sh b/usr/local/bin/diagnostics.sh index d7eb075..cfca14f 100755 --- a/usr/local/bin/diagnostics.sh +++ b/usr/local/bin/diagnostics.sh @@ -9,14 +9,16 @@ check_usb_port() { if [[ -f "$speed_file" ]]; then speed=$(cat "$speed_file") if [[ $speed -lt 1000 ]]; then - spd-say -Cw "Warning. USB 2.0 detected. Please power off the Pi and move the USB drive to a USB 3 port for better performance." + spd-say -Cw "Warning. USB 2.0 detected. Please power off the system and move the USB drive to a USB 3 port for better performance." fi fi } -# set performance -echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor +# set performance (if scaling governor exists) +if [[ -d /sys/devices/system/cpu/cpu0/cpufreq ]]; then + echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor 2>/dev/null || true +fi # Find the USB bus speed for the boot drive device=$(findmnt / -o SOURCE -n | sed 's/[0-9]*$//') diff --git a/usr/local/bin/install_to_disk.sh b/usr/local/bin/install_to_disk.sh index 013f729..0bfe123 100644 --- a/usr/local/bin/install_to_disk.sh +++ b/usr/local/bin/install_to_disk.sh @@ -163,7 +163,6 @@ fi print_message "Configuring system for installed boot..." # Remove live-specific files and services -rm -f /mnt/stormux-install/etc/systemd/system/getty@tty1.service.d/autologin.conf rm -f /mnt/stormux-install/etc/systemd/system/multi-user.target.wants/choose-mirror.service rm -rf /mnt/stormux-install/etc/systemd/system/etc-pacman.d-gnupg.mount @@ -191,4 +190,4 @@ rmdir /mnt/stormux-install print_message "" print_message "Installation completed successfully!" print_message "You can now reboot and remove the installation media." -print_message "The system will boot directly into the Stormux Gaming environment." \ No newline at end of file +print_message "The system will boot directly into the Stormux Gaming environment."