From b7e905ac84b67149a14ee4c890657b1c8307bfea Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Tue, 23 Apr 2024 12:31:31 -0700 Subject: [PATCH] feat: Add framework-laptop kmod --- Containerfile.common | 1 + README.md | 1 + build-kmod-framework-laptop.sh | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100755 build-kmod-framework-laptop.sh diff --git a/Containerfile.common b/Containerfile.common index 1353e580..ad219410 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -49,6 +49,7 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \ /tmp/build-kmod-rtl8814au.sh && \ /tmp/build-kmod-rtl88xxau.sh && \ /tmp/build-kmod-v4l2loopback.sh && \ + /tmp/build-kmod-framework-laptop.sh && \ /tmp/build-kmod-vhba.sh && \ /tmp/build-kmod-VirtualBox.sh && \ /tmp/build-kmod-wl.sh && \ diff --git a/README.md b/README.md index a4710167..269595f3 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Feel free to PR more kmod build scripts into this repo! - [ayaneo-platform](https://github.com/ShadowBlip/ayaneo-platform) - Linux drivers for AYANEO x86 handhelds (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) - [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/)) - [evdi](www.displaylink.com) - kernel module required for use of displaylink (akmod from [negativo17 multimedia repo](https://negativo17.org/multimedia/) +- [framework-laptop](https://github.com/DHowett/framework-laptop-kmod) - A kernel module that exposes the Framework Laptop (13, 16)'s battery charge limit and LEDs to userspace (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) - [kvmfr](https://github.com/gnif/looking-glass) - KVM framebuffer relay kernel module for use with Looking Glass (akmod from [hikariknight/looking-glass-kvmfr-akmod copr](https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/)) - [nct6687d](https://github.com/Fred78290/nct6687d) - Linux kernel module for Nuvoton NCT6687-R found on AMD B550 chipset motherboards (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) - [nvidia](https://rpmfusion.org/Howto/NVIDIA) - nvidia GPU drivers built from rpmfusion diff --git a/build-kmod-framework-laptop.sh b/build-kmod-framework-laptop.sh new file mode 100755 index 00000000..75015503 --- /dev/null +++ b/build-kmod-framework-laptop.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +set -oeux pipefail + +ARCH="$(rpm -E '%_arch')" +KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" +RELEASE="$(rpm -E '%fedora')" + +cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/ + +### BUILD framework-laptop (succeed or fail-fast with debug output) +rpm-ostree install \ + akmod-framework-laptop-*.fc${RELEASE}.${ARCH} +akmods --force --kernels "${KERNEL}" --kmod framework-laptop +modinfo /usr/lib/modules/${KERNEL}/extra/framework-laptop/framework_laptop.ko.xz > /dev/null \ +|| (find /var/cache/akmods/framework_laptop/ -name \*.log -print -exec cat {} \; && exit 1) + +rm -f /etc/yum.repos.d/_copr_ublue-os-akmods.repo