feat: Add akmods module (#89)
* feat: Add kmods installer module Credits: @C0dePlayer This is not ideal as it does not support custom kernels & it involves editing Containerfile. I believe there is no other way but to make users edit Containerfile for those files to be even pulled of. I would like this to be through the recipe only, so I will put this as a draft until some better ideas come. * Rename kmods installer to akmods * Update README Address: https://github.com/ublue-os/startingpoint/pull/212#issuecomment-1870156327 https://github.com/ublue-os/bling/pull/89#discussion_r1436890002 * Fix README typo * Remove non-needed space for yml in README * Add support for Surface & Asus images * Clarify tagged base image warning better * Clarify tagged base image warning better pt.2 * There is no need to fetch main-nvidia build for now * Use simpler =~ for conditioning instead of grep & sed This finally fixes akmods module * Install kernel-devel-matched for all builds * Assure that Surface installs their version of kernel-devel-matched * Mention that framework images can be used as a base * Delete duplicate warning message * Remove non-needed explanation on why only Universal Blue builds are supported * Clarify 1st warning better * Clarify `main` akmods compatibility better This would avoid editing README if some other compatible image gets announced or discontinued. * docs(akmods): grammar fixes * docs: add link to akmod tag matrix --------- Co-authored-by: xyny <60004820+xynydev@users.noreply.github.com>
This commit is contained in:
parent
3e17e2c1dd
commit
e8272a4dd1
2 changed files with 60 additions and 0 deletions
40
modules/akmods/README.md
Normal file
40
modules/akmods/README.md
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
> [!WARNING]
|
||||
> Only Universal Blue based images are officially supported.
|
||||
|
||||
> [!WARNING]
|
||||
> Universal Blue builds with Fedora 38 & below are not supported.
|
||||
|
||||
> [!WARNING]
|
||||
> Custom kernels are not supported.
|
||||
|
||||
# `akmods` Module for Startingpoint
|
||||
|
||||
The `akmods` module is a tool used for managing and installing kernel modules. It simplifies the installation of kernel modules, improving the capabilities of your system.
|
||||
|
||||
List of all available kernel modules & versions/tags are here:
|
||||
https://github.com/ublue-os/akmods
|
||||
|
||||
Ublue-os-akmods-addons & ublue-os-nvidia-addons are already included when necessary, so they are not needed to install.
|
||||
|
||||
To use the `akmods` module, specify the kernel modules you wish to install in the `install:` section of your recipe/configuration file.
|
||||
|
||||
## Example configuration
|
||||
```yaml
|
||||
type: akmods
|
||||
install:
|
||||
- openrazer
|
||||
- openrgb
|
||||
- v4l2loopback
|
||||
- winesync
|
||||
```
|
||||
|
||||
By default, the `akmods` module installs the `main` akmods for `latest` version of Fedora.
|
||||
`main` akmods are also compatible with other images except `surface(-nvidia)` & `asus(-nvidia)`.
|
||||
|
||||
If you want to install akmods for `surface(-nvidia)` or `asus(-nvidia)` images, or for `older version of Fedora`, change this part in the Containerfile:
|
||||
See available tags here: https://github.com/ublue-os/akmods/#how-its-organized
|
||||
|
||||
```
|
||||
# Change this if you want different version/tag of akmods.
|
||||
COPY --from=ghcr.io/ublue-os/akmods:main-39 /rpms /tmp/rpms
|
||||
```
|
||||
20
modules/akmods/akmods.sh
Normal file
20
modules/akmods/akmods.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
set -oue pipefail
|
||||
|
||||
BASED_IMAGE=$(echo "${BASE_IMAGE}")
|
||||
|
||||
get_yaml_array INSTALL '.install[]' "$1"
|
||||
|
||||
INSTALL_PATH=("${INSTALL[@]/#/\/tmp/rpms/kmods/*}")
|
||||
INSTALL_PATH=("${INSTALL_PATH[@]/%/*.rpm}")
|
||||
INSTALL_STR=$(echo "${INSTALL_PATH[*]}" | tr -d '\n')
|
||||
|
||||
if [[ ${#INSTALL[@]} -gt 0 ]]; then
|
||||
echo "Installing akmods"
|
||||
echo "Installing: $(echo "${INSTALL[*]}" | tr -d '\n')"
|
||||
if [[ "$BASED_IMAGE" =~ "surface" ]]; then
|
||||
rpm-ostree install kernel-surface-devel-matched $INSTALL_STR
|
||||
else
|
||||
rpm-ostree install kernel-devel-matched $INSTALL_STR
|
||||
fi
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue