From 8ddb810e084962bd19b98973c49a394cb8ad9883 Mon Sep 17 00:00:00 2001 From: Anders Rytter Hansen Date: Tue, 10 Jun 2025 09:23:59 +0200 Subject: [PATCH] Install Clang and Polly and add error reporting for Akmods modules --- Dockerfile | 7 +++++-- install-nvidia.sh | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 62c97be..5956d68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,8 @@ ENV KERNEL=${KERNEL} # Get list of kernels from CachyOS LTO repo. If the list has been updated, then akmods will be rebuilt. If it hasn't been updated, then caching of the previous build will be used. ADD "https://copr.fedorainfracloud.org/api_3/build/list?ownername=andersrh&projectname=my-ostree-os&packagename=kernel-cachyos-lts-lto-skylake" /tmp/builds.txt -RUN dnf -y update && dnf -y install wget +# Install necessary tools to build kernel modules +RUN dnf -y update && dnf -y install wget clang polly RUN dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm @@ -76,6 +77,9 @@ cd /tmp # install binutils to get strip command RUN rpm-ostree install binutils +# Install Clang and Polly so kernel modules can be built +RUN rpm-ostree install clang polly + COPY install_cachyos_kernel.sh /tmp # Enable cliwrap. RUN rpm-ostree cliwrap install-to-root / && \ @@ -83,7 +87,6 @@ RUN rpm-ostree cliwrap install-to-root / && \ /tmp/install_cachyos_kernel.sh ${KERNEL} # install akmods -RUN cat /tmp/nvidia/7.1.8-1-for-6.12.32-cachylts4.lto.skylake.fc41.x86_64.failed.log RUN ls /tmp/nvidia && /tmp/install-nvidia.sh ${KERNEL} # Install Negativo17 Nvidia driver RUN rpm-ostree install dkms-nvidia nvidia-driver ${KERNEL}-devel ${KERNEL}-devel-matched zstd diff --git a/install-nvidia.sh b/install-nvidia.sh index 64e48fc..4e23c3c 100755 --- a/install-nvidia.sh +++ b/install-nvidia.sh @@ -2,4 +2,10 @@ KERNEL_VERSION="$(rpm -q $1 --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" +if ls /tmp/nvidia/*.failed.log >/dev/null 2>&1; then + cat /tmp/nvidia/*.failed.log +else + echo "No error files present. Akmods modules were built successfully." +fi + rpm-ostree install /tmp/nvidia/*${KERNEL_VERSION}*.rpm