From 2b30727b3245505a927161883a0372b46bdf25ce Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Sun, 21 Jan 2024 15:16:19 -0800 Subject: [PATCH 1/2] feat: Add ayn-platform driver for AYN Handhelds (#113) --- Containerfile.common | 1 + README.md | 1 + build-kmod-ayn-platform.sh | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100755 build-kmod-ayn-platform.sh diff --git a/Containerfile.common b/Containerfile.common index 3840cc38..96eb0886 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -41,6 +41,7 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \ /tmp/build-kmod-openrgb.sh && \ /tmp/build-kmod-steamdeck.sh \ ; fi && \ + /tmp/build-kmod-ayn-platform.sh && \ /tmp/build-kmod-bmi260.sh && \ /tmp/build-kmod-gasket.sh && \ /tmp/build-kmod-gcadapter_oc.sh && \ diff --git a/README.md b/README.md index f260b584..e05a2c1c 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Feel free to PR more kmod build scripts into this repo! - ublue-os-nvidia-addons - installs extra repos enabling our nvidia support - [nvidia container selinux policy](https://github.com/NVIDIA/dgx-selinux/tree/master/src/nvidia-container-selinux) - uses RHEL9 policy as the closest match - [nvidia-container-tookkit repo](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installing-with-yum-or-dnf) - version 1.14 (and newer) provide CDI for podman use of nvidia gpus +- [ayn-platform](https://github.com/ShadowBlip/ayn-platform) - Linux drivers for AYN x86 handhelds (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) - [bmi260](https://github.com/hhd-dev/bmi260) - kernel module driver for the Bosch BMI260 IMU (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) - [evdi](www.displaylink.com) - kernel module required for use of displaylink (akmod from [negativo17 multimedia repo](https://negativo17.org/multimedia/) - [gasket/apex](https://github.com/google/gasket-driver) - kernel module for Coral Gasket Driver, allowing usage of the Coral EdgeTPU on Linux systems (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) diff --git a/build-kmod-ayn-platform.sh b/build-kmod-ayn-platform.sh new file mode 100755 index 00000000..28558740 --- /dev/null +++ b/build-kmod-ayn-platform.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +set -oeux pipefail + +cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ + +ARCH="$(rpm -E '%_arch')" +KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" +RELEASE="$(rpm -E '%fedora')" + +rpm-ostree install \ + akmod-ayn-platform-*.fc${RELEASE}.${ARCH} +akmods --force --kernels "${KERNEL}" --kmod ayn-platform +modinfo /usr/lib/modules/${KERNEL}/extra/ayn-platform/ayn-platform.ko.xz > /dev/null \ +|| (find /var/cache/akmods/ayn-platform/ -name \*.log -print -exec cat {} \; && exit 1) + +rm -f /etc/yum.repos.d/_copr_ublue-os-akmods.repo From 5a077ae3b3dd7ef62641575251ccdfff1cf5066b Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Sun, 21 Jan 2024 15:26:52 -0800 Subject: [PATCH 2/2] feat: Add zenergy driver (#114) --- Containerfile.common | 1 + README.md | 1 + build-kmod-zenergy.sh | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100755 build-kmod-zenergy.sh diff --git a/Containerfile.common b/Containerfile.common index 96eb0886..d14c5139 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -55,6 +55,7 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \ /tmp/build-kmod-xpadneo.sh && \ /tmp/build-kmod-xpad-noone.sh && \ /tmp/build-kmod-xone.sh && \ + /tmp/build-kmod-zenergy.sh && \ /tmp/build-kmod-zenpower3.sh RUN cp /tmp/ublue-os-akmods-addons/rpmbuild/RPMS/noarch/ublue-os-akmods-addons*.rpm \ diff --git a/README.md b/README.md index e05a2c1c..9c807f44 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Feel free to PR more kmod build scripts into this repo! - [xpadneo](https://github.com/atar-axis/xpadneo) - xbox one controller bluetooth driver (akmod from [negativo17 steam repo](https://negativo17.org/steam/) - [xpad-noone](https://github.com/ublue-os/xpad-noone) - xbox/xbox 360 controller driver (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) - [xone](https://github.com/medusalix/xone) - xbox one controller USB wired/RF driver (akmod from [negativo17 steam repo](https://negativo17.org/steam/) +- [zenergy](https://github.com/BoukeHaarsma23/zenergy) - Based on AMD_ENERGY driver, but with some jiffies added so non-root users can read it safely. (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) - [zenpower3](https://git.exozy.me/a/zenpower3) - Zenpower3 is a Linux kernel driver for reading temperature, voltage(SVI2), current(SVI2) and power(SVI2) for AMD Zen family CPUs (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) # How it's organized diff --git a/build-kmod-zenergy.sh b/build-kmod-zenergy.sh new file mode 100755 index 00000000..ddabe4b2 --- /dev/null +++ b/build-kmod-zenergy.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +set -oeux pipefail + +cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ + +ARCH="$(rpm -E '%_arch')" +KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" +RELEASE="$(rpm -E '%fedora')" + +rpm-ostree install \ + akmod-zenergy-*.fc${RELEASE}.${ARCH} +akmods --force --kernels "${KERNEL}" --kmod zenergy +modinfo /usr/lib/modules/${KERNEL}/extra/zenergy/zenergy.ko.xz > /dev/null \ +|| (find /var/cache/akmods/zenergy/ -name \*.log -print -exec cat {} \; && exit 1) + +rm -f /etc/yum.repos.d/_copr_ublue-os-akmods.repo