diff --git a/Containerfile.common b/Containerfile.common index 755faee3..079e6545 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -46,6 +46,7 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \ /tmp/build-kmod-bmi160.sh && \ /tmp/build-kmod-bmi260.sh && \ /tmp/build-kmod-bmi323.sh && \ + /tmp/build-kmod-facetimehd.sh && \ /tmp/build-kmod-gcadapter_oc.sh && \ /tmp/build-kmod-nct6687d.sh && \ /tmp/build-kmod-openrazer.sh && \ diff --git a/build-kmod-facetimehd.sh b/build-kmod-facetimehd.sh new file mode 100755 index 00000000..438322c8 --- /dev/null +++ b/build-kmod-facetimehd.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 40 ]]; then + COPR_RELEASE="rawhide" +else + COPR_RELEASE="${RELEASE}" +fi + +wget "https://copr.fedorainfracloud.org/coprs/mulderje/facetimehd-kmod/repo/fedora-${COPR_RELEASE}/mulderje-facetimehd-kmod-fedora-${COPR_RELEASE}.repo" -O /etc/yum.repos.d/_copr_mulderje-facetimehd-kmod.repo + +### BUILD facetimehd (succeed or fail-fast with debug output) +rpm-ostree install \ + "akmod-facetimehd-*.fc${RELEASE}.${ARCH}" \ + facetimehd-firmware +akmods --force --kernels "${KERNEL}" --kmod facetimehd +modinfo "/usr/lib/modules/${KERNEL}/extra/facetimehd/facetimehd.ko.xz" > /dev/null \ +|| (find /var/cache/akmods/facetimehd/ -name \*.log -print -exec cat {} \; && exit 1) + +rm -f /etc/yum.repos.d/_copr_mulderje-facetimehd-kmod.repo