diff --git a/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-eeclone.dts b/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-eeclone.dts index a69ee04e52..f3e5abb5ea 100644 --- a/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-eeclone.dts +++ b/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-eeclone.dts @@ -798,6 +798,14 @@ &tsadc { status = "okay"; + /* + * Explicit hardware thermal-shutdown config (CRU self-reset on + * over-temp, active-low) matching the driver defaults, to silence the + * "Missing tshut mode/polarity property" boot warning. No behaviour + * change. + */ + rockchip,hw-tshut-mode = <0>; + rockchip,hw-tshut-polarity = <0>; }; &u2phy { diff --git a/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-r3xs.dtsi b/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-r3xs.dtsi index 5e95dab3ab..6cf3125ae6 100644 --- a/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-r3xs.dtsi +++ b/projects/ArchR/devices/RK3326/linux/dts/rockchip/rk3326-gameconsole-r3xs.dtsi @@ -471,6 +471,15 @@ &tsadc { status = "okay"; + /* + * Spell out the hardware thermal-shutdown config the driver otherwise + * warns about ("Missing tshut mode/polarity property, using default"): + * CRU self-reset on over-temp, active-low. These match the driver + * defaults already in use, so behaviour is unchanged; this just makes + * the config explicit and silences the boot warning. + */ + rockchip,hw-tshut-mode = <0>; + rockchip,hw-tshut-polarity = <0>; }; &u2phy { diff --git a/projects/ArchR/packages/archr/config/system/configs/system.cfg b/projects/ArchR/packages/archr/config/system/configs/system.cfg index 4d4c829983..afd4992251 100644 --- a/projects/ArchR/packages/archr/config/system/configs/system.cfg +++ b/projects/ArchR/packages/archr/config/system/configs/system.cfg @@ -179,7 +179,7 @@ system.autohotkeys=1 system.automount=1 system.battery.warning=0 system.battery.warning_threshold=25 -system.hostname=@DEVICENAME@ +system.hostname=archr system.language=en_US enable.turbo-mode=1 system.cpugovernor=ondemand diff --git a/projects/ArchR/packages/linux-drivers/RTL8188EUS/udev.d/99-rtl8188eus.rules b/projects/ArchR/packages/linux-drivers/RTL8188EUS/udev.d/99-rtl8188eus.rules index b1ffa5715d..6be61e8de3 100644 --- a/projects/ArchR/packages/linux-drivers/RTL8188EUS/udev.d/99-rtl8188eus.rules +++ b/projects/ArchR/packages/linux-drivers/RTL8188EUS/udev.d/99-rtl8188eus.rules @@ -31,6 +31,10 @@ LABEL="rtl8188eus_swap" # mesmo tempo); depois carrega 8188eu, que vai bindar pela alias # table. ${BUSNUM} e ${DEVNUM} são fornecidos por udev e identificam # o device USB sem ambiguidade. -RUN+="/usr/bin/sh -c 'busid=$(basename %p); for drv in /sys/bus/usb/drivers/rtl8xxxu; do [ -e \"$drv/$busid\" ] && echo \"$busid\" > \"$drv/unbind\" 2>/dev/null; done; modprobe 8188eu 2>/dev/null'" +# udev parses `$` in RUN as its own specifier prefix, so shell variables +# must be doubled (`$$` -> literal `$`). The previous single-`$` form made +# udev reject the whole rule ("invalid substitution type"), so the rebind +# never ran and the dongle was left on rtl8xxxu by luck of probe order. +RUN+="/usr/bin/sh -c 'busid=$$(basename %p); for drv in /sys/bus/usb/drivers/rtl8xxxu; do [ -e \"$$drv/$$busid\" ] && echo \"$$busid\" > \"$$drv/unbind\" 2>/dev/null; done; modprobe 8188eu 2>/dev/null'" LABEL="rtl8188eus_end" diff --git a/projects/ArchR/packages/linux/udev.d/10-bfq-sched.rules b/projects/ArchR/packages/linux/udev.d/10-bfq-sched.rules index 11060205dc..32efb67b84 100644 --- a/projects/ArchR/packages/linux/udev.d/10-bfq-sched.rules +++ b/projects/ArchR/packages/linux/udev.d/10-bfq-sched.rules @@ -1,5 +1,9 @@ -ACTION=="add|change", KERNEL=="mmcblk[0-9]*", ATTR{queue/scheduler}="bfq" -ACTION=="add|change", KERNEL=="mmcblk[0-9]*", ATTR{queue/iosched/low_latency}="1" -ACTION=="add|change", KERNEL=="mmcblk[0-9]*", ATTR{queue/read_ahead_kb}="2048" -ACTION=="add|change", KERNEL=="mmcblk[0-9]*", ATTR{queue/nr_requests}="128" -ACTION=="add|change", KERNEL=="mmcblk[0-9]*", ATTR{queue/rq_affinity}="2" +# Tune the I/O scheduler on the whole SD/eMMC disks. The queue/* knobs live +# on the disk, not its partitions, so we gate on DEVTYPE=="disk": matching +# `mmcblk[0-9]*` alone also hit mmcblk1p1/p2/p3 and spammed the boot log with +# "Failed to write ATTR{.../queue/scheduler}: No such file or directory". +ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="mmcblk[0-9]*", ATTR{queue/scheduler}="bfq" +ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="mmcblk[0-9]*", ATTR{queue/iosched/low_latency}="1" +ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="mmcblk[0-9]*", ATTR{queue/read_ahead_kb}="2048" +ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="mmcblk[0-9]*", ATTR{queue/nr_requests}="128" +ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="mmcblk[0-9]*", ATTR{queue/rq_affinity}="2" diff --git a/projects/ArchR/packages/sysutils/systemd/scripts/network-base-setup b/projects/ArchR/packages/sysutils/systemd/scripts/network-base-setup index 0c8cc35a51..a21a6a4edb 100755 --- a/projects/ArchR/packages/sysutils/systemd/scripts/network-base-setup +++ b/projects/ArchR/packages/sysutils/systemd/scripts/network-base-setup @@ -1,6 +1,14 @@ #!/bin/sh . /etc/profile HOSTNAME=$(get_setting system.hostname) +# Make the hostname unique per device. Multiple ArchR consoles on one LAN +# otherwise share a name and collide on NetBIOS / mDNS registration (nmbd +# "Failed to register my name ..."). Append a short, stable suffix derived +# from the per-device machine-id (the same id the gadget uses for its +# serial). Skip if no machine-id is available yet. +MID="$(cat /storage/.cache/systemd-machine-id 2>/dev/null)" +[ -z "${MID}" ] && MID="$(cat /etc/machine-id 2>/dev/null)" +[ -n "${MID}" ] && HOSTNAME="${HOSTNAME}-$(echo "${MID}" | cut -c1-4)" echo ${HOSTNAME} >/proc/sys/kernel/hostname hostnamectl --transient hostname ${HOSTNAME} avahi-set-host-name ${HOSTNAME}