From 26555e83cdfe668b34a9f1c7b9c05fd3a1ad07fe Mon Sep 17 00:00:00 2001 From: Matt Campbell Date: Mon, 4 Mar 2024 23:22:07 -0600 Subject: [PATCH] Attempting to test Framework kmod, probably not good enough for production --- Containerfile.common | 1 + build-kmod-framework-laptop-tests.sh | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 build-kmod-framework-laptop-tests.sh diff --git a/Containerfile.common b/Containerfile.common index 989ba64d..38f25495 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -43,6 +43,7 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \ /tmp/build-kmod-steamdeck.sh \ ; fi && \ /tmp/build-kmod-ayaneo-platform.sh && \ + /tmp/build-framework-laptop-tests.sh && \ /tmp/build-kmod-ayn-platform.sh && \ /tmp/build-kmod-bmi160.sh && \ /tmp/build-kmod-bmi260.sh && \ diff --git a/build-kmod-framework-laptop-tests.sh b/build-kmod-framework-laptop-tests.sh new file mode 100644 index 00000000..0115504b --- /dev/null +++ b/build-kmod-framework-laptop-tests.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_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" +RELEASE="$(rpm -E '%fedora')" + +rpm-ostree install \ + akmod-ayaneo-platform-*.fc${RELEASE}.${ARCH} +akmods --force --kernels "${KERNEL}" --kmod ayaneo-platform +modinfo /usr/lib/modules/${KERNEL}/extra/framework-laptop-tests/framework-laptop-kmod.ko.xz > /dev/null \ +|| (find /var/cache/akmods/framework-laptop-tests/ -name \*.log -print -exec cat {} \; && exit 1) + +rm -f /etc/yum.repos.d/_copr_ublue-os-akmods.repo