Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit 18545f0

Browse files
committed
chore: install bazzite kernel from akmods
1 parent 06e7a4b commit 18545f0

File tree

6 files changed

+287
-51
lines changed

6 files changed

+287
-51
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Note: to test it out on QEMU/Virt-manager, switch display input from Virtio to Q
66

77
Latest Live ISO builds:
88
- **Stable**: https://github.com/Cosmium-OS/Cosmium/actions/workflows/build-iso-live.yml?query=is%3Asuccess
9-
- **Testing** (even more updates than stable): https://github.com/Cosmium-OS/Cosmium/actions/workflows/build-iso-live-testing.yml?query=is%3Asuccess
9+
- **Testing**: https://github.com/Cosmium-OS/Cosmium/actions/workflows/build-iso-live-testing.yml?query=is%3Asuccess
1010

1111
Grab the latest successful artifact for either Desktop or Gaming Handheld Edition (`cosmium` or `cosmium-deck`). To download an artifact without logging in to GitHub, you can replace `github.com` to `nightly.link` in URL. No matter for how long those ISOs wasn't updated, you can still perform an update by running `sudo bootc update` no matter what. New builds would be triggered when it is appropriate to do so (like changing branding, new flatpak apps, fixes to Live ISO environment, etc). We're using Universal Blue's [titanoboa](https://github.com/ublue-os/titanoboa) to make this happen :).
1212

@@ -22,9 +22,9 @@ TODO:
2222
- [ ] Switch to Anaconda WebUI when it is stable enough
2323
- [ ] Add more third-party themes to the system and maybe even widgets
2424
- [x] Switch to own underlying image of Fedora COSMIC Atomic ~~when Universal Blue will [deprecated it](https://github.com/ublue-os/main/issues/927)~~ ([`cosmic-atomic-custom`](https://github.com/Cosmium-OS/cosmic-atomic-custom), do it like Winblues does)
25-
- [ ] Add Nvidia-open variants (can be done in cosmic-atomic-custom for now)
25+
- [ ] Add Nvidia-open variants
2626
- [ ] Do a proper branding
27-
- [ ] Figure out secure boot and kernel signing
28-
- [ ] Turn off compiling akmods for no reason
27+
- [x] ~~Figure out secure boot and kernel signing~~
28+
- [ ] Turn off compiling akmods for no reason in Live ISO env
2929

30-
Thanks to https://github.com/askpng/solarpowered for providing some hack for installing Bazzite kernel!
30+
Thanks to https://github.com/askpng/solarpowered for providing some hack that was previously used for installing Bazzite kernel!

files/scripts/bazzite-kernel.sh

Lines changed: 27 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env bash
2-
# based on https://github.com/askpng/solarpowered/blob/main/files/scripts/base/bazzite.sh
32

4-
set -ouex pipefail
3+
set -oue pipefail
54

65
echo 'Removing existing kernel from the image.'
76
dnf5 remove -y --no-autoremove \
@@ -23,45 +22,32 @@ dnf5 install -y scx-scheds
2322
echo 'Removing kernel-cachyos-addons COPR repo file'
2423
rm /etc/yum.repos.d/_copr_bieszczaders-kernel-cachyos-addons.repo
2524

26-
rm -drf /usr/lib/modules/*
27-
28-
GIT=https://github.com/bazzite-org/kernel-bazzite
29-
GITOWNER=$(echo "$GIT" | sed -E 's#https://github.com/([^/]+)/([^/]+)(\.git)*#\1#')
30-
GITREPO=$(echo "$GIT" | sed -E 's#https://github.com/([^/]+)/([^/]+)(\.git)*#\2#')
31-
32-
KERNEL_TAG=$(curl --fail --retry 5 --retry-delay 5 --retry-all-errors -s https://api.github.com/repos/$GITOWNER/$GITREPO/releases/latest | grep tag_name | cut -d : -f2 | tr -d 'v", ' | grep -Ev '\-[0-9]+\.[0-9]+$' | head -1)
33-
KERNEL_VERSION=$KERNEL_TAG
34-
OS_VERSION=$(rpm -E %fedora)
35-
36-
echo 'Installing Bazzite kernel.'
37-
dnf5 install -y \
38-
https://github.com/$GITOWNER/$GITREPO/releases/download/$KERNEL_TAG/kernel-$KERNEL_VERSION.bazzite.fc$OS_VERSION.x86_64.rpm \
39-
https://github.com/$GITOWNER/$GITREPO/releases/download/$KERNEL_TAG/kernel-core-$KERNEL_VERSION.bazzite.fc$OS_VERSION.x86_64.rpm \
40-
https://github.com/$GITOWNER/$GITREPO/releases/download/$KERNEL_TAG/kernel-modules-$KERNEL_VERSION.bazzite.fc$OS_VERSION.x86_64.rpm \
41-
https://github.com/$GITOWNER/$GITREPO/releases/download/$KERNEL_TAG/kernel-modules-core-$KERNEL_VERSION.bazzite.fc$OS_VERSION.x86_64.rpm \
42-
https://github.com/$GITOWNER/$GITREPO/releases/download/$KERNEL_TAG/kernel-modules-extra-$KERNEL_VERSION.bazzite.fc$OS_VERSION.x86_64.rpm \
43-
https://github.com/$GITOWNER/$GITREPO/releases/download/$KERNEL_TAG/kernel-modules-extra-matched-$KERNEL_VERSION.bazzite.fc$OS_VERSION.x86_64.rpm \
44-
https://github.com/$GITOWNER/$GITREPO/releases/download/$KERNEL_TAG/kernel-devel-$KERNEL_VERSION.bazzite.fc$OS_VERSION.x86_64.rpm \
45-
https://github.com/$GITOWNER/$GITREPO/releases/download/$KERNEL_TAG/kernel-devel-matched-$KERNEL_VERSION.bazzite.fc$OS_VERSION.x86_64.rpm
46-
47-
echo 'Downloading ublue-os akmods COPR repo file'
48-
curl --retry 5 -L https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/repo/fedora-$(rpm -E %fedora)/ublue-os-akmods-fedora-$(rpm -E %fedora).repo -o /etc/yum.repos.d/_copr_ublue-os-akmods.repo
49-
50-
rm -rf /var/tmp
51-
mkdir -p /var/tmp
52-
chmod -R 1777 /var/tmp
53-
54-
# not really sure if we need this
55-
echo 'Installing zenergy kmod'
56-
dnf5 install -y \
57-
akmod-zenergy-*.fc$OS_VERSION.x86_64
58-
59-
akmods --force --kernels $KERNEL_VERSION.bazzite.fc$OS_VERSION.x86_64 --kmod zenergy
60-
modinfo /usr/lib/modules/$KERNEL_VERSION.bazzite.fc$OS_VERSION.x86_64/extra/zenergy/zenergy.ko.xz > /dev/null \
61-
|| (find /var/cache/akmods/zenergy/ -name \*.log -print -exec cat {} \; && exit 1)
62-
63-
echo 'Removing ublue-os akmods COPR repo file'
64-
rm /etc/yum.repos.d/_copr_ublue-os-akmods.repo
25+
echo 'Installing Bazzite kernel'
26+
dnf5 -y install \
27+
/tmp/kernel-rpms/kernel-[0-9]*.rpm \
28+
/tmp/kernel-rpms/kernel-core-*.rpm \
29+
/tmp/kernel-rpms/kernel-modules-*.rpm \
30+
/tmp/kernel-rpms/kernel-tools-[0-9]*.rpm \
31+
/tmp/kernel-rpms/kernel-tools-libs-[0-9]*.rpm \
32+
/tmp/kernel-rpms/kernel-devel-*.rpm
6533

6634
echo 'Locking kernel version'
6735
dnf5 versionlock add kernel kernel-devel kernel-devel-matched kernel-core kernel-modules kernel-modules-core kernel-modules-extra kernel-tools kernel-tools-libs
36+
37+
echo 'Installing extra akmod RPMs'
38+
dnf5 -y install \
39+
/tmp/akmods-rpms/kmods/*kvmfr*.rpm \
40+
/tmp/akmods-rpms/kmods/*xone*.rpm \
41+
/tmp/akmods-rpms/kmods/*openrazer*.rpm \
42+
/tmp/akmods-rpms/kmods/*v4l2loopback*.rpm \
43+
/tmp/akmods-rpms/kmods/*wl*.rpm \
44+
/tmp/akmods-rpms/kmods/*framework-laptop*.rpm \
45+
/tmp/akmods-extra-rpms/kmods/*nct6687*.rpm \
46+
/tmp/akmods-extra-rpms/kmods/*gcadapter_oc*.rpm \
47+
/tmp/akmods-extra-rpms/kmods/*zenergy*.rpm \
48+
/tmp/akmods-extra-rpms/kmods/*vhba*.rpm \
49+
/tmp/akmods-extra-rpms/kmods/*gpd-fan*.rpm \
50+
/tmp/akmods-extra-rpms/kmods/*ayaneo-platform*.rpm \
51+
/tmp/akmods-extra-rpms/kmods/*ayn-platform*.rpm \
52+
/tmp/akmods-extra-rpms/kmods/*bmi260*.rpm \
53+
/tmp/akmods-extra-rpms/kmods/*ryzen-smu*.rpm
Lines changed: 233 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)