-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e748480
commit f4348d8
Showing
3 changed files
with
23 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,28 @@ | ||
# How to cross-compile the kernel driver | ||
# GPU Enabled Driver | ||
|
||
To cross-compile the kernel driver you need to define the `ARCH` and `CROSS_COMPILE` variables when calling `make`. Also, you need to point `KERNELDIR` to the location of the kernel sources. | ||
To build this driver you need to have the NVIDA Open GPU Kernel Modules installed. This driver will not compile gainst the CUDA toolkit drivers. | ||
|
||
For example, to cross-compile the driver for the SLAC buildroot `2019.08` version for the `x86_64` architecture, you should call `make` this way: | ||
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html | ||
|
||
See section 5. | ||
|
||
The nvidia instructions are a bit off. These are the current steps taken at the time of this readme update: | ||
|
||
```bash | ||
$ make \ | ||
ARCH=x86_64 \ | ||
CROSS_COMPILE=/afs/slac/package/linuxRT/buildroot-2019.08/host/linux-x86_64/x86_64/usr/bin/x86_64-buildroot-linux-gnu- \ | ||
KERNELDIR=/afs/slac/package/linuxRT/buildroot-2019.08/buildroot-2019.08-x86_64/output/build/linux-4.14.139 | ||
$ apt-get install nvidia-kernel-source-535-open | ||
$ apt-get install cuda-drivers-fabricmanager-535 | ||
$ cd /usr/src/nvidia-535.154.05 | ||
$ make CC=gcc-12 | ||
$ insmod nvidia.ko | ||
``` | ||
|
||
On the other hand, if you do not want to cross-compile the driver, and build it for the host instead, you need to call `make` without defining any variable: | ||
You can then build the data_gpu image. | ||
|
||
Update the makefile and edit the following line to point to the correct path to the nvida drivers: | ||
|
||
NVIDIA_DRIVERS := /usr/src/nvidia-535.154.05/nvidia | ||
|
||
```bash | ||
$ make | ||
$ insmod data_gpu.ko | ||
``` |
This file was deleted.
Oops, something went wrong.