Skip to content

Commit

Permalink
feat: add facetimehd-kmod to akmod cache
Browse files Browse the repository at this point in the history
This is the initial commit of the facetimehd firmware for the
integrated camera for older macbook air models.
  • Loading branch information
mulderje committed Apr 5, 2024
1 parent e32898d commit 7008d63
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions Containerfile.common
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
25 changes: 25 additions & 0 deletions build-kmod-facetimehd.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7008d63

Please sign in to comment.