Merge pull request #814 from fewtarius/dev
Improve support for AYANEO AIR and AIR PRO.
This commit is contained in:
commit
7d4d47fc3d
55 changed files with 5229 additions and 70 deletions
|
@ -24,7 +24,7 @@ fi
|
|||
|
||||
PKG_BASEOS="plymouth-lite grep wget libjpeg-turbo util-linux xmlstarlet bluetool gnupg gzip patchelf \
|
||||
imagemagick terminus-font vim bash pyudev dialog six git dbus-python coreutils miniupnpc \
|
||||
nss-mdns avahi alsa-ucm-conf MC fbgrab modules system-utils"
|
||||
nss-mdns avahi alsa-ucm-conf MC fbgrab modules system-utils autostart"
|
||||
|
||||
PKG_UI="emulationstation es-themes"
|
||||
|
||||
|
@ -113,17 +113,6 @@ post_install() {
|
|||
mkdir -p ${INSTALL}/etc/profile.d
|
||||
cp ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/device.config ${INSTALL}/etc/profile.d/01-deviceconfig
|
||||
|
||||
# Split this up into other packages
|
||||
cp ${PKG_DIR}/sources/autostart/autostart ${INSTALL}/usr/bin
|
||||
mkdir -p ${INSTALL}/usr/lib/autostart/common
|
||||
mkdir -p ${INSTALL}/usr/lib/autostart/daemons
|
||||
cp ${PKG_DIR}/sources/autostart/common/* ${INSTALL}/usr/lib/autostart/common
|
||||
cp ${PKG_DIR}/sources/autostart/daemons/* ${INSTALL}/usr/lib/autostart/daemons
|
||||
mkdir -p ${INSTALL}/usr/lib/autostart/quirks
|
||||
cp -r ${PKG_DIR}/sources/autostart/quirks/* ${INSTALL}/usr/lib/autostart/quirks
|
||||
chmod -R 0755 ${INSTALL}/usr/lib/autostart ${INSTALL}/usr/bin/autostart
|
||||
enable_service jelos-autostart.service
|
||||
|
||||
if [ ! -d "${INSTALL}/usr/share" ]
|
||||
then
|
||||
mkdir "${INSTALL}/usr/share"
|
||||
|
@ -144,6 +133,9 @@ EOF
|
|||
chmod 0755 ${INSTALL}/usr/bin/* ||:
|
||||
enable_service jelos-automount.service
|
||||
|
||||
### Fix and migrate to autostart package
|
||||
enable_service jelos-autostart.service
|
||||
|
||||
if [ -d "${PKG_DIR}/sources/asound/${DEVICE}" ]
|
||||
then
|
||||
cp ${PKG_DIR}/sources/asound/${DEVICE}/* ${INSTALL}/usr/config/
|
||||
|
|
|
@ -1,19 +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
|
||||
if [ ! -e "/storage/.config/profile.d/001-wifi_module" ]
|
||||
then
|
||||
cat <<EOF >/storage/.config/profile.d/001-wifi_module
|
||||
DEVICE_INTERNAL_WIFI=true
|
||||
DEVICE_WIFI_MODULE="mt7921e"
|
||||
DEVICE_WIFI_MODULE_SLEEPS=false
|
||||
EOF
|
||||
chmod 0755 /storage/.config/profile.d/001-wifi_module
|
||||
fi
|
|
@ -70,7 +70,7 @@ done
|
|||
|
||||
# temperature
|
||||
# Unit: millidegree Celsius
|
||||
TEMPE=$(cat /sys/devices/virtual/thermal/thermal_zone*/temp 2>/dev/null | sort -rn | head -1 | sed -e s+"[0-9][0-9][0-9]$"++)
|
||||
TEMPE=$(cat ${DEVICE_TEMP_SENSOR} 2>/dev/null | sort -rn | head -1 | sed -e s+"[0-9][0-9][0-9]$"++)
|
||||
echo "SYSTEM INFORMATION:"
|
||||
echo "OPERATING SYSTEM: ${OS_NAME}"
|
||||
echo "VERSION: ${OS_VERSION}"
|
||||
|
|
|
@ -11,13 +11,34 @@ SPLASH_TYPE="$1"
|
|||
|
||||
hres="$(fbset 2>/dev/null | awk '/geometry/ { print $2 }')"
|
||||
vres="$(fbset 2>/dev/null | awk '/geometry/ { print $3 }')"
|
||||
rotation="$(cat /sys/devices/virtual/graphics/fbcon/rotate)"
|
||||
|
||||
if [ "${SPLASH_TYPE}" == "intro" ] || [ "${SPLASH_TYPE}" == "exit" ]
|
||||
then
|
||||
if [ ${vres} -gt ${hres} ]
|
||||
if [ ${vres} -gt ${hres} ] && \
|
||||
[ -e "/usr/config/splash/splashl.png" ]
|
||||
then
|
||||
### When we have a device specific splash
|
||||
SPLASH="/usr/config/splash/splashl.png"
|
||||
elif [ ! -e "/usr/config/splash/splashl.png" ]
|
||||
then
|
||||
### When we don't define a splash
|
||||
case ${rotation} in
|
||||
0)
|
||||
SPLASH="/usr/config/splash/splash.png"
|
||||
;;
|
||||
1)
|
||||
SPLASH="/usr/config/splash/splash_90.png"
|
||||
;;
|
||||
2)
|
||||
SPLASH="/usr/config/splash/splash_180.png"
|
||||
;;
|
||||
3)
|
||||
SPLASH="/usr/config/splash/splash_270.png"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
### When we don't know what to do.
|
||||
SPLASH="/usr/config/splash/splash.png"
|
||||
fi
|
||||
else
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Copyright (C) 2021-present Fewtarius
|
||||
|
||||
PKG_NAME="RTL8812AU"
|
||||
PKG_VERSION="b7c68a25d41cf14da9f7176ccc260d6efba5c5db"
|
||||
PKG_VERSION="65949c530359ece8f28c84516f4d17fe7ab7d897"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/morrownr/8812au-20210629"
|
||||
PKG_URL="${PKG_SITE}.git"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Copyright (C) 2021-present Fewtarius
|
||||
|
||||
PKG_NAME="RTL8814AU"
|
||||
PKG_VERSION="3f2f6805617bcfef66f2fd2129acbc87b181fd36"
|
||||
PKG_VERSION="932df6f7da6c3a384cf91f33eb195097eb0cb6c5"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/morrownr/8814au"
|
||||
PKG_URL="${PKG_SITE}.git"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Copyright (C) 2021-present Fewtarius
|
||||
|
||||
PKG_NAME="RTL8821AU"
|
||||
PKG_VERSION="b46c98dec45ae413add32b04a96253979b858bc6"
|
||||
PKG_VERSION="663dc8fe1fbc100be9ed532f003c6eb90dab3d33"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/morrownr/8821au-20210708"
|
||||
PKG_URL="${PKG_SITE}.git"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Copyright (C) 2021-present Fewtarius
|
||||
|
||||
PKG_NAME="RTL8821CU"
|
||||
PKG_VERSION="122ef09302885dfe2cb9ec9cf16a7df699d1cadb"
|
||||
PKG_VERSION="86cc5ceb7c28b9b997838e1c796847f6c395c382"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/morrownr/8821cu-20210118"
|
||||
PKG_URL="${PKG_SITE}.git"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Copyright (C) 2021-present Fewtarius
|
||||
|
||||
PKG_NAME="RTL88x2BU"
|
||||
PKG_VERSION="6a2916db1a01625b9f2fc77d466f07e498735c44"
|
||||
PKG_VERSION="9a04d2bb9d882c7f2708560774d7b96a70d83f4b"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/morrownr/88x2bu-20210702"
|
||||
PKG_URL="${PKG_SITE}.git"
|
||||
|
|
4845
packages/kernel/linux/patches/X86_64/001-hwsensors.patch
Normal file
4845
packages/kernel/linux/patches/X86_64/001-hwsensors.patch
Normal file
File diff suppressed because it is too large
Load diff
246
packages/kernel/linux/patches/X86_64/002-ayaneo-sensors.patch
Normal file
246
packages/kernel/linux/patches/X86_64/002-ayaneo-sensors.patch
Normal file
|
@ -0,0 +1,246 @@
|
|||
From mboxrd@z Thu Jan 1 00:00:00 1970
|
||||
Return-Path: <linux-kernel-owner@kernel.org>
|
||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
||||
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
|
||||
by smtp.lore.kernel.org (Postfix) with ESMTP id EEFD6C4332F
|
||||
for <linux-kernel@archiver.kernel.org>; Wed, 14 Dec 2022 15:48:10 +0000 (UTC)
|
||||
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
||||
id S238903AbiLNPsJ (ORCPT <rfc822;linux-kernel@archiver.kernel.org>);
|
||||
Wed, 14 Dec 2022 10:48:09 -0500
|
||||
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50528 "EHLO
|
||||
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
|
||||
with ESMTP id S238850AbiLNPrd (ORCPT
|
||||
<rfc822;linux-kernel@vger.kernel.org>);
|
||||
Wed, 14 Dec 2022 10:47:33 -0500
|
||||
Received: from mail-oo1-xc34.google.com (mail-oo1-xc34.google.com [IPv6:2607:f8b0:4864:20::c34])
|
||||
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEC4A27FE6;
|
||||
Wed, 14 Dec 2022 07:47:17 -0800 (PST)
|
||||
Received: by mail-oo1-xc34.google.com with SMTP id f184-20020a4a58c1000000b004a3c01646a0so2310106oob.12;
|
||||
Wed, 14 Dec 2022 07:47:17 -0800 (PST)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=gmail.com; s=20210112;
|
||||
h=content-transfer-encoding:mime-version:references:in-reply-to
|
||||
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
|
||||
:message-id:reply-to;
|
||||
bh=MB+cjJ0APVSPLYKSXokJmYfJJzb5hyUnGFn3uvrOCQs=;
|
||||
b=VknEFKrJmu9Pr/B/X9LlnnHGqp1nZzP9w+qqAkBG+UBa5JNhLLcWpOlBltqY/z9/7+
|
||||
yd/oHDf6H8tbtxDUCWGQbI2O9B7Cq+P/cB0vV0cIuUDigV1N/ZMx5dtjATaUcwo+Zrjl
|
||||
pmdtVyaS8CoZuYBs9Kqfs1DR/B5acRfI25qWN6pkBgKx8b1DrswACaCx29NwOzKrtjYj
|
||||
GMdHgzxZIefyoePCFeX3IxhD5rOIoyFRtUMWQ3yPdmM/KVlwUPT8od2t7PxnIcfW4PLG
|
||||
3ztosdgEWlInX6BtPzv4V7SZx3DXs5KGg3hQsA93dc30TbVwo8p0iGSxREgbbRITpz74
|
||||
IU+g==
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20210112;
|
||||
h=content-transfer-encoding:mime-version:references:in-reply-to
|
||||
:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
|
||||
:subject:date:message-id:reply-to;
|
||||
bh=MB+cjJ0APVSPLYKSXokJmYfJJzb5hyUnGFn3uvrOCQs=;
|
||||
b=gJSFFXFO0IF56KU5C3PhOBBKUC5CCCJX0g1n6EL4TWuaRxI6spTFWE1dC9LqtvM4uh
|
||||
bkdrpXOGgHSCGK7ZtQiqjwb7SrmbgC4HgikinJc/bS0fbF/fFrpmVSF+OKaz2JeJNJAt
|
||||
7Veor+PQn8vK91kTmKT6J9oJ8OZ3EKPmjTgdhDBI2+Fy4NO7U+tBPurecFA7M3yu+gGH
|
||||
PDkKs5qW48VfmpzovIyvDw1bVWwUp+AIj6W0ht9AIKKsWaNbF5LsshLyRF4TR34Q00r1
|
||||
MBWR3ysNw0cAMO/HN7ESaTVCimbcZrACYh9gUxnhbF4CdgTOQo625JjsESmqhVEvjseC
|
||||
QFFA==
|
||||
X-Gm-Message-State: ANoB5plWAiyiI7vMPOkGQW+T6H38IIy8U9DdPTldcBUkaNvcBJ+RiUqa
|
||||
fWsx0XmVox36DHMI8L5ivtk=
|
||||
X-Google-Smtp-Source: AA0mqf4haL+cQbuRxCnem1h+c5sf2MFQ7DNmFMcC4n1xjH0BM9e9aVMOR8ADEbdobsXs41hj7MitqA==
|
||||
X-Received: by 2002:a4a:e511:0:b0:4a0:9e4e:11ac with SMTP id r17-20020a4ae511000000b004a09e4e11acmr11549450oot.7.1671032837009;
|
||||
Wed, 14 Dec 2022 07:47:17 -0800 (PST)
|
||||
Received: from localhost.localdomain (108-228-232-20.lightspeed.sndgca.sbcglobal.net. [108.228.232.20])
|
||||
by smtp.gmail.com with ESMTPSA id v9-20020a4ae049000000b004a3543fbfbbsm2386367oos.14.2022.12.14.07.47.16
|
||||
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
|
||||
Wed, 14 Dec 2022 07:47:16 -0800 (PST)
|
||||
From: "Derek J. Clark" <derekjohn.clark@gmail.com>
|
||||
To: linux@roeck-us.net
|
||||
Cc: "Derek J. Clark" <derekjohn.clark@gmail.com>,
|
||||
Jean Delvare <jdelvare@suse.com>,
|
||||
Jonathan Corbet <corbet@lwn.net>,
|
||||
=?UTF-8?q?Joaqu=C3=ADn=20Ignacio=20Aramend=C3=ADa?=
|
||||
<samsagax@gmail.com>, linux-hwmon@vger.kernel.org,
|
||||
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
|
||||
Subject: [PATCH v2] hwmon: (oxp-sensors) Add AYANEO AIR and AIR Pro
|
||||
Date: Wed, 14 Dec 2022 07:47:13 -0800
|
||||
Message-Id: <20221214154713.100648-1-derekjohn.clark@gmail.com>
|
||||
X-Mailer: git-send-email 2.38.1
|
||||
In-Reply-To: <Y5lBue87IXkhNs42@debian.me>
|
||||
References: <Y5lBue87IXkhNs42@debian.me>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Precedence: bulk
|
||||
List-ID: <linux-kernel.vger.kernel.org>
|
||||
X-Mailing-List: linux-kernel@vger.kernel.org
|
||||
|
||||
Add support for the AYANEO AIR and AYANEO AIR Pro models of handheld
|
||||
devices. These devices use the same EC registers and logic as the One X
|
||||
Player mini AMD. Previous AYANEO models are not supported as they use a
|
||||
different EC and do not have the necessary fan speed write enable and
|
||||
setting registers. Tihe driver is tested on Aya Neo AIR while AIR Pro
|
||||
model EC functionality and DMI data were verified using command line
|
||||
tools by another user.
|
||||
|
||||
The added devices are:
|
||||
- AYANEO AIR (AMD 5560U)
|
||||
- AYANEO AIR Pro (AMD 5560U)
|
||||
- AYANEO AIR Pro (AMD 5825U)
|
||||
|
||||
Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
|
||||
---
|
||||
Documentation/hwmon/oxp-sensors.rst | 19 ++++++----
|
||||
MAINTAINERS | 1 +
|
||||
drivers/hwmon/oxp-sensors.c | 54 ++++++++++++++++++++++++-----
|
||||
3 files changed, 59 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/Documentation/hwmon/oxp-sensors.rst b/Documentation/hwmon/oxp-sensors.rst
|
||||
index 39c588ec5c50..a53c961065b2 100644
|
||||
--- a/Documentation/hwmon/oxp-sensors.rst
|
||||
+++ b/Documentation/hwmon/oxp-sensors.rst
|
||||
@@ -3,18 +3,21 @@
|
||||
Kernel driver oxp-sensors
|
||||
=========================
|
||||
|
||||
-Author:
|
||||
+Authors:
|
||||
+ - Derek John Clark <derekjohn.clark@gmail.com>
|
||||
- Joaquín Ignacio Aramendía <samsagax@gmail.com>
|
||||
|
||||
-Description:
|
||||
+Description
|
||||
------------
|
||||
|
||||
-One X Player devices from One Netbook provide fan readings and fan control
|
||||
-through its Embedded Controller.
|
||||
+Handheld devices from One Netbook and Aya Neo provide fan readings and fan
|
||||
+control through their embedded controllers.
|
||||
|
||||
-Currently only supports AMD boards from the One X Player and AOK ZOE lineup.
|
||||
-Intel boards could be supported if we could figure out the EC registers and
|
||||
-values to write to since the EC layout and model is different.
|
||||
+Currently only supports AMD boards from One X Player, AOK ZOE, and some Aya
|
||||
+Neo devices. One X PLayer Intel boards could be supported if we could figure
|
||||
+out the EC registers and values to write to since the EC layout and model is
|
||||
+different. Aya Neo devices preceding the AIR may not be usable as the EC model
|
||||
+is different and do not appear to have manual control capabiltities.
|
||||
|
||||
Supported devices
|
||||
-----------------
|
||||
@@ -22,6 +25,8 @@ Supported devices
|
||||
Currently the driver supports the following handhelds:
|
||||
|
||||
- AOK ZOE A1
|
||||
+ - Aya Neo AIR
|
||||
+ - Aya Neo AIR Pro
|
||||
- OneXPlayer AMD
|
||||
- OneXPlayer mini AMD
|
||||
- OneXPlayer mini AMD PRO
|
||||
diff --git a/MAINTAINERS b/MAINTAINERS
|
||||
index 90220659206c..8bce95170f12 100644
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -15346,6 +15346,7 @@ F: drivers/mtd/nand/onenand/
|
||||
F: include/linux/mtd/onenand*.h
|
||||
|
||||
ONEXPLAYER FAN DRIVER
|
||||
+M: Derek John Clark <derekjohn.clark@gmail.com>
|
||||
M: Joaquín Ignacio Aramendía <samsagax@gmail.com>
|
||||
L: linux-hwmon@vger.kernel.org
|
||||
S: Maintained
|
||||
diff --git a/drivers/hwmon/oxp-sensors.c b/drivers/hwmon/oxp-sensors.c
|
||||
index f84ec8f8eda9..7adc0199ea66 100644
|
||||
--- a/drivers/hwmon/oxp-sensors.c
|
||||
+++ b/drivers/hwmon/oxp-sensors.c
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
- * Platform driver for OXP Handhelds that expose fan reading and control
|
||||
- * via hwmon sysfs.
|
||||
+ * Platform driver for Handhelds that expose fan reading and control via
|
||||
+ * hwmon sysfs.
|
||||
*
|
||||
- * Old boards have the same DMI strings and they are told appart by the
|
||||
- * boot cpu vendor (Intel/AMD). Currently only AMD boards are supported
|
||||
- * but the code is made to be simple to add other handheld boards in the
|
||||
- * future.
|
||||
+ * Old OXP boards have the same DMI strings and they are told appart by
|
||||
+ * the boot cpu vendor (Intel/AMD). Currently only AMD boards are
|
||||
+ * supported but the code is made to be simple to add other handheld
|
||||
+ * boards in the future.
|
||||
* Fan control is provided via pwm interface in the range [0-255].
|
||||
* Old AMD boards use [0-100] as range in the EC, the written value is
|
||||
* scaled to accommodate for that. Newer boards like the mini PRO and
|
||||
@@ -42,6 +42,8 @@ static bool unlock_global_acpi_lock(void)
|
||||
|
||||
enum oxp_board {
|
||||
aok_zoe_a1 = 1,
|
||||
+ aya_neo_air,
|
||||
+ aya_neo_air_pro,
|
||||
oxp_mini_amd,
|
||||
oxp_mini_amd_pro,
|
||||
};
|
||||
@@ -60,6 +62,20 @@ static const struct dmi_system_id dmi_table[] = {
|
||||
},
|
||||
.driver_data = (void *) &(enum oxp_board) {aok_zoe_a1},
|
||||
},
|
||||
+ {
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
|
||||
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "AIR"),
|
||||
+ },
|
||||
+ .driver_data = (void *) &(enum oxp_board) {aya_neo_air},
|
||||
+ },
|
||||
+ {
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
|
||||
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "AIR Pro"),
|
||||
+ },
|
||||
+ .driver_data = (void *) &(enum oxp_board) {aya_neo_air_pro},
|
||||
+ },
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
|
||||
@@ -161,8 +177,19 @@ static int oxp_platform_read(struct device *dev, enum hwmon_sensor_types type,
|
||||
ret = read_from_ec(OXP_SENSOR_PWM_REG, 1, val);
|
||||
if (ret)
|
||||
return ret;
|
||||
- if (board == oxp_mini_amd)
|
||||
+ switch (board) {
|
||||
+ case aok_zoe_a1:
|
||||
+ break;
|
||||
+ case aya_neo_air:
|
||||
+ case aya_neo_air_pro:
|
||||
+ case oxp_mini_amd:
|
||||
*val = (*val * 255) / 100;
|
||||
+ break;
|
||||
+ case oxp_mini_amd_pro:
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
return 0;
|
||||
case hwmon_pwm_enable:
|
||||
return read_from_ec(OXP_SENSOR_PWM_ENABLE_REG, 1, val);
|
||||
@@ -191,8 +218,19 @@ static int oxp_platform_write(struct device *dev, enum hwmon_sensor_types type,
|
||||
case hwmon_pwm_input:
|
||||
if (val < 0 || val > 255)
|
||||
return -EINVAL;
|
||||
- if (board == oxp_mini_amd)
|
||||
+ switch (board) {
|
||||
+ case aok_zoe_a1:
|
||||
+ break;
|
||||
+ case aya_neo_air:
|
||||
+ case aya_neo_air_pro:
|
||||
+ case oxp_mini_amd:
|
||||
val = (val * 100) / 255;
|
||||
+ break;
|
||||
+ case oxp_mini_amd_pro:
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
return write_to_ec(dev, OXP_SENSOR_PWM_REG, val);
|
||||
default:
|
||||
break;
|
||||
--
|
||||
2.38.1
|
||||
|
26
packages/sysutils/autostart/package.mk
Normal file
26
packages/sysutils/autostart/package.mk
Normal file
|
@ -0,0 +1,26 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
PKG_NAME="autostart"
|
||||
PKG_VERSION="$(date +%Y%m%d)"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="apache2"
|
||||
PKG_SITE=""
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SHORTDESC="Autostart is a systemd helper that starts/configures device specific services and parameters."
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/bin
|
||||
cp ${PKG_DIR}/sources/autostart ${INSTALL}/usr/bin
|
||||
mkdir -p ${INSTALL}/usr/lib/autostart/common
|
||||
mkdir -p ${INSTALL}/usr/lib/autostart/daemons
|
||||
cp ${PKG_DIR}/sources/common/* ${INSTALL}/usr/lib/autostart/common
|
||||
cp ${PKG_DIR}/sources/daemons/* ${INSTALL}/usr/lib/autostart/daemons
|
||||
chmod -R 0755 ${INSTALL}/usr/lib/autostart ${INSTALL}/usr/bin/autostart
|
||||
mkdir -p ${INSTALL}/usr/lib/autostart/quirks
|
||||
cp -r ${PKG_DIR}/sources/quirks/* ${INSTALL}/usr/lib/autostart/quirks
|
||||
}
|
|
@ -16,3 +16,8 @@ then
|
|||
set-audio esset "Master"
|
||||
reboot
|
||||
fi
|
||||
|
||||
### Disables speaker output when headphones are connected.
|
||||
alsactl restore -f /storage/.config/asound.state
|
||||
/usr/bin/amixer -c 1 sset "Auto-Mute Mode" Enabled
|
||||
alsactl store -f /storage/.config/asound.state
|
|
@ -0,0 +1,18 @@
|
|||
#!/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=true
|
||||
DEVICE_PWM_FAN="/sys/devices/platform/oxp-platform/hwmon/hwmon4/pwm1"
|
||||
DEVICE_TEMP_SENSOR="/sys/class/hwmon/*/temp1_input"
|
||||
echo 1 >/sys/devices/platform/oxp-platform/hwmon/hwmon4/pwm1_enable
|
||||
EOF
|
||||
|
|
@ -485,17 +485,36 @@ load_splash() {
|
|||
if [ -z "${SPLASHIMAGE}" ]; then
|
||||
vres="$(fbset 2>/dev/null | awk '/geometry/ { print $3 }')"
|
||||
hres="$(fbset 2>/dev/null | awk '/geometry/ { print $2 }')"
|
||||
|
||||
rotation="$(cat /sys/devices/virtual/graphics/fbcon/rotate)"
|
||||
|
||||
# Test to determine if the display is rotated
|
||||
# and set the splash to suit.
|
||||
if [ ${vres} -gt ${hres} ]
|
||||
if [ ${vres} -gt ${hres} ] && \
|
||||
[ -e "/splash/splashl.png" ]
|
||||
then
|
||||
RES="l"
|
||||
SPLASHIMAGE="/splash/splashl.png"
|
||||
elif [ ! -e "/splash/splashl.png" ]
|
||||
then
|
||||
### When we don't define a splash
|
||||
case ${rotation} in
|
||||
0)
|
||||
SPLASHIMAGE="/splash/splash.png"
|
||||
;;
|
||||
1)
|
||||
SPLASHIMAGE="/splash/splash_90.png"
|
||||
;;
|
||||
2)
|
||||
SPLASHIMAGE="/splash/splash_180.png"
|
||||
;;
|
||||
3)
|
||||
SPLASHIMAGE="/splash/splash_270.png"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
### When we don't know what to do.
|
||||
SPLASHIMAGE="/splash/splash.png"
|
||||
fi
|
||||
|
||||
SPLASHIMAGE="/splash/splash${RES}.png"
|
||||
|
||||
fi
|
||||
|
||||
if [ -n "${SPLASHIMAGE}" -a -f "${SPLASHIMAGE}" ]; then
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
PKG_NAME="sleep"
|
||||
PKG_VERSION=""
|
||||
PKG_SHA256=""
|
||||
|
@ -10,10 +13,11 @@ PKG_LONGDESC="Sleep configuration"
|
|||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/usr/config/sleep.conf.d
|
||||
cp sleep.conf $INSTALL/usr/config/sleep.conf.d/sleep.conf
|
||||
mkdir -p ${INSTALL}/usr/config/sleep.conf.d
|
||||
cp sleep.conf ${INSTALL}/usr/config/sleep.conf.d/sleep.conf
|
||||
cp modules.bad ${INSTALL}/usr/config
|
||||
|
||||
mkdir -p $INSTALL/usr/lib/systemd/system-sleep/
|
||||
cp sleep.sh $INSTALL/usr/lib/systemd/system-sleep/sleep
|
||||
chmod +x $INSTALL/usr/lib/systemd/system-sleep/sleep
|
||||
mkdir -p ${INSTALL}/usr/lib/systemd/system-sleep/
|
||||
cp sleep.sh ${INSTALL}/usr/lib/systemd/system-sleep/sleep
|
||||
chmod +x ${INSTALL}/usr/lib/systemd/system-sleep/sleep
|
||||
}
|
||||
|
|
2
packages/sysutils/sleep/sources/modules.bad
Normal file
2
packages/sysutils/sleep/sources/modules.bad
Normal file
|
@ -0,0 +1,2 @@
|
|||
dwc2
|
||||
mt7921e
|
|
@ -17,12 +17,6 @@ case $1 in
|
|||
nohup systemctl stop volume & >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# RG351x devices are notorious for losing USB when they sleep.
|
||||
if [[ "${HW_DEVICE}" =~ RG351 ]] || [[ "${HW_DEVICE}" =~ RGB20S ]]
|
||||
then
|
||||
modprobe -r dwc2
|
||||
fi
|
||||
|
||||
nohup alsactl store -f /storage/.config/asound.state >/dev/null 2>&1
|
||||
|
||||
if [ "$(get_setting bluetooth.enabled)" == "1" ]
|
||||
|
@ -30,9 +24,13 @@ case $1 in
|
|||
nohup systemctl stop bluetooth >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ "${DEVICE_WIFI_MODULE_SLEEPS}" = false ]
|
||||
if [ -e "/usr/config/modules.bad" ]
|
||||
then
|
||||
rmmod ${DEVICE_WIFI_MODULE} >/dev/null 2>&1
|
||||
for module in $(cat /usr/config/modules.bad)
|
||||
do
|
||||
echo ${module} >>/tmp/modules.load
|
||||
modprobe -r ${module}
|
||||
done
|
||||
fi
|
||||
|
||||
wait
|
||||
|
@ -42,9 +40,13 @@ case $1 in
|
|||
post)
|
||||
alsactl restore -f /storage/.config/asound.state
|
||||
|
||||
if [[ "${HW_DEVICE}" =~ RG351 ]] || [[ "${HW_DEVICE}" =~ RGB20S ]]
|
||||
if [ -e "/tmp/modules.load" ]
|
||||
then
|
||||
modprobe -i dwc2
|
||||
for module in $(cat /tmp/modules.load)
|
||||
do
|
||||
modprobe ${module}
|
||||
done
|
||||
rm -f /tmp/modules.load
|
||||
fi
|
||||
|
||||
if [ "${DEVICE_FAKE_JACKSENSE}" == "true" ]
|
||||
|
@ -57,11 +59,6 @@ case $1 in
|
|||
nohup systemctl start volume & >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ "${DEVICE_WIFI_MODULE_SLEEPS}" = false ]
|
||||
then
|
||||
modprobe ${DEVICE_WIFI_MODULE} >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ "$(get_setting wifi.enabled)" == "1" ]
|
||||
then
|
||||
nohup wifictl reconnect & >/dev/null 2>&1
|
||||
|
|
|
@ -33,19 +33,19 @@ then
|
|||
TEMPS=(55000 45000 0)
|
||||
elif [ "${COOLING_PROFILE}" = "moderate" ]
|
||||
then
|
||||
SPEEDS=(255 190 125 85)
|
||||
SPEEDS=(255 192 128 96)
|
||||
TEMPS=(65000 55000 45000 0)
|
||||
else
|
||||
# Quiet.
|
||||
SPEEDS=(255 127 85 0)
|
||||
TEMPS=(75000 65000 55000 0)
|
||||
SPEEDS=(255 192 128 96 64)
|
||||
TEMPS=(70000 60000 55000 50000 0)
|
||||
fi
|
||||
fi
|
||||
|
||||
while true
|
||||
do
|
||||
INDEX=0
|
||||
CPU_TEMP=$(printf "%.0f" $(cat /sys/devices/virtual/thermal/thermal_zone*/temp | awk '{ total += $1; count++ } END { print total/count }'))
|
||||
CPU_TEMP=$(printf "%.0f" $(cat ${DEVICE_TEMP_SENSOR} | awk '{ total += $1; count++ } END { print total/count }'))
|
||||
$DEBUG && echo "CPU TEMP: ${CPU_TEMP}" 2>/dev/null
|
||||
for TEMP in "${TEMPS[@]}"
|
||||
do
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[Unit]
|
||||
Description=Simple Fan Control Service
|
||||
ConditionPathExists=/sys/class/hwmon/hwmon1/pwm1
|
||||
Before=jelos.target
|
||||
|
||||
[Service]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
PKG_NAME="emulationstation"
|
||||
PKG_VERSION="c14c587"
|
||||
PKG_VERSION="6a24c96"
|
||||
PKG_GIT_CLONE_BRANCH="main"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
|
|
|
@ -36,7 +36,9 @@ mksplash() {
|
|||
convert ${SPLASH} -rotate 270 -quality 100 -background black -resize ${SPLASH_RESOLUTION} -gravity center -extent ${SPLASH_RESOLUTION} ${1}/splashl.png
|
||||
else
|
||||
cp ${SPLASH} ${1}
|
||||
convert ${SPLASH} -rotate 90 -quality 100 -background black -gravity center ${1}/splashl.png
|
||||
convert ${SPLASH} -rotate 90 -quality 100 -background black -gravity center ${1}/splash_90.png
|
||||
convert ${SPLASH} -rotate 180 -quality 100 -background black -gravity center ${1}/splash_180.png
|
||||
convert ${SPLASH} -rotate 270 -quality 100 -background black -gravity center ${1}/splash_270.png
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -3278,6 +3278,7 @@ CONFIG_SENSORS_JC42=m
|
|||
# CONFIG_SENSORS_NPCM7XX is not set
|
||||
# CONFIG_SENSORS_NZXT_KRAKEN2 is not set
|
||||
# CONFIG_SENSORS_NZXT_SMART2 is not set
|
||||
CONFIG_SENSORS_OXP=m
|
||||
# CONFIG_SENSORS_PCF8591 is not set
|
||||
# CONFIG_PMBUS is not set
|
||||
# CONFIG_SENSORS_SBTSI is not set
|
||||
|
|
|
@ -20,6 +20,7 @@ DEVICE_WIFI_MODULE="8188fu"
|
|||
DEVICE_WIFI="113"
|
||||
DEVICE_PWM_MOTOR="pwmchip3"
|
||||
DEVICE_PWM_FAN="/sys/class/hwmon/hwmon1/pwm1"
|
||||
DEVICE_TEMP_SENSOR="/sys/devices/virtual/thermal/thermal_zone*/temp"
|
||||
#DEVICE_JACK=""
|
||||
|
||||
# FREQ Governors
|
||||
|
|
Loading…
Reference in a new issue