Merge pull request #2015 from fewtarius/dev

Refactor quirks
This commit is contained in:
fewtarius 2023-09-04 15:12:31 -04:00 committed by GitHub
commit 3ab3816b54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
126 changed files with 560 additions and 909 deletions

View file

@ -1,34 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
### Set the default TDP if it isn't defined.
MYTDP=$(get_setting system.overclock)
if [ -z "${MYTDP}" ]
then
# Set default TDP
set_setting system.overclock 15w
fi
### Set sleep mode to mem sleep (S3)
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode mem
fi
### Set the default device configuration
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
DEVICE_BASE_TDP="15w"
DEVICE_LED_CONTROL=false
DEVICE_VOLUMECTL=true
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_FUNC_KEYA_MODIFIER="KEY_LEFTCTRL"
DEVICE_FUNC_KEYB_MODIFIER="KEY_D"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"
EOF

View file

@ -1,34 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
. /etc/profile
### Set the default TDP if it isn't defined.
MYTDP=$(get_setting system.overclock)
if [ -z "${MYTDP}" ]
then
# Set default TDP
set_setting system.overclock 15w
fi
### Set sleep mode to mem sleep (S3)
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode mem
fi
### Set the default device configuration
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
DEVICE_BASE_TDP="15w"
DEVICE_VOLUMECTL=true
DEVICE_LED_CONTROL=false
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_FUNC_KEYA_MODIFIER="KEY_LEFTCTRL"
DEVICE_FUNC_KEYB_MODIFIER="KEY_D"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"
EOF

View file

@ -1,32 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
. /etc/profile
### Set the default TDP if it isn't defined.
MYTDP=$(get_setting system.overclock)
if [ -z "${MYTDP}" ]
then
# Set default TDP
set_setting system.overclock 15w
fi
### Set sleep mode to mem sleep (S3)
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode mem
fi
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
DEVICE_BASE_TDP="15w"
DEVICE_VOLUMECTL=true
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_FUNC_KEYA_MODIFIER="KEY_LEFTCTRL"
DEVICE_FUNC_KEYB_MODIFIER="KEY_D"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"
EOF

View file

@ -0,0 +1,8 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
cat <<EOF >/storage/.config/profile.d/050-modifiers
DEVICE_FUNC_KEYA_MODIFIER="KEY_LEFTCTRL"
DEVICE_FUNC_KEYB_MODIFIER="KEY_D"
EOF

View file

@ -1,34 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
. /etc/profile
### Set the default TDP if it isn't defined.
MYTDP=$(get_setting system.overclock)
if [ -z "${MYTDP}" ]
then
# Set default TDP
set_setting system.overclock 15w
fi
### Set sleep mode to mem sleep (S3)
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode mem
fi
### Set the default device configuration
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
DEVICE_BASE_TDP="15w"
DEVICE_LED_CONTROL=true
DEVICE_VOLUMECTL=true
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_FUNC_KEYA_MODIFIER="KEY_RIGHTCTRL"
DEVICE_FUNC_KEYB_MODIFIER="KEY_D"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"
EOF

View file

@ -0,0 +1,7 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/010-led_control
DEVICE_LED_CONTROL=true
EOF

View file

@ -2,14 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
if [ ! -d "/storage/.config/profile.d" ]
then
mkdir -p /storage/.config/profile.d
fi
cat <<EOF >/storage/.config/profile.d/002-fancontrol
cat <<EOF >/storage/.config/profile.d/020-fan_control
DEVICE_HAS_FAN=true
DEVICE_PWM_FAN="$(find /sys/devices/platform/oxp-platform -name pwm1)"
DEVICE_TEMP_SENSOR="$(find /sys/devices/pci*/* -path "*/nvme" -prune -o -name temp1_input -print)"

View file

@ -0,0 +1,17 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
# Device Features
DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=false
DEVICE_PLAYBACK_PATH_SPK="HP"
DEVICE_PLAYBACK_PATH_HP="SPK"
DEVICE_BRIGHTNESS="128"
DEVICE_VOLUME="100"
DEVICE_BATTERY_LED_STATUS=true
DEVICE_PWR_LED_GPIO="77"
DEVICE_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone0/temp"
EOF

View file

@ -0,0 +1,8 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /storage/.config/profile.d/001-device_config
### RG351P/M has a volume rocker, so the internal volume should always be 100%.
amixer -c 0 set "Master" "${DEVICE_VOLUME}%"

View file

@ -8,16 +8,8 @@ DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=false
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_FUNC_KEYA_MODIFIER="BTN_SELECT"
DEVICE_FUNC_KEYB_MODIFIER="BTN_START"
DEVICE_BRIGHTNESS="128"
DEVICE_BATTERY_LED_STATUS=true
DEVICE_PWR_LED_GPIO="77"
DEVICE_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone0/temp"
UI_SERVICE="weston.service"
# FREQ governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ=("/sys/devices/platform/ff400000.gpu/devfreq/ff400000.gpu")
DMC_FREQ=("/sys/devices/platform/dmc/devfreq/dmc")
EOF

View file

@ -1,33 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
# Device Features
DEVICE_FAKE_JACKSENSE=false
DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=false
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
#DEVICE_HEADPHONE_DEV=""
DEVICE_BRIGHTNESS="128"
UI_SERVICE="emustation.service"
# GPIOS
DEVICE_WIFI="0"
#DEVICE_LED=""
DEVICE_PWM_MOTOR="pwmchip1"
#DEVICE_PWM_FAN=""
#DEVICE_JACK=""
# FREQ governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ="/sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu"
DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
# Volume Keys
DEVICE_KEY_VOLUMEDOWN=114
DEVICE_KEY_VOLUMEUP=115
DEVICE_FUNC_KEYA_MODIFIER="BTN_SELECT"
DEVICE_FUNC_KEYB_MODIFIER="BTN_MODE"
EOF

View file

@ -1,19 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
# Enable PWM for rumble and turn rumble off during startup.
echo 0 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/export
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/period
echo 1 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/enable
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/duty_cycle
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode freeze
fi
echo s2idle >/sys/power/mem_sleep

View file

@ -0,0 +1,9 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/010-governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ="/sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu"
DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
EOF

View file

@ -1,19 +1,15 @@
#!/bin/bash
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
cat <<EOF >/storage/.config/profile.d/020-gpios
DEVICE_WIFI="0"
DEVICE_PWM_MOTOR="pwmchip1"
EOF
. /storage/.config/profile.d/020-gpios
# Enable PWM for rumble and turn rumble off during startup.
echo 0 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/export
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/period
echo 1 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/enable
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/duty_cycle
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode freeze
fi
echo s2idle >/sys/power/mem_sleep

View file

@ -1,8 +1,8 @@
#!/bin/bash
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
# Copyright (C) 2022-present Fewtarius
. /etc/profile
. /etc/profile.d/001-functions
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
@ -11,3 +11,4 @@ then
fi
echo s2idle >/sys/power/mem_sleep

View file

@ -0,0 +1,12 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
DEVICE_FAKE_JACKSENSE=true
DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=true
DEVICE_HEADPHONE_DEV="/dev/input/by-path/platform-rk817-sound-event"
DEVICE_BRIGHTNESS="70"
EOF

View file

@ -1,35 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
# Device definition file for the Anbernic RG351V
# Device Features
DEVICE_FAKE_JACKSENSE=true
DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=true
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_HEADPHONE_DEV="/dev/input/by-path/platform-rk817-sound-event"
DEVICE_BRIGHTNESS="70"
UI_SERVICE="emustation.service"
# GPIOS
DEVICE_WIFI="5"
DEVICE_LED="77"
DEVICE_PWM_MOTOR="pwmchip1"
#DEVICE_PWM_FAN=""
DEVICE_JACK="86"
# FREQ governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ="/sys/devices/platform/ff400000.gpu/devfreq/ff400000.gpu"
DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
# Volume Keys
#DEVICE_KEY_VOLUMEDOWN=
#DEVICE_KEY_VOLUMEUP=
DEVICE_FUNC_KEYA_MODIFIER="BTN_SELECT"
DEVICE_FUNC_KEYB_MODIFIER="BTN_MODE"
EOF

View file

@ -1,19 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
# Enable PWM for rumble and turn rumble off during startup.
echo 0 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/export
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/period
echo 1 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/enable
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/duty_cycle
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode freeze
fi
echo s2idle >/sys/power/mem_sleep

View file

@ -0,0 +1,10 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/010-governors
# FREQ governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ="/sys/devices/platform/ff400000.gpu/devfreq/ff400000.gpu"
DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
EOF

View file

@ -0,0 +1,17 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/020-gpios
DEVICE_WIFI="5"
DEVICE_LED="77"
DEVICE_PWM_MOTOR="pwmchip1"
DEVICE_JACK="86"
EOF
. /storage/.config/profile.d/020-gpios
# Enable PWM for rumble and turn rumble off during startup.
echo 0 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/export
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/period
echo 1 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/enable
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/duty_cycle

View file

@ -1,8 +1,8 @@
#!/bin/bash
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
# Copyright (C) 2022-present Fewtarius
. /etc/profile
. /etc/profile.d/001-functions
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
@ -11,3 +11,4 @@ then
fi
echo s2idle >/sys/power/mem_sleep

View file

@ -0,0 +1,10 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
DEVICE_FAKE_JACKSENSE=false
DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=false
DEVICE_BRIGHTNESS="153"
EOF

View file

@ -1,35 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
# Device definition file for the Anbernic RG503
# Device Features
DEVICE_FAKE_JACKSENSE=false
DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=false
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
#DEVICE_HEADPHONE_DEV=""
DEVICE_BRIGHTNESS="153"
UI_SERVICE="emustation.service"
# GPIOS
DEVICE_WIFI="0"
#DEVICE_LED=""
DEVICE_PWM_MOTOR="pwmchip1"
#DEVICE_PWM_FAN=""
#DEVICE_JACK=""
# FREQ governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ="/sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu"
DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
# Volume Keys
DEVICE_KEY_VOLUMEDOWN=114
DEVICE_KEY_VOLUMEUP=115
DEVICE_FUNC_KEYA_MODIFIER="BTN_SELECT"
DEVICE_FUNC_KEYB_MODIFIER="BTN_MODE"
EOF

View file

@ -0,0 +1,9 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/010-governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ="/sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu"
DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
EOF

View file

@ -0,0 +1,15 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/020-gpios
DEVICE_WIFI="0"
DEVICE_PWM_MOTOR="pwmchip1"
EOF
. /storage/.config/profile.d/020-gpios
# Enable PWM for rumble and turn rumble off during startup.
echo 0 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/export
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/period
echo 1 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/enable
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/duty_cycle

View file

@ -1,11 +1,14 @@
#!/bin/bash
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
# Copyright (C) 2022-present Fewtarius
. /etc/profile
. /etc/profile.d/001-functions
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode freeze
fi
echo s2idle >/sys/power/mem_sleep

View file

@ -1,8 +1,8 @@
#!/bin/bash
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
cat <<EOF >/storage/.config/profile.d/001-device_config
# Device Features
DEVICE_FAKE_JACKSENSE=true
DEVICE_VOLUMECTL=true
@ -10,23 +10,10 @@ DEVICE_AUDIO_MIXER="DAC"
DEVICE_PLAYBACK_PATH_SPK="1*"
DEVICE_PLAYBACK_PATH_HP="0*"
DEVICE_BRIGHTNESS="128"
DEVICE_JACK="8"
DEVICE_HEADPHONE_DEV="/dev/input/by-path/platform-es8316-sound-event"
DEVICE_HAS_HDMI=true
DEVICE_HDMI_GPIO="54"
DEVICE_WIFI="113"
DEVICE_BATTERY_LED_STATUS=true
DEVICE_PWR_LED_CONTROL=true
UI_SERVICE="weston.service"
DEVICE_TEMP_SENSOR=("/sys/devices/virtual/thermal/thermal_zone0/temp" "/sys/devices/virtual/thermal/thermal_zone1/temp")
# FREQ Governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0" "/sys/devices/system/cpu/cpufreq/policy4")
GPU_FREQ="/sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu"
DMC_FREQ="/sys/devices/platform/memory-controller/devfreq/memory-controller/"
# Affinity
SLOW_CORES="taskset -c 0-3"
FAST_CORES="taskset -c 4-5"
EOF

View file

@ -1,16 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius (https://github.com/fewtarius)
. /etc/profile.d/001-functions
### Set the default performance scaling mode for a few systems.
for SYSTEM in dreamcast n64 psp saturn
do
SETTING=$(get_setting ${SYSTEM})
if [ -z ${SETTING} ]
then
set_setting ${SYSTEM}.cpugovernor performance
fi
done

View file

@ -0,0 +1,10 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius (https://github.com/fewtarius)
# Copyright (C) 2023-present Brooksytech
cat <<EOF >/storage/.config/profile.d/010-governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0" "/sys/devices/system/cpu/cpufreq/policy4")
GPU_FREQ="/sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu"
DMC_FREQ="/sys/devices/platform/memory-controller/devfreq/memory-controller/"
EOF

View file

@ -1,15 +1,8 @@
#!/bin/bash
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
if [ ! -d "/storage/.config/profile.d" ]
then
mkdir -p /storage/.config/profile.d
fi
cat <<EOF >/storage/.config/profile.d/002-fancontrol
cat <<EOF >/storage/.config/profile.d/020-fan_control
DEVICE_HAS_FAN=true
DEVICE_PWM_FAN="/sys/class/hwmon/hwmon1/pwm1"
EOF

View file

@ -0,0 +1,16 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/020-gpios
DEVICE_JACK="8"
DEVICE_HDMI_GPIO="54"
DEVICE_WIFI="113"
EOF
. /storage/.config/profile.d/020-gpios
# Enable PWM for rumble and turn rumble off during startup.
echo 0 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/export
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/period
echo 1 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/enable
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/duty_cycle

View file

@ -1,9 +1,9 @@
#!/bin/bash
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
. /etc/profile
. /storage/.config/profile.d/001-device_config
# Set export GPIO for Wifi and enable
if [ ! -d "/sys/class/gpio/gpio${DEVICE_WIFI}" ]; then

View file

@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
. /etc/profile
. /storage/.config/profile.d/001-device_config
# Set export GPIO for HDMI
if [ ! -d "/sys/class/gpio/gpio${DEVICE_HDMI_GPIO}" ]; then

View file

@ -0,0 +1,9 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/002-audio_path
DEVICE_AUDIO_MIXER="DAC"
DEVICE_PLAYBACK_PATH_SPK="1*"
DEVICE_PLAYBACK_PATH_HP="0*"
EOF

View file

@ -1,34 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
### Set the default TDP if it isn't defined.
MYTDP=$(get_setting system.overclock)
if [ -z "${MYTDP}" ]
then
# Set default TDP
set_settings system.overclock 15w
fi
### Set sleep mode to mem sleep (S3)
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode mem
fi
### Set the default device configuration
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
DEVICE_BASE_TDP="15w"
DEVICE_LED_CONTROL=false
DEVICE_VOLUMECTL=true
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_FUNC_KEYA_MODIFIER="KEY_LEFTCTRL"
DEVICE_FUNC_KEYB_MODIFIER="KEY_D"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"
EOF

View file

@ -1,32 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
. /etc/profile
### Set the default TDP if it isn't defined.
MYTDP=$(get_setting system.overclock)
if [ -z "${MYTDP}" ]
then
# Set default TDP
set_setting system.overclock 15w
fi
### Set sleep mode to mem sleep (S3)
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode mem
fi
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
DEVICE_BASE_TDP="15w"
DEVICE_VOLUMECTL=true
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_FUNC_KEYA_MODIFIER=="ABS_RZ"
DEVICE_FUNC_KEYB_MODIFIER=="ABS_Z"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"
EOF

View file

@ -0,0 +1,8 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
cat <<EOF >/storage/.config/profile.d/050-modifiers
DEVICE_FUNC_KEYA_MODIFIER=="ABS_RZ"
DEVICE_FUNC_KEYB_MODIFIER=="ABS_Z"
EOF

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# Set usbcore.autosuspend to -1
echo -1 > /sys/module/usbcore/parameters/autosuspend

View file

@ -1,33 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
# Device Features
DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=false
DEVICE_SW_HP_SWITCH=true
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_PLAYBACK_PATH="Playback"
DEVICE_PIPEWIRE_PROFILE="pro-audio"
DEVICE_BRIGHTNESS="128"
UI_SERVICE="weston.service"
# GPIOS
DEVICE_TEMP_SENSOR=("/sys/devices/virtual/thermal/thermal_zone0/temp" "/sys/devices/virtual/thermal/thermal_zone3/temp" "/sys/devices/virtual/thermal/thermal_zone2/temp")
# FREQ Governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0" "/sys/devices/system/cpu/cpufreq/policy2")
GPU_FREQ=("/sys/devices/platform/soc/ffe40000.gpu/devfreq/ffe40000.gpu")
# Affinity
SLOW_CORES="taskset -c 0-1"
FAST_CORES="taskset -c 2-5"
# Volume Keys
DEVICE_KEY_VOLUMEDOWN=114
DEVICE_KEY_VOLUMEUP=115
DEVICE_FUNC_KEYA_MODIFIER="BTN_TRIGGER_HAPPY2"
DEVICE_FUNC_KEYB_MODIFIER="BTN_TRIGGER_HAPPY5"
EOF

View file

@ -1,37 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
### Disable blue blinking led
echo none > /sys/class/leds/blue\:/trigger
### Sleep is currently broken, so we'll disable it.
cat <<EOF >/storage/.config/sleep.conf.d/sleep.conf
[Sleep]
AllowSuspend=no
SuspendState=freeze
EOF
### Ignore power button presses for now, until we can finish up fixing sleep.
cat <<EOF >~/.config/logind.conf.d/login.conf
[Login]
HandlePowerKey=ignore
HandleSuspendKey=ignore
EOF
### Set sound properties
amixer -c 0 -q sset 'FRDDR_A SINK 1 SEL' 'OUT 1'
amixer -c 0 -q sset 'FRDDR_A SRC 1 EN' 'on'
### Set correct audio output device at boot.
HEADPHONE_ENABLE="$(get_setting headphone.enabled)"
if [ "${HEADPHONE_ENABLE}" = "1" ]
then
amixer -c0 sset "Playback Mux" "HP"
else
amixer -c0 sset "Playback Mux" "SPK"
fi

View file

@ -1,14 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
DEVICE_VOLUMECTL=true
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_FUNC_KEYA_MODIFIER=="ABS_RZ"
DEVICE_FUNC_KEYB_MODIFIER=="ABS_Z"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"
EOF

View file

@ -1,17 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
if [ ! -e "/storage/.quirks" ]
then
echo 19000 > /sys/class/backlight/$(brightness device)/brightness
touch /storage/.quirks
fi
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode mem
fi

View file

@ -10,10 +10,4 @@ DEVICE_SW_HP_SWITCH=true
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_BRIGHTNESS="128"
UI_SERVICE="weston.service"
# FREQ governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ=("/sys/devices/platform/ff400000.gpu/devfreq/ff400000.gpu")
EOF

View file

@ -1,19 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
# Device Features
DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=false
DEVICE_SW_HP_SWITCH=true
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_BRIGHTNESS="128"
UI_SERVICE="weston.service"
# FREQ governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ=("/sys/devices/platform/ff400000.gpu/devfreq/ff400000.gpu")
EOF

View file

@ -1,11 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode freeze
fi

View file

@ -8,17 +8,11 @@ DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=false
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_FUNC_KEYA_MODIFIER="BTN_SELECT"
DEVICE_FUNC_KEYB_MODIFIER="BTN_START"
DEVICE_SW_HP_SWITCH=true
DEVICE_BRIGHTNESS="128"
DEVICE_VOLUME="100"
DEVICE_BATTERY_LED_STATUS=true
DEVICE_PWR_LED_GPIO="77"
DEVICE_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone0/temp"
UI_SERVICE="weston.service"
# FREQ governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ=("/sys/devices/platform/ff400000.gpu/devfreq/ff400000.gpu")
DMC_FREQ=("/sys/devices/platform/dmc/devfreq/dmc")
EOF

View file

@ -1,11 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode freeze
fi

View file

@ -9,10 +9,4 @@ DEVICE_POWER_LED=false
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_BRIGHTNESS="128"
UI_SERVICE="weston.service"
# FREQ governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ=("/sys/devices/platform/ff400000.gpu/devfreq/ff400000.gpu")
EOF

View file

@ -1,11 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode freeze
fi

View file

@ -1,23 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
# Copyright (C) 2022-present Brooksytech
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
DEVICE_VOLUMECTL=true
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="128"
# GPIOS
DEVICE_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone*/temp"
# FREQ Governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0" "/sys/devices/system/cpu/cpufreq/policy4" "/sys/devices/system/cpu/cpufreq/policy6")
GPU_FREQ=("/sys/devices/platform/fb000000.gpu/devfreq/fb000000.gpu")
# Affinity
SLOW_CORES="taskset -c 0-3"
FAST_CORES="taskset -c 4-7"
EOF

View file

@ -1,14 +1,7 @@
#!/bin/bash
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Brooksytech (https://github.com/brooksytech)
. /etc/profile
# Enable verticle USB Port
echo host > /sys/kernel/debug/usb/fc000000.usb/mode
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode mem
fi

View file

@ -1,33 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
# Device Features
DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=false
DEVICE_PLAYBACK_PATH_SPK="HP"
DEVICE_PLAYBACK_PATH_HP="SPK"
DEVICE_PLAYBACK_PATH="Playback"
DEVICE_BRIGHTNESS="128"
DEVICE_PIPEWIRE_PROFILE="pro-audio"
DEVICE_BATTERY_LED_STATUS=true
UI_SERVICE="weston.service"
# GPIOS
DEVICE_TEMP_SENSOR=("/sys/devices/virtual/thermal/thermal_zone0/temp" "/sys/devices/virtual/thermal/thermal_zone3/temp" "/sys/devices/virtual/thermal/thermal_zone2/temp")
# FREQ Governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0" "/sys/devices/system/cpu/cpufreq/policy2")
GPU_FREQ=("/sys/devices/platform/soc/ffe40000.gpu/devfreq/ffe40000.gpu")
# Affinity
SLOW_CORES="taskset -c 0-1"
FAST_CORES="taskset -c 2-5"
# Volume Keys
DEVICE_KEY_VOLUMEDOWN=114
DEVICE_KEY_VOLUMEUP=115
DEVICE_FUNC_KEYA_MODIFIER="BTN_TRIGGER_HAPPY2"
DEVICE_FUNC_KEYB_MODIFIER="BTN_TRIGGER_HAPPY5"
EOF

View file

@ -0,0 +1,8 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/50-audio_path
DEVICE_PLAYBACK_PATH_SPK="HP"
DEVICE_PLAYBACK_PATH_HP="SPK"
EOF

View file

@ -1,33 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
# Device Features
DEVICE_FAKE_JACKSENSE=false
DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=false
DEVICE_PLAYBACK_PATH_SPK="HP"
DEVICE_PLAYBACK_PATH_HP="SPK"
#DEVICE_HEADPHONE_DEV=""
DEVICE_BRIGHTNESS="128"
UI_SERVICE="emustation.service"
# GPIOS
DEVICE_WIFI="0"
#DEVICE_LED=""
DEVICE_PWM_MOTOR="pwmchip1"
#DEVICE_PWM_FAN=""
#DEVICE_JACK=""
# FREQ governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ="/sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu"
DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
# Volume Keys
DEVICE_KEY_VOLUMEDOWN=114
DEVICE_KEY_VOLUMEUP=115
DEVICE_FUNC_KEYA_MODIFIER="BTN_SELECT"
DEVICE_FUNC_KEYB_MODIFIER="BTN_START"
EOF

View file

@ -1,16 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius (https://github.com/fewtarius)
. /etc/profile.d/001-functions
### Set the default performance scaling mode for a few systems.
for SYSTEM in dreamcast n64 psp saturn
do
SETTING=$(get_setting ${SYSTEM})
if [ -z ${SETTING} ]
then
set_setting ${SYSTEM}.cpugovernor performance
fi
done

View file

@ -0,0 +1,9 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/010-governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ="/sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu"
DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
EOF

View file

@ -0,0 +1,15 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/020-gpios
DEVICE_WIFI="0"
DEVICE_PWM_MOTOR="pwmchip1"
EOF
. /storage/.config/profile.d/020-gpios
# Enable PWM for rumble and turn rumble off during startup.
echo 0 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/export
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/period
echo 1 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/enable
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/duty_cycle

View file

@ -1,11 +1,14 @@
#!/bin/bash
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
# Copyright (C) 2022-present Fewtarius
. /etc/profile
. /etc/profile.d/001-functions
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode freeze
fi
echo s2idle >/sys/power/mem_sleep

View file

@ -1,38 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
# Device Features
DEVICE_FAKE_JACKSENSE=true
DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=false
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
#DEVICE_HEADPHONE_DEV=""
DEVICE_BRIGHTNESS="128"
DEVICE_ROTATED_SDL=true
HDMI_STATE="/sys/class/extcon/hdmi/state"
HDMI_DETECT_PATTERN="HDMI=1"
UI_SERVICE="emustation.service"
# GPIOS
DEVICE_WIFI="0"
#DEVICE_LED=""
DEVICE_PWM_MOTOR="pwmchip1"
#DEVICE_PWM_FAN=""
#DEVICE_JACK=""
# FREQ governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ="/sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu"
DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
# Volume Keys
DEVICE_KEY_VOLUMEDOWN=114
DEVICE_KEY_VOLUMEUP=115
DEVICE_FUNC_KEYA_MODIFIER="BTN_SELECT"
DEVICE_FUNC_KEYB_MODIFIER="BTN_START"
EOF

View file

@ -1,16 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius (https://github.com/fewtarius)
. /etc/profile.d/001-functions
### Set the default performance scaling mode for a few systems.
for SYSTEM in dreamcast n64 psp saturn
do
SETTING=$(get_setting ${SYSTEM})
if [ -z ${SETTING} ]
then
set_setting ${SYSTEM}.cpugovernor performance
fi
done

View file

@ -1,14 +0,0 @@
!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
. /etc/profile
#Set up gzdoom
if [ ! -d "/storage/.config/gzdoom/" ]; then
cp -rf /usr/config/gzdoom /storage/.config/
sed -i '/Joy10=/c\Joy10=togglemap;
/Joy9=/c\Joy9=menu_main;
/vid_defheight=/c\vid_defheight=720;
/vid_defwidth=/c\vid_defwidth=1280' /storage/.config/gzdoom/gzdoom.ini
fi

View file

@ -0,0 +1,9 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/010-governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ="/sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu"
DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
EOF

View file

@ -0,0 +1,15 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/020-gpios
DEVICE_WIFI="0"
DEVICE_PWM_MOTOR="pwmchip1"
EOF
. /storage/.config/profile.d/020-gpios
# Enable PWM for rumble and turn rumble off during startup.
echo 0 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/export
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/period
echo 1 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/enable
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/duty_cycle

View file

@ -1,4 +1,4 @@
!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)

View file

@ -1,33 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
. /etc/profile
### Set the default TDP if it isn't defined.
MYTDP=$(get_setting system.overclock)
if [ -z "${MYTDP}" ]
then
# Set default TDP
set_setting system.overclock 15w
fi
### Set sleep mode to mem sleep (S3)
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode mem
fi
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
DEVICE_BASE_TDP="15w"
DEVICE_VOLUMECTL=true
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_FUNC_KEYA_MODIFIER="KEY_LEFTCTRL"
DEVICE_FUNC_KEYB_MODIFIER="KEY_D"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"
EOF

View file

@ -1,15 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
if [ ! -d "/storage/.config/profile.d" ]
then
mkdir -p /storage/.config/profile.d
fi
cat <<EOF >/storage/.config/profile.d/002-fancontrol
DEVICE_HAS_FAN=false
EOF

View file

@ -1,14 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
MYDEVICE=$(get_setting system.audiodevice)
if [ -z "${MYDEVICE}" ]
then
### Set the audio device.
set-audio set "ALC269VB (1:0)"
set-audio esset "Master"
fi

View file

@ -0,0 +1,14 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
. /etc/profile.d/001-functions
### Set the default device configuration
cat <<EOF >/storage/.config/profile.d/001-device_config
DEVICE_BASE_TDP="15w"
DEVICE_LED_CONTROL=false
DEVICE_HAS_FAN=false
DEVICE_VOLUMECTL=true
DEVICE_BRIGHTNESS="hardware"
EOF

View file

@ -1,34 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
. /etc/profile
### Set the default TDP if it isn't defined.
MYTDP=$(get_setting system.overclock)
if [ -z "${MYTDP}" ]
then
# Set default TDP
set_setting system.overclock 15w
fi
### Set sleep mode to mem sleep (S3)
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode mem
fi
### Set the default device configuration
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
DEVICE_BASE_TDP="15w"
DEVICE_LED_CONTROL=true
DEVICE_VOLUMECTL=true
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_FUNC_KEYA_MODIFIER="KEY_RIGHTCTRL"
DEVICE_FUNC_KEYB_MODIFIER="KEY_D"
UI_SERVICE="weston.service"
DEVICE_BRIGHTNESS="hardware"
EOF

View file

@ -0,0 +1,14 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
. /etc/profile.d/001-functions
### Set the default TDP if it isn't defined.
MYTDP=$(get_setting system.overclock)
if [ -z "${MYTDP}" ]
then
# Set default TDP
set_setting system.overclock 15w
fi
EOF

View file

@ -1,11 +1,13 @@
#!/bin/bash
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
# Copyright (C) 2022-present Fewtarius
. /etc/profile
. /etc/profile.d/001-functions
### Set sleep mode to mem sleep (S3)
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -z "${MYSLEEPMODE}" ]
then
/usr/bin/setsuspendmode mem
fi

View file

@ -0,0 +1,9 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/002-audio_path
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_PLAYBACK_PATH="Playback Path"
EOF

View file

@ -0,0 +1,8 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
cat <<EOF >/storage/.config/profile.d/050-modifiers
DEVICE_FUNC_KEYA_MODIFIER="KEY_RIGHTCTRL"
DEVICE_FUNC_KEYB_MODIFIER="KEY_D"
EOF

View file

@ -0,0 +1,8 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
### Set the default device configuration
cat <<EOF >/storage/.config/profile.d/090-ui_service
UI_SERVICE="weston.service"
EOF

View file

@ -0,0 +1,9 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/010-governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ=("/sys/devices/platform/ff400000.gpu/devfreq/ff400000.gpu")
DMC_FREQ=("/sys/devices/platform/dmc/devfreq/dmc")
EOF

View file

@ -0,0 +1,7 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/002-audio_path
DEVICE_PLAYBACK_PATH="Playback Mux"
EOF

View file

@ -0,0 +1,8 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
cat <<EOF >/storage/.config/profile.d/050-modifiers
DEVICE_FUNC_KEYA_MODIFIER="BTN_SELECT"
DEVICE_FUNC_KEYB_MODIFIER="BTN_START"
EOF

View file

@ -0,0 +1,8 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
### Set the default device configuration
cat <<EOF >/storage/.config/profile.d/090-ui_service
UI_SERVICE="weston.service"
EOF

View file

@ -0,0 +1,9 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
# Copyright (C) 2022-present Brooksytech
cat <<EOF >/storage/.config/profile.d/040-affinity
SLOW_CORES="taskset -c 0-3"
FAST_CORES="taskset -c 4-5"
EOF

View file

@ -0,0 +1,10 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
cat <<EOF >/storage/.config/profile.d/050-modifiers
DEVICE_KEY_VOLUMEDOWN=114
DEVICE_KEY_VOLUMEUP=115
DEVICE_FUNC_KEYA_MODIFIER="BTN_SELECT"
DEVICE_FUNC_KEYB_MODIFIER="BTN_MODE"
EOF

View file

@ -0,0 +1,8 @@
#!/bin/sh
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022-present Fewtarius
### Set the default device configuration
cat <<EOF >/storage/.config/profile.d/090-ui_service
UI_SERVICE="weston.service"
EOF

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