Skip to content

Commit

Permalink
Update README for RHEL7-derivatives.
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Mittman <kmittman@nvidia.com>
  • Loading branch information
kmittman committed Apr 9, 2021
1 parent f364019 commit 3367522
Showing 1 changed file with 35 additions and 6 deletions.
41 changes: 35 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,30 +116,59 @@ git checkout remotes/origin/main -- build.sh

### Generate tarball from runfile

> _note:_ architecture is `x86_64`, `ppc64le`, or `aarch64` (sbsa)
```shell
version="450.102.04"
sh NVIDIA-Linux-x86_64-${version}.run --extract-only --target extract
mkdir nvidia-kmod-${version}-x86_64
mv extract/kernel nvidia-kmod-${version}-x86_64/
tar -cJf nvidia-kmod-${version}-x86_64.tar.xz nvidia-kmod-${version}-x86_64
sh NVIDIA-Linux-${arch}-${version}.run --extract-only --target extract
mkdir nvidia-kmod-${version}-${arch}
mv extract/kernel nvidia-kmod-${version}-${arch}/
tar -cJf nvidia-kmod-${version}-${arch}.tar.xz nvidia-kmod-${version}-${arch}
```

### Packaging
### Packaging (`dnf` distros)
> note: `fedora` & `rhel8`-based distros
```shell
mkdir BUILD BUILDROOT RPMS SRPMS SOURCES SPECS
cp dkms-nvidia.conf SOURCES/
cp nvidia-kmod-${version}-x86_64.tar.xz SOURCES/
cp nvidia-kmod-${version}-${arch}.tar.xz SOURCES/
cp dkms-nvidia.spec SPECS/

rpmbuild \
--define "%_topdir $(pwd)" \
--define "debug_package %{nil}" \
--define "version $version" \
--define "epoch 3" \
--target "${arch}" \
-v -bb SPECS/dkms-nvidia.spec
```

### Packaging (`yum` distros)
> note: `rhel7`-based distros
```shell
mkdir BUILD BUILDROOT RPMS SRPMS SOURCES SPECS
cp dkms-nvidia.conf SOURCES/
cp nvidia-kmod-${version}-${arch}.tar.xz SOURCES/
cp dkms-nvidia.spec SPECS/

# latest-dkms
rpmbuild \
--define "%_topdir $(pwd)" \
--define "debug_package %{nil}" \
--define "version $version" \
--define "driver_branch latest-dkms" \
--define "is_dkms 1" \
--define "is_latest 1" \
--define "epoch 3" \
--target "${arch}" \
-v -bb SPECS/dkms-nvidia.spec
```

> _note:_ to build `kmod-nvidia-branch-XXX` and `kmod-nvidia-latest` packages see [yum-packaging-precompiled-kmod](https://github.com/NVIDIA/yum-packaging-precompiled-kmod)

## Related

### Precompiled kernel modules
Expand Down

0 comments on commit 3367522

Please sign in to comment.