Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add 'extra' akmod stream & facetimehd-kmod to akmod cache #163

Merged
merged 36 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2d5bf64
feat: add facetimehd-kmod to akmod cache
mulderje Apr 1, 2024
0186002
chore: add facetimehd to README file
mulderje Apr 5, 2024
e9c46d0
chore: support new fedora 6.8.4 main kernel (#166)
bsherman Apr 8, 2024
d653c9e
Merge branch 'main' into facetimehd-kmod
mulderje Apr 8, 2024
800f3cf
fix: docs: fix contributor's guide 404 link (#164)
mulderje Apr 8, 2024
95431a9
Merge branch 'main' into facetimehd-kmod
mulderje Apr 9, 2024
1d7c941
chore: remove explicit facetimehd-firmware include
mulderje Apr 15, 2024
da5b860
Merge branch 'main' into facetimehd-kmod
mulderje Apr 15, 2024
8bf32c2
chore: switch to curl to align with broader direction
mulderje Apr 16, 2024
1142cd0
merge in the a handful of the reusable-build.yml from upstream/nega-nv
mulderje Apr 17, 2024
cfb8bb9
feat: add 'extra' akmod stream build
mulderje Apr 17, 2024
064ee01
chore: add .gitattributes files for Containerfile syntax highlighting
mulderje Apr 17, 2024
79a47ba
fix: add exclude for extra/550 in build
mulderje Apr 17, 2024
9c9be8b
chore: break daily cron schedule into their own file
mulderje Apr 17, 2024
a57f8a0
Merge pull request #10 from mulderje/pr-separate-cron
mulderje Apr 17, 2024
f6b2203
Revert "chore: break daily cron schedule into their own file"
mulderje Apr 17, 2024
a25aba2
Merge pull request #11 from mulderje/revert-10-pr-separate-cron
mulderje Apr 17, 2024
064c191
Merge branch 'main' into facetimehd-kmod
mulderje Apr 19, 2024
edbf7e8
Merge remote-tracking branch 'upstream/main'
mulderje Apr 19, 2024
71c47a1
chore: fix merge conflicts
mulderje Apr 19, 2024
14f75c3
fix: add KERNEL_VERSION arg to Containerfile.extra
mulderje Apr 19, 2024
71253aa
chore(facetimehd): quiet curl output
mulderje Apr 19, 2024
00c2def
chore: merge in upstream/main
mulderje Apr 23, 2024
7c25819
Merge remote-tracking branch 'upstream/main' into facetimehd-kmod
mulderje Apr 23, 2024
a996953
chore(extra): bump fedora major version to 40
mulderje Apr 23, 2024
c168dc0
fix(extra): remove /tmp/build-ublue-os-akmods-addons.sh run line
mulderje Apr 23, 2024
02d9ed7
fix(extra): remove more build-ublue-os-akmods-addons
mulderje Apr 23, 2024
b91d30d
Merge remote-tracking branch 'upstream/main' into facetimehd-kmod
mulderje Apr 24, 2024
e6f3f22
feat(extra): move initial list of kmods from common to extra #176
mulderje Apr 24, 2024
e7e0eca
docs(extra): add basic package layout for common/extra/nvidia breakout
mulderje Apr 24, 2024
854e00e
chore(facetimehd): reorder curl command
mulderje Apr 24, 2024
820e251
Merge remote-tracking branch 'upstream/main' into facetimehd-kmod
mulderje Apr 24, 2024
8e97c0e
docs(extra): convert kmod list to a table, and add in additional meta…
mulderje Apr 24, 2024
95cbb7f
docs(extra): fix markdown lint issues and move 'how it works' section up
mulderje Apr 24, 2024
9775395
docs(extra): add basic instructions for installing an 'extra' akmod p…
mulderje Apr 24, 2024
e134984
fixup: remove copy/paste issue from xone details in README
mulderje Apr 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Containerfile* linguist-language=Containerfile
1 change: 1 addition & 0 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- surface
cfile_suffix:
- common
- extra
- nvidia
exclude:
- kernel_flavor: asus
Expand Down
16 changes: 1 addition & 15 deletions Containerfile.common
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,12 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \
if grep -qv "asus" <<< "${KERNEL_FLAVOR}"; then \
/tmp/build-kmod-evdi.sh \
; fi && \
if grep -qv "fsync" <<< "${KERNEL_FLAVOR}"; then \
/tmp/build-kmod-openrgb.sh \
; fi && \
/tmp/build-kmod-ayaneo-platform.sh && \
/tmp/build-kmod-ayn-platform.sh && \
/tmp/build-kmod-gcadapter_oc.sh && \
/tmp/build-kmod-kvmfr.sh && \
/tmp/build-kmod-nct6687d.sh && \
/tmp/build-kmod-openrazer.sh && \
/tmp/build-kmod-ryzen-smu.sh && \
/tmp/build-kmod-rtl8814au.sh && \
/tmp/build-kmod-rtl88xxau.sh && \
/tmp/build-kmod-v4l2loopback.sh && \
/tmp/build-kmod-framework-laptop.sh && \
/tmp/build-kmod-vhba.sh && \
/tmp/build-kmod-VirtualBox.sh && \
/tmp/build-kmod-wl.sh && \
/tmp/build-kmod-xpadneo.sh && \
/tmp/build-kmod-xone.sh && \
/tmp/build-kmod-zenergy.sh
/tmp/build-kmod-xone.sh

RUN cp /tmp/ublue-os-akmods-addons/rpmbuild/RPMS/noarch/ublue-os-akmods-addons*.rpm \
/var/cache/rpms/ublue-os/
Expand Down
61 changes: 61 additions & 0 deletions Containerfile.extra
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
###
### Containerfile.extra - used to build extra kmods
###

#Build from base, simpley because it's the smallest image
ARG SOURCE_IMAGE="${SOURCE_IMAGE:-base}"
ARG SOURCE_ORG="${SOURCE_ORG:-fedora-ostree-desktops}"
ARG BASE_IMAGE="quay.io/${SOURCE_ORG}/${SOURCE_IMAGE}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"

FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG KERNEL_FLAVOR="{KERNEL_FLAVOR:-main}"
ARG KERNEL_VERSION=""
ARG RPMFUSION_MIRROR=""

COPY build*.sh /tmp
COPY certs /tmp/certs

# files for akmods
COPY ublue-os-akmods-addons.spec /tmp/ublue-os-akmods-addons/ublue-os-akmods-addons.spec
ADD https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/repo/fedora-${FEDORA_MAJOR_VERSION}/ublue-os-akmods-fedora-${FEDORA_MAJOR_VERSION}.repo \
/tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo
ADD https://negativo17.org/repos/fedora-multimedia.repo \
/tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/negativo17-fedora-multimedia.repo

RUN /tmp/build-prep.sh

# Set kernel name
RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \
export KERNEL_NAME="kernel" \
; else \
export KERNEL_NAME="kernel-surface" \
; fi && \
if grep -qv "fsync" <<< "${KERNEL_FLAVOR}"; then \
/tmp/build-kmod-openrgb.sh \
; fi && \
/tmp/build-kmod-ayaneo-platform.sh && \
/tmp/build-kmod-ayn-platform.sh && \
/tmp/build-kmod-facetimehd.sh \
/tmp/build-kmod-framework-laptop.sh && \
/tmp/build-kmod-gcadapter_oc.sh && \
/tmp/build-kmod-kvmfr.sh && \
/tmp/build-kmod-nct6687d.sh && \
/tmp/build-kmod-rtl8814au.sh && \
/tmp/build-kmod-rtl88xxau.sh && \
/tmp/build-kmod-ryzen-smu.sh && \
/tmp/build-kmod-vhba.sh && \
/tmp/build-kmod-VirtualBox.sh && \
/tmp/build-kmod-zenergy.sh

RUN for RPM in $(find /var/cache/akmods/ -type f -name \*.rpm); do \
cp "${RPM}" /var/cache/rpms/kmods/; \
done

RUN find /var/cache/rpms

FROM scratch

COPY --from=builder /var/cache/rpms /rpms

95 changes: 56 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,55 @@
[![build-38](https://github.com/ublue-os/akmods/actions/workflows/build-38.yml/badge.svg)](https://github.com/ublue-os/akmods/actions/workflows/build-38.yml) [![build-39](https://github.com/ublue-os/akmods/actions/workflows/build-39.yml/badge.svg)](https://github.com/ublue-os/akmods/actions/workflows/build-39.yml) [![build-40](https://github.com/ublue-os/akmods/actions/workflows/build-40.yml/badge.svg)](https://github.com/ublue-os/akmods/actions/workflows/build-40.yml)

# ublue-os akmods

[![build-38](https://github.com/ublue-os/akmods/actions/workflows/build-38.yml/badge.svg)](https://github.com/ublue-os/akmods/actions/workflows/build-38.yml) [![build-39](https://github.com/ublue-os/akmods/actions/workflows/build-39.yml/badge.svg)](https://github.com/ublue-os/akmods/actions/workflows/build-39.yml) [![build-40](https://github.com/ublue-os/akmods/actions/workflows/build-40.yml/badge.svg)](https://github.com/ublue-os/akmods/actions/workflows/build-40.yml)

A layer for adding extra kernel modules to your image. Use for better hardware support and a few other features!

# Features
## How it's organized

The [`akmods` image](https://github.com/orgs/ublue-os/packages/container/package/akmods) is built and published daily. However, there's not a single image but several, given various kernel support we now provide.

The akmods package is broken out into three akmod "streams":

- `common` - any kmod installed by default in Bluefin or which was originally in main pre-39
- `extra` - primarily for kmods used in Bazzite or any others we need, but don't fit in `common`
- `nvidia` - only for the nvidia kmod

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
- ublue-os-nvidia-addons - installs extra repos enabling our nvidia support
- [nvidia container selinux policy](https://github.com/NVIDIA/dgx-selinux/tree/master/src/nvidia-container-selinux) - uses RHEL9 policy as the closest match
- [nvidia-container-tookkit repo](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installing-with-yum-or-dnf) - version 1.14 (and newer) provide CDI for podman use of nvidia gpus
- [ayaneo-platform](https://github.com/ShadowBlip/ayaneo-platform) - Linux drivers for AYANEO x86 handhelds (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))
- [ayn-platform](https://github.com/ShadowBlip/ayn-platform) - Linux drivers for AYN x86 handhelds (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))
- [evdi](www.displaylink.com) - kernel module required for use of displaylink (akmod from [negativo17 multimedia repo](https://negativo17.org/multimedia/)
- [framework-laptop](https://github.com/DHowett/framework-laptop-kmod) - A kernel module that exposes the Framework Laptop (13, 16)'s battery charge limit and LEDs to userspace (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/))
- [kvmfr](https://github.com/gnif/looking-glass) - KVM framebuffer relay kernel module for use with Looking Glass (akmod from [hikariknight/looking-glass-kvmfr-akmod copr](https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/))
- [nct6687d](https://github.com/Fred78290/nct6687d) - Linux kernel module for Nuvoton NCT6687-R found on AMD B550 chipset motherboards (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))
- [nvidia](https://rpmfusion.org/Howto/NVIDIA) - nvidia GPU drivers built from rpmfusion
- [openrazer](https://openrazer.github.io/) - kernel module adding additional features to Razer hardware (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))
- [openrgb](https://gitlab.com/CalcProgrammer1/OpenRGB/-/raw/master/OpenRGB.patch) - kernel module with i2c-nct6775 and patched i2c-piix4 for use with OpenRGB (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))
- rtl8814au - Realtek RTL8814AU Driver (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))
- rtl88xxau - Realtek RTL8812AU/21AU and RTL8814AU driver (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))
- [ryzen_smu](https://gitlab.com/leogx9r/ryzen_smu) - A Linux kernel driver that exposes access to the SMU (System Management Unit) for certain AMD Ryzen Processors (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"
- [wl (broadcom)](https://github.com/rpmfusion/broadcom-wl/) - support for some legacy broadcom wifi devices
- [xpadneo](https://github.com/atar-axis/xpadneo) - xbox one controller bluetooth driver (akmod from [negativo17 steam repo](https://negativo17.org/steam/)
- [xonedo](https://github.com/BoukeHaarsma23/xonedo/) - xbox one controller USB wired/RF driver modified to work along-side xpad (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))
- [zenergy](https://github.com/BoukeHaarsma23/zenergy) - Based on AMD_ENERGY driver, but with some jiffies added so non-root users can read it safely. (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))

# How it's organized
## Features

The [`akmods` image](https://github.com/orgs/ublue-os/packages/container/package/akmods) is built and published daily. However, there's not a single image but several, given various kernel support we now provide.
### Overview

Here's a rundown on how it's organized.
- ublue-os-akmods-addons - installs extra repos and our kmods signing key; install and import to allow SecureBoot systems to use these kmods
- ublue-os-nvidia-addons - installs extra repos enabling our nvidia support
- [nvidia container selinux policy](https://github.com/NVIDIA/dgx-selinux/tree/master/src/nvidia-container-selinux) - uses RHEL9 policy as the closest match
- [nvidia-container-tookkit repo](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installing-with-yum-or-dnf) - version 1.14 (and newer) provide CDI for podman use of nvidia gpus

### Kmod Packages

| Package | Stream | Description | Source |
|---------|--------|-------------|--------|
| [ayaneo-platform](https://github.com/ShadowBlip/ayaneo-platform) | extra | Linux drivers for AYANEO x86 handhelds | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/ayaneo-platform-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/ayaneo-platform-kmod) |
| [ayn-platform](https://github.com/ShadowBlip/ayn-platform) | extra | Linux drivers for AYN x86 handhelds | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/ayn-platform-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/ayn-platform-kmod) |
| [evdi](www.displaylink.com) | common | kernel module required for use of displaylink | [negativo17 - fedora-multimedia](https://negativo17.org/) |
| [facetimehd](https://github.com/patjak/facetimehd/) | extra | kernel module Linux driver for the FacetimeHD (Broadcom 1570) PCIe webcam | [![badge](https://copr.fedorainfracloud.org/coprs/mulderje/facetimehd-kmod/package/facetimehd-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/mulderje/facetimehd-kmod/package/facetimehd-kmod) |
| [framework-laptop](https://github.com/DHowett/framework-laptop-kmod) | extra | A kernel module that exposes the Framework Laptop (13, 16)'s battery charge limit and LEDs to userspace | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/framework-laptop-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/framework-laptop-kmod) |
| [gcadapter_oc](https://github.com/hannesmann/gcadapter-oc-kmod) | extra | kernel module for overclocking the Nintendo Wii U/Mayflash GameCube adapter | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/gcadapter_oc-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/gcadapter_oc-kmod) |
| [kvmfr](https://github.com/gnif/looking-glass) | extra | KVM framebuffer relay kernel module for use with Looking Glass | [![badge](https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/package/kvmfr-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/package/kvmfr-kmod) |
| [nct6687d](https://github.com/Fred78290/nct6687d) | extra | Linux kernel module for Nuvoton NCT6687-R found on AMD B550 chipset motherboards | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/nct6687d-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/nct6687d-kmod) |
| [nvidia](https://rpmfusion.org/Howto/NVIDIA) | nvidia | nvidia GPU drivers built from rpmfusion | [RPMFusion - nonfree](https://rpmfusion.org/) |
| [openrazer](https://openrazer.github.io/) | common | kernel module adding additional features to Razer hardware | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/openrazer-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/openrazer-kmod) |
| [openrgb](https://gitlab.com/CalcProgrammer1/OpenRGB/-/raw/master/OpenRGB.patch) | extra | kernel module with i2c-nct6775 and patched i2c-piix4 for use with OpenRGB | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/openrgb-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/openrgb-kmod) |
| [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) |
| [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) |
| [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) |
| [v4l2loopback](https://github.com/umlaeute/v4l2loopback) | common | allows creating "virtual video devices" | [RPMFusion - free](https://rpmfusion.org/) |
| [wl](https://github.com/rpmfusion/broadcom-wl/) | common | support for some legacy broadcom wifi devices | [RPMFusion - nonfree](https://rpmfusion.org/) |
| [xpadneo](https://github.com/atar-axis/xpadneo) | common | xbox one controller bluetooth driver | [negativo17 - fedora-multimedia](https://negativo17.org/) |
| [xone](https://github.com/BoukeHaarsma23/xonedo/) | common | xbox one controller USB wired/RF driver modified to work along-side xpad | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/xone-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/xone-kmod) |
| [zenergy](https://github.com/BoukeHaarsma23/zenergy) | extra | Based on AMD_ENERGY driver, but with some jiffies added so non-root users can read it safely | [![badge](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/zenergy-kmod/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/package/zenergy-kmod) |

## Notes

We do our best to support all current builds of Fedora, current versions of the kernel modules listed, and the latest NVIDIA driver.
**Note: NVIDIA legacy driver version 470 is no longer provided as RPMfusion has ceased updates to the package and it no longer builds with kernel 6.8 which has now released for Fedora 38 and 39. Also the `-550` extra driver version tag has been removed as the latest driver will always be included.**
Expand All @@ -53,11 +67,9 @@ The majority of the drivers are tagged with `KERNEL_TYPE-FEDORA_RELEASE`. NVIDIA
| [patched Microsoft Surface devices](https://github.com/linux-surface/linux-surface/) | 39 | `surface-39` |
| | 40 | `surface-40` |

## Usage


# Usage

To install one of these kmods, you'll need to install any of their specific dependencies (checkout the `build-prep.sh` and the specific `build-FOO.sh` script for details.
To install one of these kmods, you'll need to install any of their specific dependencies (checkout the `build-prep.sh` and the specific `build-FOO.sh` script for details).

For common images, add something like this to your Containerfile, replacing `TAG` with one of the `something-FR` tags above:

Expand All @@ -66,30 +78,35 @@ For common images, add something like this to your Containerfile, replacing `TAG
RUN rpm-ostree install /tmp/rpms/ublue-os/ublue-os-akmods*.rpm
RUN rpm-ostree install /tmp/rpms/kmods/kmod-v4l2loopback*.rpm

For extra images, add something like this to your Containerfile, replacing `TAG` with one of the `something-FR` tags above:

COPY --from=ghcr.io/ublue-os/akmods-extra:TAG /rpms/ /tmp/rpms
RUN find /tmp/rpms
RUN rpm-ostree install /tmp/rpms/kmods/kmod-facetimehd*.rpm

For NVIDIA images, add something like this to your Containerfile, replacing `TAG` with one of the `something-FR-NVV` tags above:

COPY --from=ghcr.io/ublue-os/akmods:TAG /rpms/ /tmp/rpms
COPY --from=ghcr.io/ublue-os/akmods-nvidia:TAG /rpms/ /tmp/rpms
RUN find /tmp/rpms
RUN rpm-ostree install /tmp/rpms/ublue-os/ublue-os-nvidia*.rpm
RUN rpm-ostree install /tmp/rpms/kmods/kmod-nvidia.rpm

These examples show:

1. copying all the rpms from the respective akmods images
2. installing the respective ublue specific RPM
3. installing a kmods RPM.


# Adding kmods
## Adding kmods

If you have a kmod you want to contribute send a pull request by adding a script using [build-kmod-wl.sh](https://github.com/ublue-os/akmods/blob/main/build-kmod-wl.sh) as an example.

# Verification
## Verification

These images are signed with sisgstore's [cosign](https://docs.sigstore.dev/cosign/overview/). You can verify the signature by downloading the `cosign.pub` key from this repo and running the following command, replacing `RELEASE` with either `38` or `39`:

cosign verify --key cosign.pub ghcr.io/ublue-os/akmods:RELEASE

# Metrics
## Metrics

![Alt](https://repobeats.axiom.co/api/embed/a7ddeb1a3d2e0ce534ccf7cfa75c33b35183b106.svg "Repobeats analytics image")

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 41 ]]; then
COPR_RELEASE="rawhide"
else
COPR_RELEASE="${RELEASE}"
fi

curl -LsSf -o /etc/yum.repos.d/_copr_mulderje-facetimehd-kmod.repo \
"https://copr.fedorainfracloud.org/coprs/mulderje/facetimehd-kmod/repo/fedora-${COPR_RELEASE}/mulderje-facetimehd-kmod-fedora-${COPR_RELEASE}.repo"

### BUILD facetimehd (succeed or fail-fast with debug output)
rpm-ostree install \
akmod-facetimehd-*.fc${RELEASE}.${ARCH}
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