From 0fd0d20697ac47821ccde75e12b8a94c1e1a017f Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Sun, 12 Jan 2025 22:17:56 -0800 Subject: [PATCH] chore: Kernel cleanup, fix switcheroo install --- Containerfile | 26 +++++++------------ build_files/install-kernel | 14 ---------- .../{install-akmods => install-kernel-akmods} | 11 ++++++++ 3 files changed, 21 insertions(+), 30 deletions(-) delete mode 100755 build_files/install-kernel rename build_files/{install-akmods => install-kernel-akmods} (72%) diff --git a/Containerfile b/Containerfile index 4f39480ead..eaaf15604b 100644 --- a/Containerfile +++ b/Containerfile @@ -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 \ @@ -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 && \ diff --git a/build_files/install-kernel b/build_files/install-kernel deleted file mode 100755 index 99d7183805..0000000000 --- a/build_files/install-kernel +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/bash - -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 diff --git a/build_files/install-akmods b/build_files/install-kernel-akmods similarity index 72% rename from build_files/install-akmods rename to build_files/install-kernel-akmods index d97f71cf74..4ced230963 100755 --- a/build_files/install-akmods +++ b/build_files/install-kernel-akmods @@ -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 \