diff --git a/Containerfile.common b/Containerfile.common index 70c26a3c..9992d9c4 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -46,6 +46,7 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ ; else \ export KERNEL_NAME="kernel-surface" \ ; fi && \ + /tmp/build-kmod-framework-laptop.sh && \ /tmp/build-kmod-kvmfr.sh && \ /tmp/build-kmod-openrazer.sh && \ /tmp/build-kmod-v4l2loopback.sh && \ diff --git a/README.md b/README.md index 8a264f44..bada4b5d 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ The `nvidia` stream image contains | [bmi260](https://github.com/hhd-dev/bmi260) | extra | kernel module driver for the Bosch BMI260 IMU | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/bmi260-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/bmi260-kmod) | | [evdi](www.displaylink.com) | extra | kernel module required for use of displaylink | [negativo17 - fedora-multimedia](https://negativo17.org/) | | [facetimehd](https://github.com/patjak/facetimehd/) | extra | kernel module Linux driver for the FacetimeHD (Broadcom 1570) PCIe webcam | [![badge](https://copr.fedorainfracloud.org/coprs/mulderje/facetimehd-kmod/package/facetimehd-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/mulderje/facetimehd-kmod/package/facetimehd-kmod) | +| [framework-laptop](https://github.com/DHowett/framework-laptop-kmod) | common | A kernel module that exposes the Framework Laptop (13, 16)'s battery charge limit and LEDs to userspace | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/framework-laptop-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/framework-laptop-kmod) | | [gcadapter_oc](https://github.com/hannesmann/gcadapter-oc-kmod) | extra | kernel module for overclocking the Nintendo Wii U/Mayflash GameCube adapter | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/gcadapter_oc-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/gcadapter_oc-kmod) | | [kvmfr](https://github.com/gnif/looking-glass) | common | KVM framebuffer relay kernel module for use with Looking Glass | [![badge](https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/package/kvmfr-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/package/kvmfr-kmod) | | [nct6687d](https://github.com/Fred78290/nct6687d) | extra | Linux kernel module for Nuvoton NCT6687-R found on AMD B550 chipset motherboards | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/nct6687d-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/nct6687d-kmod) | diff --git a/build-kmod-framework-laptop.sh b/build-kmod-framework-laptop.sh new file mode 100755 index 00000000..c5c30b30 --- /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) +dnf install -y \ + 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