Skip to content

Commit 71ac101

Browse files
authored
Merge pull request #373 from NVIDIA/rhel9-arm-support
[rhel9] add support for ARM-based OS versions
2 parents 2b8a4da + ce3650f commit 71ac101

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

rhel9/nvidia-driver

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,19 @@ _install_prerequisites() (
142142

143143
echo "Generating Linux kernel version string..."
144144
if [ "$TARGETARCH" = "arm64" ]; then
145-
gunzip -c /lib/modules/${KERNEL_VERSION}/vmlinuz | strings | grep -E '^Linux version' | sed 's/^\(.*\)\s\+(.*)$/\1/' > version
145+
# Download unzboot as kernel images are compressed in the zboot format on RHEL 9 arm64
146+
# unzboot is only available on the EPEL RPM repo
147+
dnf -q -y --releasever=${DNF_RELEASEVER} install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
148+
dnf config-manager --enable epel
149+
dnf -q -y --releasever=${DNF_RELEASEVER} install unzboot
150+
151+
if ! unzboot /lib/modules/${KERNEL_VERSION}/vmlinuz vmlinuz.out; then
152+
echo "Could not extract /lib/modules/${KERNEL_VERSION}/vmlinuz" >&2
153+
return 1
154+
fi
155+
156+
< vmlinuz.out strings | grep -E '^Linux version' | sed 's/^\(.*\)\s\+(.*)$/\1/' > version
157+
rm vmlinuz.out
146158
else
147159
extract-vmlinux /lib/modules/${KERNEL_VERSION}/vmlinuz | strings | grep -E '^Linux version' | sed 's/^\(.*\)\s\+(.*)$/\1/' > version
148160
fi

0 commit comments

Comments
 (0)