Skip to content

Commit c9db743

Browse files
committed
chore(kernel): update rendered specs and lock file
1 parent bcf976c commit c9db743

6 files changed

Lines changed: 197 additions & 2 deletions

File tree

locks/kernel.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
version = 1
33
import-commit = '5271a1b047ef402ddee40242e02eda23fc273044'
44
upstream-commit = '5271a1b047ef402ddee40242e02eda23fc273044'
5-
input-fingerprint = 'sha256:82d24969e4576bf0f638eea5e7a4a09d61a5579749ea70547ba9353ff0d0d6b4'
5+
input-fingerprint = 'sha256:603dcec59568387befea58aca727d9d2b468d44a87f9c3d84d5667f146045e56'
66
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'

specs/k/kernel/kernel.azl.macros

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# Do not edit manually; changes will be overwritten.
33
%_without_debug 1
44
%_without_selftests 1
5-
%azl_pkgrelease 18
5+
%azl_pkgrelease 19
66
%azurelinux_version 3
77
%kextraversion 1
8+
%nvidia_open_branch 595
9+
%nvidia_open_version 595.58.03

specs/k/kernel/kernel.spec

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,9 @@ Source9999: kernel.azl.macros
11741174
Source5000: 6.18-x86_64-azl.config
11751175
Source5001: 6.18-aarch64-azl.config
11761176
Source5002: azurelinux-ca-20230216.pem
1177+
Source6000: open-gpu-kernel-modules-%{nvidia_open_version}.tar.gz
1178+
Source6001: kmod-nvidia-open-modprobe.conf
1179+
Source6002: kmod-nvidia-open.inc
11771180

11781181
## Patches needed for building this package
11791182

@@ -1224,6 +1227,13 @@ AutoProv: yes\
12241227
%{nil}
12251228

12261229

1230+
1231+
# AZL: kmod subpackage declarations (nvidia-open)
1232+
%global _kmod_phase package
1233+
%global _kmod_name nvidia-open
1234+
%include %{_sourcedir}/kmod-nvidia-open.inc
1235+
1236+
# AZL-KMOD-PACKAGE-ANCHOR — do not remove (kmod overlays chain here)
12271237
%package doc
12281238
Summary: Various documentation bits found in the kernel source
12291239
Group: Documentation
@@ -2245,6 +2255,13 @@ OPTS="-w -n -c"
22452255
RHJOBS=$RPM_BUILD_NCPUS SPECPACKAGE_NAME=%{name} ./process_configs.sh $OPTS %{specrpmversion}
22462256
cd ../..
22472257
%endif
2258+
2259+
# AZL: Prepare kmod subpackage sources (nvidia-open)
2260+
%global _kmod_phase prep
2261+
%global _kmod_name nvidia-open
2262+
%include %{_sourcedir}/kmod-nvidia-open.inc
2263+
2264+
# AZL-KMOD-PREP-ANCHOR — do not remove (kmod overlays chain here)
22482265
%build
22492266
%{log_msg "Start of build stage"}
22502267

@@ -3377,6 +3394,13 @@ find Documentation -type d | xargs chmod u+w
33773394
%{log_msg "end install docs"}
33783395
%endif
33793396

3397+
# AZL: Build kmod subpackage modules (nvidia-open)
3398+
%global _kmod_phase build
3399+
%global _kmod_name nvidia-open
3400+
%include %{_sourcedir}/kmod-nvidia-open.inc
3401+
3402+
# AZL-KMOD-BUILD-ANCHOR — do not remove (kmod overlays chain here)
3403+
33803404
# Module signing (modsign)
33813405
#
33823406
# This must be run _after_ find-debuginfo.sh runs, otherwise that will strip
@@ -3877,6 +3901,14 @@ find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/
38773901
popd
38783902
%endif
38793903

3904+
###
3905+
# AZL: Install kmod subpackage files (nvidia-open)
3906+
%global _kmod_phase install
3907+
%global _kmod_name nvidia-open
3908+
%include %{_sourcedir}/kmod-nvidia-open.inc
3909+
3910+
# AZL-KMOD-INSTALL-ANCHOR — do not remove (kmod overlays chain here)
3911+
38803912
###
38813913
### clean
38823914
###
@@ -4538,6 +4570,13 @@ fi\
45384570
# and build.
45394571
#
45404572
#
4573+
4574+
# AZL: kmod subpackage file lists and scriptlets (nvidia-open)
4575+
%global _kmod_phase files
4576+
%global _kmod_name nvidia-open
4577+
%include %{_sourcedir}/kmod-nvidia-open.inc
4578+
4579+
# AZL-KMOD-FILES-ANCHOR — do not remove (kmod overlays chain here)
45414580
%changelog
45424581
* Thu Feb 19 2026 Augusto Caringi <acaringi@redhat.com> [6.18.13-0]
45434582
- Linux v6.18.13
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# kmod-nvidia-open modprobe configuration
2+
# Blacklist nouveau to prevent conflicts with NVIDIA open kernel modules
3+
blacklist nouveau
4+
options nouveau modeset=0
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# kmod-nvidia-open.inc — NVIDIA open GPU kernel module subpackage
2+
#
3+
# Phases: package, prep, build, install, files
4+
# Activated by: setting _kmod_phase global + include from kernel.comp.toml overlays
5+
#
6+
# Requires these defines/sources in kernel.spec (injected via comp.toml overlays):
7+
# nvidia_open_version — NVIDIA driver version (e.g. 595.58.03)
8+
# SOURCE6000 — open-gpu-kernel-modules tarball
9+
# SOURCE6001 — kmod-nvidia-open-modprobe.conf
10+
11+
# =========================================================================
12+
# Phase: package — subpackage declaration
13+
# =========================================================================
14+
%if "%{_kmod_phase}" == "package" && %{with_up_base}
15+
16+
%ifarch x86_64 aarch64
17+
%package -n kmod-%{_kmod_name}-%{nvidia_open_branch}
18+
Summary: NVIDIA open GPU kernel modules (driver %{nvidia_open_version})
19+
AutoReq: no
20+
# NOTE: Version is inherited from kernel (%{version}), NOT nvidia_open_version.
21+
# Track the actual NVIDIA driver version via Provides for dependency resolution.
22+
Provides: nvidia-open-kmod-version = %{nvidia_open_version}
23+
provides: nvidia-kmod = %{nvidia_open_version}
24+
Provides: kmod-%{_kmod_name} = %{version}-%{release}
25+
Requires: %{name}-core-uname-r = %{KVERREL}
26+
Requires(post): kmod
27+
Requires(postun): kmod
28+
Conflicts: nvidia-closed-kmod
29+
30+
%description -n kmod-%{_kmod_name}-%{nvidia_open_branch}
31+
Open-source NVIDIA GPU kernel modules (driver version %{nvidia_open_version})
32+
built from the official NVIDIA/open-gpu-kernel-modules repository for
33+
kernel %{KVERREL}.
34+
35+
These modules support CUDA workloads on NVIDIA GPUs (Turing and later).
36+
Modules: nvidia.ko, nvidia-modeset.ko, nvidia-drm.ko, nvidia-uvm.ko,
37+
nvidia-peermem.ko.
38+
39+
Each kernel version produces a separate kmod package
40+
(kmod-nvidia-open-<nvidia_branch>-<KVERREL>) so that multiple kernel versions
41+
can coexist with their own NVIDIA modules.
42+
Use 'Requires: nvidia-open-kmod-version = %{nvidia_open_version}' to depend on a
43+
specific NVIDIA driver version, or 'Requires: kmod-nvidia-open' for any version.
44+
%endif
45+
46+
%endif
47+
48+
# =========================================================================
49+
# Phase: prep — extract NVIDIA source tarball
50+
# =========================================================================
51+
%if "%{_kmod_phase}" == "prep" && %{with_up_base}
52+
53+
%ifarch x86_64 aarch64
54+
cd %{_builddir}
55+
tar -xf %{SOURCE6000}
56+
cd -
57+
%endif
58+
59+
%endif
60+
61+
# =========================================================================
62+
# Phase: build — compile NVIDIA kernel modules
63+
# =========================================================================
64+
%if "%{_kmod_phase}" == "build" && %{with_up_base}
65+
66+
%ifarch x86_64 aarch64
67+
%{log_msg "Building NVIDIA open GPU kernel modules %{nvidia_open_version} for %{KVERREL}"}
68+
pushd %{_builddir}/open-gpu-kernel-modules-%{nvidia_open_version}
69+
# Unset LDFLAGS — NVIDIA kbuild invokes ld directly, not via gcc
70+
unset LDFLAGS
71+
# IGNORE_CC_MISMATCH=1: kmod is a kernel subpackage built in the same
72+
# mock chroot with the same GCC. The flag suppresses NVIDIA's compiler-string
73+
# comparison which can false-positive on path or version-string formatting
74+
# differences even when the toolchain is identical.
75+
# CONFIG_OBJTOOL_WERROR=: NVIDIA's precompiled binary blob (nv-kernel.o_binary)
76+
# contains bare 'ret' instructions that fail objtool's rethunk validation when
77+
# CONFIG_MITIGATION_RETHUNK=y. Clearing this config on the make command line
78+
# propagates through GNU make's recursive $(MAKE) into kbuild, turning the
79+
# objtool errors into non-fatal warnings. The kernel itself is already fully
80+
# built and validated with objtool by this point.
81+
# Ref: https://forums.developer.nvidia.com/t/360610
82+
make %{?_smp_mflags} modules \
83+
KERNEL_UNAME="%{KVERREL}" \
84+
SYSSRC="%{_builddir}/kernel-%{tarfile_release}/linux-%{KVERREL}" \
85+
SYSOUT="%{_builddir}/kernel-%{tarfile_release}/linux-%{KVERREL}" \
86+
IGNORE_CC_MISMATCH=1 \
87+
IGNORE_XEN_PRESENCE=1 \
88+
IGNORE_PREEMPT_RT_PRESENCE=1 \
89+
NV_EXCLUDE_BUILD_MODULES="" \
90+
CONFIG_OBJTOOL_WERROR=
91+
popd
92+
%endif
93+
94+
%endif
95+
96+
# =========================================================================
97+
# Phase: install — install modules, config, and license
98+
# =========================================================================
99+
%if "%{_kmod_phase}" == "install" && %{with_up_base}
100+
101+
%ifarch x86_64 aarch64
102+
%{log_msg "Installing NVIDIA open GPU kernel modules for %{KVERREL}"}
103+
install -d %{buildroot}/lib/modules/%{KVERREL}/extra/nvidia
104+
for mod in nvidia nvidia-modeset nvidia-drm nvidia-uvm nvidia-peermem; do
105+
ko="%{_builddir}/open-gpu-kernel-modules-%{nvidia_open_version}/kernel-open/${mod}.ko"
106+
install -m 0644 "${ko}" %{buildroot}/lib/modules/%{KVERREL}/extra/nvidia/
107+
done
108+
# Install modprobe config to blacklist conflicting modules
109+
install -D -m 0644 %{SOURCE6001} %{buildroot}%{_sysconfdir}/modprobe.d/kmod-%{_kmod_name}-%{nvidia_open_branch}.conf
110+
# Install depmod override config
111+
install -d %{buildroot}%{_sysconfdir}/depmod.d
112+
cat > %{buildroot}%{_sysconfdir}/depmod.d/kmod-%{_kmod_name}-%{nvidia_open_branch}.conf << 'DEPMOD_EOF'
113+
override nvidia %{KVERREL} extra/nvidia
114+
override nvidia-modeset %{KVERREL} extra/nvidia
115+
override nvidia-drm %{KVERREL} extra/nvidia
116+
override nvidia-uvm %{KVERREL} extra/nvidia
117+
override nvidia-peermem %{KVERREL} extra/nvidia
118+
DEPMOD_EOF
119+
# Install NVIDIA license file
120+
install -D -m 0644 %{_builddir}/open-gpu-kernel-modules-%{nvidia_open_version}/COPYING \
121+
%{buildroot}%{_datadir}/licenses/kmod-%{_kmod_name}-%{nvidia_open_branch}/COPYING
122+
%endif
123+
124+
%endif
125+
126+
# =========================================================================
127+
# Phase: files — scriptlets and file list
128+
# =========================================================================
129+
%if "%{_kmod_phase}" == "files" && %{with_up_base}
130+
131+
%ifarch x86_64 aarch64
132+
%post -n kmod-%{_kmod_name}-%{nvidia_open_branch}
133+
%{_sbindir}/depmod -a %{KVERREL} || :
134+
135+
%postun -n kmod-%{_kmod_name}-%{nvidia_open_branch}
136+
%{_sbindir}/depmod -a %{KVERREL} || :
137+
138+
%files -n kmod-%{_kmod_name}-%{nvidia_open_branch}
139+
%license %{_datadir}/licenses/kmod-%{_kmod_name}-%{nvidia_open_branch}/COPYING
140+
/lib/modules/%{KVERREL}/extra/nvidia/nvidia.ko.%{compext}
141+
/lib/modules/%{KVERREL}/extra/nvidia/nvidia-modeset.ko.%{compext}
142+
/lib/modules/%{KVERREL}/extra/nvidia/nvidia-drm.ko.%{compext}
143+
/lib/modules/%{KVERREL}/extra/nvidia/nvidia-uvm.ko.%{compext}
144+
/lib/modules/%{KVERREL}/extra/nvidia/nvidia-peermem.ko.%{compext}
145+
%config(noreplace) %{_sysconfdir}/modprobe.d/kmod-%{_kmod_name}-%{nvidia_open_branch}.conf
146+
%{_sysconfdir}/depmod.d/kmod-%{_kmod_name}-%{nvidia_open_branch}.conf
147+
%endif
148+
149+
%endif

specs/k/kernel/sources

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ SHA512 (linux-6.18.13.tar.xz) = a1d1b27391ed55ae2b17dd25841037d3399e4d87900eb098
22
SHA512 (kernel-abi-stablelists-6.18.13.tar.xz) = 69bbcdd86ae7999b19de306c29bc5cef442e309a8b033900c10a206a97d61b8b4e6d7c6baf6d356daf14e85766bd6a31120b54cfd1eb1c773450e44bae5d2d9b
33
SHA512 (kernel-kabi-dw-6.18.13.tar.xz) = 6473ea636d813e602a59d7332255c4b4597032501a2ed0507985800500451065618a0b6909663e3dc8db2b75c6f4ba10d498dbc41a3b42758cae38f30ca13115
44
SHA512 (kernel-6.18.5.1.tar.gz) = 0d8c755e02857704eb4c4396657ad30b22b474296233b8681365aeaa2fc16926afe31f551e80f565e0d73318f2b7941051ec44f85ccbabaa28ba5a56022f9f4a
5+
SHA256 (open-gpu-kernel-modules-595.58.03.tar.gz) = e0c4659ddf15e4f4e19cee05b49f88c9ba08ef3add0dfe08249798f58d0fe75e

0 commit comments

Comments
 (0)