Skip to content

Commit

Permalink
chore: Kernel cleanup, fix switcheroo install
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Jan 13, 2025
1 parent dcb1fc5 commit 5aa5217
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 33 deletions.
32 changes: 13 additions & 19 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,12 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
RUN --mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=cache,dst=/var/cache/rpm-ostree \
--mount=type=bind,from=kernel,src=/tmp/rpms,dst=/tmp/kernel-rpms \
--mount=type=bind,from=akmods,src=/rpms,dst=/tmp/akmods-rpms \
--mount=type=bind,from=akmods-extra,src=/rpms,dst=/tmp/akmods-extra-rpms \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=tmpfs,dst=/tmp \
/ctx/install-kernel && \
/ctx/install-kernel-akmods && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/rpmfusion-*.repo && \
dnf5 -y install \
scx-scheds && \
dnf5 -y swap \
Expand Down Expand Up @@ -156,28 +159,19 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
/ctx/install-firmware && \
/ctx/cleanup

# Add ublue packages
# Install patched fwupd
# Install Valve's patched Mesa, Pipewire, Bluez, and Xwayland
# Install patched switcheroo control with proper discrete GPU support
RUN --mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=cache,dst=/var/cache/rpm-ostree \
--mount=type=bind,from=akmods,src=/rpms,dst=/tmp/akmods-rpms \
--mount=type=bind,from=akmods-extra,src=/rpms,dst=/tmp/akmods-extra-rpms \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=tmpfs,dst=/tmp \
dnf5 -y copr enable ublue-os/akmods && \
/ctx/install-akmods && \
dnf5 -y swap \
--repo copr:copr.fedorainfracloud.org:ublue-os:staging \
fwupd fwupd && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/rpmfusion-*.repo && \
/ctx/cleanup

# Install Valve's patched Mesa, Pipewire, Bluez, and Xwayland#
# Install patched switcheroo control with proper discrete GPU support
# Tempporary fix for GPU Encoding
RUN --mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=cache,dst=/var/cache/rpm-ostree \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=tmpfs,dst=/tmp \
dnf5 -y swap \
--repo terra-extras \
switcheroo-control switcheroo-control && \
dnf5 -y swap \
--repo terra-extras \
mesa-filesystem mesa-filesystem && \
Expand Down Expand Up @@ -508,7 +502,7 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
glib-compile-schemas /usr/share/glib-2.0/schemas &>/dev/null && \
rm -r /tmp/bazzite-schema-test && \
sed -i 's/stage/none/g' /etc/rpm-ostreed.conf && \
dnf5 copr disable -y ublue-os/akmods && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \
dnf5 copr disable -y kylegospo/bazzite && \
dnf5 copr disable -y kylegospo/bazzite-multilib && \
dnf5 copr disable -y ublue-os/staging && \
Expand Down Expand Up @@ -585,7 +579,7 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=cache,dst=/var/cache/rpm-ostree \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=tmpfs,dst=/tmp \
dnf5 -y copr enable ublue-os/akmods && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \
dnf5 -y copr enable kylegospo/bazzite && \
dnf5 -y copr enable kylegospo/bazzite-multilib && \
dnf5 -y copr enable kylegospo/LatencyFleX && \
Expand Down Expand Up @@ -695,7 +689,7 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
; fi && \
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/input-remapper-gtk.desktop && \
cp "/usr/share/ublue-os/firstboot/yafti.yml" "/etc/yafti.yml" && \
dnf5 copr disable -y ublue-os/akmods && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \
dnf5 copr disable -y kylegospo/bazzite && \
dnf5 copr disable -y kylegospo/bazzite-multilib && \
dnf5 copr disable -y kylegospo/LatencyFleX && \
Expand Down
14 changes: 0 additions & 14 deletions build_files/install-kernel

This file was deleted.

11 changes: 11 additions & 0 deletions build_files/install-akmods → build_files/install-kernel-akmods
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

set -eoux pipefail

for pkg in kernel kernel-core kernel-modules kernel-modules-core kernel-modules-extra
do
rpm --erase "$pkg" --nodeps
done

dnf5 -y install \
/tmp/kernel-rpms/kernel-[0-9]*.rpm \
/tmp/kernel-rpms/kernel-core-*.rpm \
/tmp/kernel-rpms/kernel-modules-*.rpm \
/tmp/kernel-rpms/kernel-uki-virt-*.rpm

dnf5 -y install \
/tmp/akmods-rpms/kmods/*kvmfr*.rpm \
/tmp/akmods-rpms/kmods/*xone*.rpm \
Expand Down

0 comments on commit 5aa5217

Please sign in to comment.