2.5 KISS: prune dead-platform and dead-device quirks

projects/ArchR/packages/hardware/quirks/ shipped 50 device dirs and
10 platform dirs inherited from JELOS/ROCKNIX. ArchR only ever
supports RK3326 (one platform), and the per-device quirks are
selected at runtime by reading /sys/firmware/devicetree/base/archr,device_switch/this
— a name that can only match a DTB we compiled in. The 42 device
dirs without a matching DTB and the 9 platform dirs for SoCs we
don't have (H700, RK3399, RK3566, RK3588, S922X, SDM845, SM8250,
SM8550, SM8650) were unreachable code.

Keep: 14 device dirs and 1 platform (RK3326). All correspond to a
DTS file in projects/ArchR/devices/RK3326/linux/dts/rockchip/ so
they can actually be selected at boot.

Cross-references to the dead platforms in other scripts (case
${DEVICE} in RK3399) ...; case ${DEVICE} in SM8250) ...) stay
as harmless dead branches that never trigger when DEVICE=RK3326;
cleaning those up is in scope for a follow-up sweep.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Douglas Teles
2026-06-23 16:32:36 -03:00
parent 54a79b99aa
commit 7644ce26d3
352 changed files with 0 additions and 8037 deletions
@@ -1,7 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2024-present ArchR (https://github.com/archr-linux/Arch-R)
cat <<EOF >/storage/.config/profile.d/400-device_config
DEVICE_GPU_OVERCLOCK="true"
EOF
@@ -1,16 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2025 ArchR
# Serial device
SERIAL_DEVICE="/dev/ttyHS0"
# Open serial device
stty -F $SERIAL_DEVICE 115200 -clocal -opost -isig -icanon -echo
# Send frame to switch gamepad to fake xbox 360 controller
printf "\xe7\x55\x05\x01\x00\x00\x00\x00\x00\x5b\xed" >$SERIAL_DEVICE
sleep 0.1
printf "\x35\x35\x30\x35\x30\x31\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30" >$SERIAL_DEVICE
sleep 0.1
@@ -1,22 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2024-present ArchR (https://github.com/archr-linux/Arch-R)
# Minimal OS variable loading for performance
. /etc/profile.d/001-functions
# Get GPU overclock state
GPU_OC_STATE=$(get_setting "enable.gpu-overclock")
if [ ! -n "${GPU_OC_STATE}" ]; then
GPU_OC_STATE="disable"
set_setting "enable.gpu-overclock" "0"
elif [ "${GPU_OC_STATE}" = 1 ]; then
GPU_OC_STATE="enable"
else
GPU_OC_STATE="disable"
set_setting "enable.gpu-overclock" "0"
fi
# Set GPU OC state
/usr/lib/autostart/quirks/platforms/SM8550/bin/gpu_overclock ${GPU_OC_STATE}
@@ -1,108 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2024 ArchR (https://github.com/archr-linux/Arch-R)
# Simple script to watch the battery capacity and
# turn the power LED orange when it reaches 30%, red at 20%, and blinking red at 10%
# Minimal OS variable loading for performance
. /etc/profile.d/001-functions
LED_PATH="/sys/class/leds"
function led_brightness() {
echo ${2} >${LED_PATH}/${1}/brightness
}
function led_rgb() {
echo ${2} ${3} ${4} >${LED_PATH}/${1}/multi_intensity
}
function bat_led_off() {
led_brightness power-led 0
led_rgb power-led 0 0 0
}
function bat_led_green() {
led_brightness power-led 255
led_rgb power-led 0 255 0
}
function bat_led_red() {
led_brightness power-led 255
led_rgb power-led 255 0 0
}
function bat_led_orange() {
led_brightness power-led 255
led_rgb power-led 255 20 0
}
function bat_led_yellow() {
led_brightness power-led 255
led_rgb power-led 255 125 0
}
PREV_BATCAP="null"
while true
do
BAT_LED_STATE=$(get_setting led.color)
if [ ! ${BAT_LED_STATE} == "battery" ]; then
break
fi
CAP=$(cat /sys/class/power_supply/battery/capacity)
STAT=$(cat /sys/class/power_supply/battery/status)
if [ ${STAT} == "Discharging" ]; then
if (( ${CAP} <= 10 ))
then
for ctr in $(seq 1 1 5)
do
bat_led_red
sleep .5
bat_led_off
sleep .5
done
continue
elif (( ${CAP} <= 20 ))
then
BATCAP="D_RED"
if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then
bat_led_red
fi
elif (( ${CAP} <= 30 ))
then
BATCAP="D_ORANGE"
if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then
bat_led_orange
fi
elif (( ${CAP} <= 40 ))
then
BATCAP="D_YELLOW"
if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then
bat_led_yellow
fi
else
BATCAP="D_GREEN"
if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then
bat_led_green
fi
fi
elif (( ${CAP} <= 94 ))
then
BATCAP="C_ORANGE"
if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then
bat_led_orange
fi
elif (( ${CAP} >= 95 ))
then
BATCAP="C_GREEN"
if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then
bat_led_green
fi
fi
PREV_BATCAP=${BATCAP}
sleep 15
done
@@ -1,113 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2024 ArchR (https://github.com/archr-linux/Arch-R)
# Minimal OS variable loading for performance
. /etc/profile.d/001-functions
LED_PATH="/sys/class/leds"
function led_brightness() {
echo ${2} >${LED_PATH}/${1}/brightness
}
function led_rgb() {
echo ${2} ${3} ${4} >${LED_PATH}/${1}/multi_intensity
}
function led_off() {
led_brightness power-led 0
led_rgb power-led 0 0 0
}
function led_red() {
led_brightness power-led 255
led_rgb power-led 255 0 0
}
function led_green() {
led_brightness power-led 255
led_rgb power-led 0 255 0
}
function led_blue() {
led_brightness power-led 255
led_rgb power-led 0 0 255
}
function led_white() {
led_brightness power-led 255
led_rgb power-led 255 255 255
}
function led_orange() {
led_brightness power-led 255
led_rgb power-led 255 20 0
}
function led_yellow() {
led_brightness power-led 255
led_rgb power-led 255 125 0
}
function led_purple() {
led_brightness power-led 255
led_rgb power-led 255 0 255
}
case ${1} in
red)
led_red
set_setting led.color ${1}
;;
green)
led_green
set_setting led.color ${1}
;;
blue)
led_blue
set_setting led.color ${1}
;;
white)
led_white
set_setting led.color ${1}
;;
orange)
led_orange
set_setting led.color ${1}
;;
yellow)
led_yellow
set_setting led.color ${1}
;;
purple)
led_purple
set_setting led.color ${1}
;;
off)
led_off
set_setting led.color ${1}
;;
battery)
led_off
set_setting led.color ${1}
systemctl restart batteryledstatus.service
;;
poweroff)
led_off
;;
list)
cat <<EOF
off
battery
red
green
blue
white
orange
yellow
purple
EOF
;;
esac
@@ -1 +0,0 @@
../AYANEO Pocket ACE/001-device_config
@@ -1,7 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2024-present ArchR (https://github.com/archr-linux/Arch-R)
cat <<EOF >/storage/.config/profile.d/010-analog_sticks_led_control
DEVICE_ANALOG_STICKS_LED_CONTROL="true"
EOF
@@ -1 +0,0 @@
../AYANEO Pocket ACE/020-set-xbox-gamepad
@@ -1 +0,0 @@
../AYANEO Pocket ACE/400-set_gpu_overclock
@@ -1 +0,0 @@
../../AYN Odin 2/bin/achievements
@@ -1,69 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2025 ArchR
# Serial device
SERIAL_DEVICE="/dev/ttyHS0"
# Display usage if wrong parameters
if [ $# -lt 4 ]; then
echo "Usage: $0 <BRIGHTNESS> <R> <G> <B>"
echo "Example: $0 255 255 0 0"
exit 1
fi
BRIGHTNESS=$1
R=$2
G=$3
B=$4
# Validate range
for val in "$R" "$G" "$B"; do
if ! [ "$val" -ge 0 ] || ! [ "$val" -le 255 ]; then
echo "RGB values must be 0-255"
exit 1
fi
done
# Convert to hex
BRIGHTNESS_HEX=$(printf "%02X" $BRIGHTNESS)
R_HEX=$(printf "%02X" $R)
G_HEX=$(printf "%02X" $G)
B_HEX=$(printf "%02X" $B)
# Function to calculate checksum
calculate_checksum() {
local sum=0
for byte in "$@"; do
sum=$((sum + byte))
done
echo $((sum & 0xFF))
}
# Open serial device
exec 20<>$SERIAL_DEVICE
stty -F $SERIAL_DEVICE 115200 -opost -isig -icanon -echo
# Construct payload (without STX and checksum)
payload=(0x00 0x1C 0x20 0x01 0x80 0x00 0x81 0x00 0x8B 0x0F 0x88 0x$R_HEX 0x89 0x$G_HEX 0x8A 0x$B_HEX 0x86 0xFF 0x87 0x$BRIGHTNESS_HEX 0x58 0x02 0x45 0x00)
# Calculate checksum
CHECKSUM=$(calculate_checksum "${payload[@]}")
# Construct full frame: STX + payload + checksum + ETX
STX=0xF7
ETX=0xED
FRAME=($STX "${payload[@]}" $CHECKSUM $ETX)
# Convert to \x.. string
CMD=""
for b in "${FRAME[@]}"; do
CMD+="\\x$(printf '%02X' $b)"
done
# Send frame
echo -ne "$CMD" > $SERIAL_DEVICE
# Close serial device
exec 20>&-
@@ -1 +0,0 @@
../../AYANEO Pocket ACE/bin/battery_led_status
@@ -1 +0,0 @@
../../AYANEO Pocket ACE/bin/ledcontrol
@@ -1,12 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2025 ArchR (https://github.com/archr-linux/Arch-R)
cat <<EOF >/storage/.config/profile.d/020-fan_control
FANPATH="\$(ls /sys/class/hwmon/hwmon*/pwm1 | grep hwmon | cut -c 18-24)"
DEVICE_HAS_FAN="true"
DEVICE_PWM_FAN="/sys/class/hwmon/\${FANPATH}/pwm1"
DEVICE_FAN_INPUT="/sys/class/hwmon/\${FANPATH}/pwm1"
EOF
@@ -1 +0,0 @@
../AYANEO Pocket ACE/020-set-xbox-gamepad
@@ -1,108 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2024 ArchR (https://github.com/archr-linux/Arch-R)
# Simple script to watch the battery capacity and
# turn the power LED orange when it reaches 30%, red at 20%, and blinking red at 10%
# Minimal OS variable loading for performance
. /etc/profile.d/001-functions
LED_PATH="/sys/class/leds"
function led_brightness() {
echo ${2} >${LED_PATH}/${1}/brightness
}
function led_rgb() {
echo ${2} ${3} ${4} >${LED_PATH}/${1}/multi_intensity
}
function bat_led_off() {
led_brightness power-led 0
led_rgb power-led 0 0 0
}
function bat_led_green() {
led_brightness power-led 255
led_rgb power-led 0 255 0
}
function bat_led_red() {
led_brightness power-led 255
led_rgb power-led 255 0 0
}
function bat_led_orange() {
led_brightness power-led 255
led_rgb power-led 255 20 0
}
function bat_led_yellow() {
led_brightness power-led 255
led_rgb power-led 255 125 0
}
PREV_BATCAP="null"
while true
do
BAT_LED_STATE=$(get_setting led.color)
if [ ! ${BAT_LED_STATE} == "battery" ]; then
break
fi
CAP=$(cat /sys/class/power_supply/battery/capacity)
STAT=$(cat /sys/class/power_supply/battery/status)
if [ ${STAT} == "Discharging" ]; then
if (( ${CAP} <= 10 ))
then
for ctr in $(seq 1 1 5)
do
bat_led_red
sleep .5
bat_led_off
sleep .5
done
continue
elif (( ${CAP} <= 20 ))
then
BATCAP="D_RED"
if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then
bat_led_red
fi
elif (( ${CAP} <= 30 ))
then
BATCAP="D_ORANGE"
if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then
bat_led_orange
fi
elif (( ${CAP} <= 40 ))
then
BATCAP="D_YELLOW"
if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then
bat_led_yellow
fi
else
BATCAP="D_GREEN"
if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then
bat_led_green
fi
fi
elif (( ${CAP} <= 94 ))
then
BATCAP="C_ORANGE"
if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then
bat_led_orange
fi
elif (( ${CAP} >= 95 ))
then
BATCAP="C_GREEN"
if [ ! ${BATCAP} = ${PREV_BATCAP} ]; then
bat_led_green
fi
fi
PREV_BATCAP=${BATCAP}
sleep 15
done
@@ -1,113 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2024 ArchR (https://github.com/archr-linux/Arch-R)
# Minimal OS variable loading for performance
. /etc/profile.d/001-functions
LED_PATH="/sys/class/leds"
function led_brightness() {
echo ${2} >${LED_PATH}/${1}/brightness
}
function led_rgb() {
echo ${2} ${3} ${4} >${LED_PATH}/${1}/multi_intensity
}
function led_off() {
led_brightness power-led 0
led_rgb power-led 0 0 0
}
function led_red() {
led_brightness power-led 255
led_rgb power-led 255 0 0
}
function led_green() {
led_brightness power-led 255
led_rgb power-led 0 255 0
}
function led_blue() {
led_brightness power-led 255
led_rgb power-led 0 0 255
}
function led_white() {
led_brightness power-led 255
led_rgb power-led 255 255 255
}
function led_orange() {
led_brightness power-led 255
led_rgb power-led 255 20 0
}
function led_yellow() {
led_brightness power-led 255
led_rgb power-led 255 125 0
}
function led_purple() {
led_brightness power-led 255
led_rgb power-led 255 0 255
}
case ${1} in
red)
led_red
set_setting led.color ${1}
;;
green)
led_green
set_setting led.color ${1}
;;
blue)
led_blue
set_setting led.color ${1}
;;
white)
led_white
set_setting led.color ${1}
;;
orange)
led_orange
set_setting led.color ${1}
;;
yellow)
led_yellow
set_setting led.color ${1}
;;
purple)
led_purple
set_setting led.color ${1}
;;
off)
led_off
set_setting led.color ${1}
;;
battery)
led_off
set_setting led.color ${1}
systemctl restart batteryledstatus.service
;;
poweroff)
led_off
;;
list)
cat <<EOF
off
battery
red
green
blue
white
orange
yellow
purple
EOF
;;
esac
@@ -1 +0,0 @@
../AYANEO Pocket ACE/001-device_config
@@ -1,7 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2024-present ArchR (https://github.com/archr-linux/Arch-R)
cat <<EOF >/storage/.config/profile.d/010-analog_sticks_led_control
DEVICE_ANALOG_STICKS_LED_CONTROL="true"
EOF
@@ -1 +0,0 @@
../AYANEO Pocket ACE/020-set-xbox-gamepad

Some files were not shown because too many files have changed in this diff Show More