Question

I am having issues with my kernel driver build. I'm and building a custom (albeit very basic) NVidia RDMA driver and am receiving build warnings during the make file. Specifically it is looking for two NVidia API calls nvidia_p2p_put_pages and nvidia_p2p_get_pages. Using 'nm' is see these entry points are in the NVidia driver module (nvidia.ko). However, I'm not familiar enough with the internals of the Linux driver make file system to locate those entry points at build time.

The RDMA tool kit documentation refers to an extraction script "./NVIDIA-Linux-x86_64-.run" and a build directory. However, I was unable to locate any build files after extracting the latest driver sources.

As you can tell, I'm rather new to this. Any help would be greatly appreciated. Thanks

Was it helpful?

Solution

The basic GPUDirect RDMA documentation is here. As indicated in section 4.3, building an nvidia driver linux kernel module requires various driver header files and makefiles.

These files can be accessed as follows:

  1. get an appropriate NVIDIA linux driver installer (.run file) such as 319.72 here
  2. All nvidia linux driver installers have command line switch options. Basic options can be found by appending --help to the driver installer command string, such as:

    sh NVIDIA-Linux-x86_64-319.72.run --help
    

    more advanced options can be accessed with:

    sh NVIDIA-Linux-x86_64-319.72.run --advanced-options
    
  3. one of the advanced options is -x which will only extract the driver files, it will not "install" any:

    sh NVIDIA-Linux-x86_64-319.72.run -x
    
  4. This will create a directory where the files are available. Within this directory, the kernel directory has the necessary header files and a sample kernel module makefile which can be used to learn appropriate libraries to link against:

    cd NVIDIA-Linux-x86_64-319.72/kernel
    
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top