From e136e4dc7a196cb8443a9e4a3305897b6ac45073 Mon Sep 17 00:00:00 2001 From: Scott Sweeny Date: Sat, 21 Dec 2024 00:16:26 -0500 Subject: [PATCH 1/3] feat: add system76-io driver --- Containerfile.extra | 1 + README.md | 1 + build-kmod-system76-io.sh | 25 +++++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100755 build-kmod-system76-io.sh diff --git a/Containerfile.extra b/Containerfile.extra index 8a3b8edd..382717e9 100644 --- a/Containerfile.extra +++ b/Containerfile.extra @@ -49,6 +49,7 @@ RUN --mount=type=cache,dst=/var/cache/dnf \ /tmp/build-kmod-nct6687d.sh && \ /tmp/build-kmod-rtl8814au.sh && \ /tmp/build-kmod-rtl88xxau.sh && \ + /tmp/build-kmod-system76-io.sh && \ /tmp/build-kmod-ryzen-smu.sh && \ /tmp/build-kmod-vhba.sh && \ /tmp/build-kmod-VirtualBox.sh && \ diff --git a/README.md b/README.md index bada4b5d..df7fd420 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ The `nvidia` stream image contains | [rtl8814au](https://github.com/morrownr/8814au) | extra | Realtek RTL8814AU Driver | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/rtl8814au-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/rtl8814au-kmod) | | [rtl88xxau](https://github.com/aircrack-ng/rtl8812au) | extra | Realtek RTL8812AU/21AU and RTL8814AU driver | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/rtl88xxau-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/rtl88xxau-kmod) | | [ryzen-smu](https://gitlab.com/leogx9r/ryzen_smu) | extra | A Linux kernel driver that exposes access to the SMU (System Management Unit) for certain AMD Ryzen Processors | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/ryzen-smu-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/ryzen-smu-kmod) | +| [system76-io](https://github.com/pop-os/system76-io-dkms) | extra | A Linux kernel driver for the System76 Io board, which is used in System76's Thelio desktop line' | [![badge](https://copr.fedorainfracloud.org/coprs/ssweeny/system76-hwe/package/system76-io-akmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ssweeny/system76-hwe/package/system76-io-akmod/) | | [v4l2loopback](https://github.com/umlaeute/v4l2loopback) | common | allows creating "virtual video devices" | [RPMFusion - free](https://rpmfusion.org/) | | [wl](https://github.com/rpmfusion/broadcom-wl/) | common | support for some legacy broadcom wifi devices | [RPMFusion - nonfree](https://rpmfusion.org/) | | [xpadneo](https://github.com/atar-axis/xpadneo) | common | xbox one controller bluetooth driver | [negativo17 - fedora-multimedia](https://negativo17.org/) | diff --git a/build-kmod-system76-io.sh b/build-kmod-system76-io.sh new file mode 100755 index 00000000..c200df96 --- /dev/null +++ b/build-kmod-system76-io.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -oeux pipefail + +ARCH="$(rpm -E '%_arch')" +KERNEL="$(rpm -q "${KERNEL_NAME:-kernel}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" +RELEASE="$(rpm -E '%fedora')" + +if [[ "${RELEASE}" -ge 41 ]]; then + COPR_RELEASE="rawhide" +else + COPR_RELEASE="${RELEASE}" +fi + +curl -LsSf -o /etc/yum.repos.d/_copr_ssweeny-system76-io.repo \ + "https://copr.fedorainfracloud.org/coprs/ssweeny/system76-hwe/repo/fedora-${COPR_RELEASE}/ssweeny-system76-hwe-fedora-${COPR_RELEASE}.repo" + +### BUILD system76-io (succeed or fail-fast with debug output) +dnf install -y \ + akmod-system76-io-*.fc${RELEASE}.${ARCH} +akmods --force --kernels "${KERNEL}" --kmod system76-io +modinfo "/usr/lib/modules/${KERNEL}/extra/system76-io/system76-io.ko.xz" >/dev/null || + (find /var/cache/akmods/system76-io/ -name \*.log -print -exec cat {} \; && exit 1) + +rm -f /etc/yum.repos.d/_copr_ssweeny-system76-hwe.repo From bd2c910bff64b3b635de55a0e51cdfcaf5ee06d3 Mon Sep 17 00:00:00 2001 From: Scott Sweeny Date: Tue, 24 Dec 2024 14:12:11 -0500 Subject: [PATCH 2/3] fix: test-prep.sh: add system76-io copr when kmod rpm is present --- test-prep.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test-prep.sh b/test-prep.sh index 724bdd1b..da68e20f 100755 --- a/test-prep.sh +++ b/test-prep.sh @@ -66,6 +66,11 @@ curl -LsSf -o /etc/yum.repos.d/_copr_hikariknight-looking-glass-kvmfr.repo \ "https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/repo/fedora-${COPR_RELEASE}/hikariknight-looking-glass-kvmfr-fedora-${COPR_RELEASE}.repo" fi +if [[ -f $(find /tmp/akmods-rpms/kmods/kmod-system76-io-*.rpm) ]]; then +curl -LsSf -o /etc/yum.repos.d/_copr_ssweeny-system76-io.repo \ + "https://copr.fedorainfracloud.org/coprs/ssweeny/system76-hwe/repo/fedora-${COPR_RELEASE}/ssweeny-system76-hwe-fedora-${COPR_RELEASE}.repo" +fi + if [[ -f $(find /tmp/akmods-rpms/kmods/kmod-nvidia-*.rpm) ]]; then curl -Lo /etc/yum.repos.d/negativo17-fedora-nvidia.repo \ "https://negativo17.org/repos/fedora-nvidia.repo" From d624b3a5e1816c78db5fadb889467ea5f6373cda Mon Sep 17 00:00:00 2001 From: Scott Sweeny Date: Tue, 24 Dec 2024 14:29:57 -0500 Subject: [PATCH 3/3] fix: build-kmod-system76-io.sh: Add quotes per shellcheck --- build-kmod-system76-io.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-kmod-system76-io.sh b/build-kmod-system76-io.sh index c200df96..20350d27 100755 --- a/build-kmod-system76-io.sh +++ b/build-kmod-system76-io.sh @@ -17,7 +17,7 @@ curl -LsSf -o /etc/yum.repos.d/_copr_ssweeny-system76-io.repo \ ### BUILD system76-io (succeed or fail-fast with debug output) dnf install -y \ - akmod-system76-io-*.fc${RELEASE}.${ARCH} + "akmod-system76-io-*.fc${RELEASE}.${ARCH}" akmods --force --kernels "${KERNEL}" --kmod system76-io modinfo "/usr/lib/modules/${KERNEL}/extra/system76-io/system76-io.ko.xz" >/dev/null || (find /var/cache/akmods/system76-io/ -name \*.log -print -exec cat {} \; && exit 1)