From 238d8bea41225fc4b24f1911707e546af9252e5b Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Fri, 21 Jul 2023 15:29:42 -0700 Subject: [PATCH] feat: Add Google Coral TPU Gasket & Apex drivers --- Containerfile | 1 + README.md | 5 +++-- build-kmod-gasket.sh | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100755 build-kmod-gasket.sh diff --git a/Containerfile b/Containerfile index 19d130ef..22349546 100644 --- a/Containerfile +++ b/Containerfile @@ -19,6 +19,7 @@ RUN /tmp/build-prep.sh RUN /tmp/build-ublue-os-akmods-addons.sh +RUN /tmp/build-kmod-gasket.sh RUN /tmp/build-kmod-gcadapter_oc.sh RUN /tmp/build-kmod-steamdeck.sh RUN /tmp/build-kmod-v4l2loopback.sh diff --git a/README.md b/README.md index 41bd13e2..4f31e0ff 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,9 @@ The rpmfusion and extra repos provide dependencies which are required by the kmo Feel free to PR more kmod build scripts into this repo! - ublue-os-akmods-addons - installs extra repos and our kmods signing key; install and import to allow SecureBoot systems to use these kmods -- [gcadapter_oc](https://github.com/hannesmann/gcadapter-oc-kmod) - kernel module for overclocking the Nintendo Wii U/Mayflash GameCube adapter (akmod from [copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) -- [steamdeck](https://lkml.org/lkml/2022/2/5/391) - platform driver for Valve's Steam Deck handheld PC (akmod from [copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) +- [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/)) +- [gcadapter_oc](https://github.com/hannesmann/gcadapter-oc-kmod) - kernel module for overclocking the Nintendo Wii U/Mayflash GameCube adapter (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) +- [steamdeck](https://lkml.org/lkml/2022/2/5/391) - platform driver for Valve's Steam Deck handheld PC (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/)) - [v4l2loopback](https://github.com/umlaeute/v4l2loopback) - allows creating "virtual video devices" - [xpadneo](https://github.com/atar-axis/xpadneo) - xbox one controller bluetooth driver (akmod from [negativo17 steam repo](https://negativo17.org/steam/) diff --git a/build-kmod-gasket.sh b/build-kmod-gasket.sh new file mode 100755 index 00000000..979a0657 --- /dev/null +++ b/build-kmod-gasket.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 --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" +RELEASE="$(rpm -E '%fedora')" + +rpm-ostree install \ + akmod-gasket-*.fc${RELEASE}.${ARCH} +akmods --force --kernels "${KERNEL}" --kmod gasket +modinfo /usr/lib/modules/${KERNEL}/extra/gasket/{gasket,apex}.ko.xz > /dev/null \ +|| (find /var/cache/akmods/gasket/ -name \*.log -print -exec cat {} \; && exit 1) + +rm -f /etc/yum.repos.d/_copr_ublue-os-akmods.repo