Skip to content

Commit adc4bb6

Browse files
ssweenybsherman
andauthored
feat: add system76 driver (#290)
Co-authored-by: Benjamin Sherman <[email protected]>
1 parent e2b0ebc commit adc4bb6

File tree

4 files changed

+30
-3
lines changed

4 files changed

+30
-3
lines changed

Containerfile.extra

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ RUN --mount=type=cache,dst=/var/cache/dnf \
5252
/tmp/build-kmod-nct6687d.sh && \
5353
/tmp/build-kmod-rtl8814au.sh && \
5454
/tmp/build-kmod-rtl88xxau.sh && \
55+
/tmp/build-kmod-system76.sh && \
5556
/tmp/build-kmod-system76-io.sh && \
5657
/tmp/build-kmod-ryzen-smu.sh && \
5758
/tmp/build-kmod-vhba.sh && \

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ The `nvidia` stream image contains
5151
| [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) |
5252
| [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) |
5353
| [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) |
54-
| [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/) |
54+
| [system76](https://github.com/pop-os/system76-dkms) | extra | A Linux kernel driver for System76 laptops | [![badge](https://copr.fedorainfracloud.org/coprs/ssweeny/system76-hwe/package/system76-driver-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ssweeny/system76-hwe/package/system76-driver-kmod/) |
55+
| [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/) |
5556
| [v4l2loopback](https://github.com/umlaeute/v4l2loopback) | common | allows creating "virtual video devices" | [RPMFusion - free](https://rpmfusion.org/) |
5657
| [wl](https://github.com/rpmfusion/broadcom-wl/) | common | support for some legacy broadcom wifi devices | [RPMFusion - nonfree](https://rpmfusion.org/) |
5758
| [xpadneo](https://github.com/atar-axis/xpadneo) | common | xbox one controller bluetooth driver | [negativo17 - fedora-multimedia](https://negativo17.org/) |

build-kmod-system76.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/sh
2+
3+
set -oeux pipefail
4+
5+
ARCH="$(rpm -E '%_arch')"
6+
KERNEL="$(rpm -q "${KERNEL_NAME:-kernel}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')"
7+
RELEASE="$(rpm -E '%fedora')"
8+
9+
if [[ "${RELEASE}" -ge 41 ]]; then
10+
COPR_RELEASE="rawhide"
11+
else
12+
COPR_RELEASE="${RELEASE}"
13+
fi
14+
15+
curl -LsSf -o /etc/yum.repos.d/_copr_ssweeny-system76-hwe.repo \
16+
"https://copr.fedorainfracloud.org/coprs/ssweeny/system76-hwe/repo/fedora-${COPR_RELEASE}/ssweeny-system76-hwe-fedora-${COPR_RELEASE}.repo"
17+
18+
### BUILD system76-io (succeed or fail-fast with debug output)
19+
dnf install -y \
20+
"akmod-system76-driver*.fc${RELEASE}.${ARCH}"
21+
akmods --force --kernels "${KERNEL}" --kmod system76-driver
22+
modinfo "/usr/lib/modules/${KERNEL}/extra/system76-driver/system76.ko.xz" >/dev/null ||
23+
(find /var/cache/akmods/system76-io/ -name \*.log -print -exec cat {} \; && exit 1)
24+
25+
rm -f /etc/yum.repos.d/_copr_ssweeny-system76-hwe.repo

test-prep.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ curl -LsSf -o /etc/yum.repos.d/_copr_hikariknight-looking-glass-kvmfr.repo \
6666
"https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/repo/fedora-${COPR_RELEASE}/hikariknight-looking-glass-kvmfr-fedora-${COPR_RELEASE}.repo"
6767
fi
6868

69-
if [[ -f $(find /tmp/akmods-rpms/kmods/kmod-system76-io-*.rpm) ]]; then
70-
curl -LsSf -o /etc/yum.repos.d/_copr_ssweeny-system76-io.repo \
69+
if [[ -f $(find /tmp/akmods-rpms/kmods/kmod-system76-io-*.rpm) || -f $(find /tmp/akmods-rpms/kmods/kmod-system76-driver-*.rpm) ]]; then
70+
curl -LsSf -o /etc/yum.repos.d/_copr_ssweeny-system76-hwe.repo \
7171
"https://copr.fedorainfracloud.org/coprs/ssweeny/system76-hwe/repo/fedora-${COPR_RELEASE}/ssweeny-system76-hwe-fedora-${COPR_RELEASE}.repo"
7272
fi
7373

0 commit comments

Comments
 (0)