diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 40c4aea..b997435 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -18,7 +18,7 @@ body: REG Linux version used. GUI: SYSTEM SETTINGS -> INFORMATION Terminal: cat /usr/share/reglinux/system.version - Or details can be obtained from batocera-info in your support file. (See logs below) + Or details can be obtained from system-info in your support file. (See logs below) placeholder: 39-dev-2da5edeea0 2024/02/03 03:28 validations: required: true diff --git a/board/fsoverlay/etc/init.d/S97update b/board/fsoverlay/etc/init.d/S97update index 6f9b290..1175749 100755 --- a/board/fsoverlay/etc/init.d/S97update +++ b/board/fsoverlay/etc/init.d/S97update @@ -55,8 +55,8 @@ function mountshareinternal() { SHAREMOUNT="/tmp/SHARE_INTERNAL" mkdir -p "$SHAREMOUNT" PARTTYPE=$(blkid -o value -s TYPE "$SHAREPART") - echo "cmd: batocera-mount \"${PARTTYPE}\" 1 \"$SHAREPART\" \"$SHAREMOUNT\"" >>"$LOG" - if ! batocera-mount "${PARTTYPE}" 1 "$SHAREPART" "$SHAREMOUNT" >>"$LOG" 2>&1; then + echo "cmd: system-mount \"${PARTTYPE}\" 1 \"$SHAREPART\" \"$SHAREMOUNT\"" >>"$LOG" + if ! system-mount "${PARTTYPE}" 1 "$SHAREPART" "$SHAREMOUNT" >>"$LOG" 2>&1; then echo "Error mounting SHARE partition!" >>"$LOG" display_error fi @@ -112,7 +112,7 @@ if grep -qE '^[ ]*newbootuuid[ ]*=[ ]*true[ ]*$' "${BOOTCONF}"; then fi # Search for upgrade file to finish upgrading REG-linux -SHAREPART=$(batocera-part share_internal) +SHAREPART=$(system-part share_internal) SHAREMOUNT=$(grep -m 1 -E "^$SHAREPART " /proc/mounts | awk '{print $2}') [ -z "$SHAREMOUNT" ] && mountshareinternal @@ -146,7 +146,7 @@ if [ "$TASKS" -ge 1000 ]; then # Fix uuid ((CURRENTSTEP += 400)) - BOOTPART=$(/usr/bin/batocera-part boot) + BOOTPART=$(/usr/bin/system-part boot) NEWUUID=$(blkid -o value -s UUID "$BOOTPART") if [ -n "$NEWUUID" ]; then echo "Updating boot files with boot partition UUID" >>"$LOG" @@ -162,7 +162,7 @@ fi # only when random UUID for boot partition is wanted (usually first boot only) if [ "$TASKS" -ge 100 ]; then - BOOTPART="$(/usr/bin/batocera-part boot)" + BOOTPART="$(/usr/bin/system-part boot)" echo "Changing UUID of boot partition to a new random UUID" >>"$LOG" ((CURRENTSTEP += 50)) @@ -216,11 +216,11 @@ fi if [ "$TASKS" -ge 1 ]; then # /userdata partition - PARTNUM=$(batocera-part "share_internal_num") + PARTNUM=$(system-part "share_internal_num") echo "Partition name: $SHAREPART & number: $PARTNUM" >>"$LOG" # boot disk - DISK=$(batocera-part prefix "${SHAREPART}") + DISK=$(system-part prefix "${SHAREPART}") echo "Disk = $DISK" >>"$LOG" # only for ext4 diff --git a/board/fsoverlay/etc/profile.d/25-language.sh b/board/fsoverlay/etc/profile.d/25-language.sh index 147fafb..dc6e309 100644 --- a/board/fsoverlay/etc/profile.d/25-language.sh +++ b/board/fsoverlay/etc/profile.d/25-language.sh @@ -1,4 +1,4 @@ -settings_lang="$(/usr/bin/batocera-settings-get system.language || echo 'en_US')" +settings_lang="$(system-settings-get system.language || echo 'en_US')" env_lang="${settings_lang}.UTF-8" if test -n $LANG; then echo "Set Language environment variable to - ${env_lang}" diff --git a/board/fsoverlay/lib/udev/rules.d/usbmount.rules b/board/fsoverlay/lib/udev/rules.d/usbmount.rules index 5ff7954..18cb46b 100644 --- a/board/fsoverlay/lib/udev/rules.d/usbmount.rules +++ b/board/fsoverlay/lib/udev/rules.d/usbmount.rules @@ -1,11 +1,11 @@ # Rules for USBmount -*- conf -*- -KERNEL=="sd*", DRIVERS=="sbp2", ACTION=="add", RUN+="/usr/bin/batocera-usbmount add" -KERNEL=="sd*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/batocera-usbmount add" -KERNEL=="ub*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/batocera-usbmount add" -KERNEL=="mmcblk*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/batocera-usbmount add" -KERNEL=="nvme*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/batocera-usbmount add" -KERNEL=="sd*", ACTION=="remove", RUN+="/usr/bin/batocera-usbmount remove" -KERNEL=="ub*", ACTION=="remove", RUN+="/usr/bin/batocera-usbmount remove" -KERNEL=="mmcblk*", ACTION=="remove", RUN+="/usr/bin/batocera-usbmount remove" -KERNEL=="nvme*", ACTION=="remove", RUN+="/usr/bin/batocera-usbmount remove" +KERNEL=="sd*", DRIVERS=="sbp2", ACTION=="add", RUN+="/usr/bin/system-usbmount add" +KERNEL=="sd*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/system-usbmount add" +KERNEL=="ub*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/system-usbmount add" +KERNEL=="mmcblk*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/system-usbmount add" +KERNEL=="nvme*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/system-usbmount add" +KERNEL=="sd*", ACTION=="remove", RUN+="/usr/bin/system-usbmount remove" +KERNEL=="ub*", ACTION=="remove", RUN+="/usr/bin/system-usbmount remove" +KERNEL=="mmcblk*", ACTION=="remove", RUN+="/usr/bin/system-usbmount remove" +KERNEL=="nvme*", ACTION=="remove", RUN+="/usr/bin/system-usbmount remove" diff --git a/board/patches/usbmount/0003-ntfs3g.patch b/board/patches/usbmount/0003-ntfs3g.patch index c97950a..46bd431 100644 --- a/board/patches/usbmount/0003-ntfs3g.patch +++ b/board/patches/usbmount/0003-ntfs3g.patch @@ -7,7 +7,7 @@ index c09a865..7d89dbf 100755 # Mount the filesystem. log info "executing command: mount -t$fstype ${options:+-o$options} $DEVNAME $mountpoint" - mount "-t$fstype" "${options:+-o$options}" "$DEVNAME" "$mountpoint" -+ batocera-mount "$fstype" 0 "${DEVNAME}" "${mountpoint}" ++ system-mount "$fstype" 0 "${DEVNAME}" "${mountpoint}" # Determine vendor and model. vendor= diff --git a/board/patches/usbmount/004-usbmount-fancy-mount-points.patch b/board/patches/usbmount/004-usbmount-fancy-mount-points.patch index d9e4302..43623fa 100644 --- a/board/patches/usbmount/004-usbmount-fancy-mount-points.patch +++ b/board/patches/usbmount/004-usbmount-fancy-mount-points.patch @@ -49,7 +49,7 @@ index 06102cd..27193f6 100755 # Mount the filesystem. log info "executing command: mount -t$fstype ${options:+-o$options} $DEVNAME $mountpoint" + mkdir -p "${mountpoint}" - batocera-mount "$fstype" 0 "${DEVNAME}" "${mountpoint}" + system-mount "$fstype" 0 "${DEVNAME}" "${mountpoint}" # Determine vendor and model. @@ -169,18 +182,16 @@ if [ "$1" = add ]; then diff --git a/board/x86/fsoverlay/etc/init.d/S05nvidia b/board/x86/fsoverlay/etc/init.d/S05nvidia deleted file mode 100755 index 4916458..0000000 --- a/board/x86/fsoverlay/etc/init.d/S05nvidia +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -mkdir -p "/var/log" -log="/var/log/nvidia.log" - -echo > $log -echo "OS version: $(batocera-version)" >> $log -echo >> $log - -# detect the appropriate Nvidia driver -if grep -qE "^[ ]*nvidia-driver[ ]*=[ ]*true[ ]*$" /boot/system-boot.conf -then - echo "Manual setting to latest production driver" >> $log - batocera-nvidia production -elif grep -qE "^[ ]*nvidia-driver[ ]*=[ ]*legacy[ ]*$" /boot/system-boot.conf -then - echo "Manual setting to legacy 470 driver" >> $log - batocera-nvidia legacy -elif grep -qE "^[ ]*nvidia-driver[ ]*=[ ]*legacy390[ ]*$" /boot/system-boot.conf -then - echo "Manual setting to legacy 390 driver" >> $log - batocera-nvidia legacy390 -elif grep -qE "^[ ]*nvidia-driver[ ]*=[ ]*legacy340[ ]*$" /boot/system-boot.conf -then - echo "Manual setting to legacy 340 driver, however it's broken, using nouveau" >> $log - batocera-nvidia nouveau -elif grep -qE "^[ ]*nvidia-driver[ ]*=[ ]*false[ ]*$" /boot/system-boot.conf -then - echo "Manual setting to nouveau driver" >> $log - batocera-nvidia nouveau -else - echo "Using automatic Nvidia driver detection" >> $log - batocera-nvidia auto -fi diff --git a/board/x86/fsoverlay/etc/init.d/S30checkprime b/board/x86/fsoverlay/etc/init.d/S30checkprime deleted file mode 100755 index b153f0e..0000000 --- a/board/x86/fsoverlay/etc/init.d/S30checkprime +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -mkdir -p "/var/log" -mkdir -p "/userdata/system/logs" - -display_log="/userdata/system/logs/display.log" -nvidia_log="/var/log/nvidia.log" -amd_log="/userdata/system/logs/amd.log" - -case "$1" in - start) - # Check if there are two GPUs in the system - gpu_count=$(lspci -nn | grep -E "(VGA|3D|Display controller)" | wc -l) - nvidia_conditions_met=false - - if [ "$gpu_count" -eq 2 ]; then - echo "Two GPUs detected in the system" >> "$display_log" - echo "Setting best primary GPU..." >> "$display_log" - - # Check for NVIDIA GPUs - nvidia_prime=$(/usr/bin/batocera-settings-get -f /boot/system-boot.conf nvidia-prime) - if [ "$nvidia_prime" = "false" ]; then - echo "'nvidia-prime' manually set to false, skipping checks" >> "$nvidia_log" - else - gpu_name=$(lspci -nn | grep -iE "nvidia" | grep -iE "VGA|3D|Display controller") - if [ -n "$gpu_name" ] || [ "$nvidia_prime" = "true" ]; then - echo "" > "/var/tmp/nvidia.prime" - echo "Using $gpu_name as the primary GPU" >> "$nvidia_log" - echo "$gpu_name is the primary GPU" >> "$display_log" - nvidia_conditions_met=true - fi - fi - # Check for AMD/ATI GPUs if Nvidia Prime has not already been set - if [ "$nvidia_conditions_met" = "false" ]; then - radeon_prime=$(/usr/bin/batocera-settings-get -f /boot/system-boot.conf radeon-prime) - if [ "$radeon_prime" = "false" ]; then - echo "'radeon-prime' manually set to false, skipping checks" >> "$amd_log" - else - gpu_name=$(lspci -nn | grep -iE "AMD/ATI" | grep -iE "VGA|3D|Display controller") - if [ -n "$gpu_name" ] || [ "$radeon_prime" = "true" ]; then - # get the pci number for prime. - formatted_info=$(lspci -nn | grep -iE "AMD/ATI" | grep -iE "VGA|3D|Display controller" | awk -F ' ' '{print $1}' | sed -e 's/:/_/g' -e 's/\./_/' -e 's/^/pci-0000_/') - echo $formatted_info > "/var/tmp/amd.prime" - echo "Using $gpu_name as the primary GPU" >> "$amd_log" - echo "$gpu_name is the primary GPU" >> "$display_log" - fi - fi - fi - else - echo "Only one GPU detected in the system" >> "$display_log" - fi - ;; - stop) - # No stop behavior necessary - ;; - *) - echo "Usage: $0 {start|stop}" - exit 1 - ;; -esac - -exit 0 diff --git a/board/x86/fsoverlay/etc/init.d/S70fans b/board/x86/fsoverlay/etc/init.d/S70fans deleted file mode 100755 index c9262c6..0000000 --- a/board/x86/fsoverlay/etc/init.d/S70fans +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -################################ -# Fan curves for X86 handhelds # -################################ - -case "$1" in - start) - info_output=$(batocera-info) - # ayn loki zero - if [[ $info_output == *"Model: Loki_Zero"* ]]; then - # fan speeds [0-255] - echo 51 > /sys/class/hwmon/hwmon5/pwm1_auto_point1_pwm - echo 83 > /sys/class/hwmon/hwmon5/pwm1_auto_point2_pwm - echo 115 > /sys/class/hwmon/hwmon5/pwm1_auto_point3_pwm - echo 147 > /sys/class/hwmon/hwmon5/pwm1_auto_point4_pwm - echo 179 > /sys/class/hwmon/hwmon5/pwm1_auto_point5_pwm - # temps [0-100] - echo 50 > /sys/class/hwmon/hwmon5/pwm1_auto_point1_temp - echo 59 > /sys/class/hwmon/hwmon5/pwm1_auto_point2_temp - echo 68 > /sys/class/hwmon/hwmon5/pwm1_auto_point3_temp - echo 77 > /sys/class/hwmon/hwmon5/pwm1_auto_point4_temp - echo 86 > /sys/class/hwmon/hwmon5/pwm1_auto_point5_temp - # user controlled mode - echo 2 > /sys/class/hwmon/hwmon5/pwm1_mode - fi - ;; - stop) - # bios controlled mode - if [[ $info_output == *"Model: Loki_Zero"* ]]; then - echo 0 > /sys/class/hwmon/hwmon5/pwm1_mode - fi - ;; - restart) - stop - start - ;; - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 - ;; -esac - -exit 0 diff --git a/board/x86/fsoverlay/etc/init.d/S92nvdownload b/board/x86/fsoverlay/etc/init.d/S92nvdownload deleted file mode 100755 index d652ad9..0000000 --- a/board/x86/fsoverlay/etc/init.d/S92nvdownload +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -case "$1" in - start) - if [ -f "/var/tmp/nvidia.detected" ]; then - # copy nvidia log to userdata - cp -f /var/log/nvidia.log /userdata/system/logs/nvidia.log - # get the latest nvidia list files - batocera-get-nvidia-list & - fi - ;; - stop) - # No stop behavior necessary - ;; - *) - echo "Usage: $0 {start|stop}" - exit 1 - ;; -esac - -exit 0 diff --git a/buildroot b/buildroot index 8f43922..2a9048c 160000 --- a/buildroot +++ b/buildroot @@ -1 +1 @@ -Subproject commit 8f439224a34e19b404c3b5dc199963f035cf6a89 +Subproject commit 2a9048c394cac740260b0761f0b0fab1198662d0 diff --git a/package/core/rescue-system/rescue-system.mk b/package/core/rescue-system/rescue-system.mk index 79f7d06..16f5a50 100644 --- a/package/core/rescue-system/rescue-system.mk +++ b/package/core/rescue-system/rescue-system.mk @@ -44,9 +44,9 @@ define RESCUE_SYSTEM_INSTALL_TARGET_CMDS $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_RESCUE_PATH)/package/core/rescue-system/dbus.sh $(TARGET_DIR)/etc/profile.d/dbus.sh # Other scripts needed - $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_RESCUE_PATH)/package/core/rescue-system/batocera-mount $(TARGET_DIR)/usr/bin/ - $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_RESCUE_PATH)/package/core/rescue-system/batocera-part $(TARGET_DIR)/usr/bin/ - $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_RESCUE_PATH)/package/core/rescue-system/batocera-usbmount $(TARGET_DIR)/usr/bin/ + $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_RESCUE_PATH)/package/core/rescue-system/system-mount $(TARGET_DIR)/usr/bin/ + $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_RESCUE_PATH)/package/core/rescue-system/system-part $(TARGET_DIR)/usr/bin/ + $(INSTALL) -D -m 0755 $(BR2_EXTERNAL_RESCUE_PATH)/package/core/rescue-system/system-usbmount $(TARGET_DIR)/usr/bin/ endef diff --git a/package/core/rescue-system/batocera-mount b/package/core/rescue-system/system-mount similarity index 97% rename from package/core/rescue-system/batocera-mount rename to package/core/rescue-system/system-mount index 5d11446..dffcbe9 100644 --- a/package/core/rescue-system/batocera-mount +++ b/package/core/rescue-system/system-mount @@ -1,6 +1,6 @@ #!/bin/sh -# batocera-mount [FSTYPE] [RWREQUIRED] [MOUNTDEVICE] [MOUNTPOINT] +# system-mount [FSTYPE] [RWREQUIRED] [MOUNTDEVICE] [MOUNTPOINT] print_usage() { echo "${0} [FSTYPE] [RWREQUIRED] [MOUNTDEVICE] [MOUNTPOINT]" >&2 diff --git a/package/core/rescue-system/batocera-part b/package/core/rescue-system/system-part similarity index 100% rename from package/core/rescue-system/batocera-part rename to package/core/rescue-system/system-part diff --git a/package/core/rescue-system/batocera-usbmount b/package/core/rescue-system/system-usbmount similarity index 100% rename from package/core/rescue-system/batocera-usbmount rename to package/core/rescue-system/system-usbmount