enjoy-digital / xtrx_julia

XTRX LiteX/LitePCIe based design for Julia Computing
BSD 2-Clause "Simplified" License
24 stars 3 forks source link

GPL incompatibilities #10

Closed maleadt closed 2 years ago

maleadt commented 2 years ago

Because of linking to a proprietary kernel module (nvidia.ko), we don't have access to GPL-only symbols (since https://lkml.org/lkml/2020/7/30/61, see https://lwn.net/Articles/827596/). We're currently working around that locally, but this obviously needs a proper fix or it's impossible to distribute this code. So we need to make it so that the LitePCIe-based driver doesn't use GPL-only symbols, which it currently does:

This will slightly complicate discovery of multiple XTRXs though, currently the PCI probe function just gets invoked multiple times, and each invocation bumps the minor number. Instead I guess we'll need a mapping from minor number to the PCIe device so that userspace can create the device nodes and the kernel can use just the minor number to figure out which PCIe device to use.

For some more info, see https://www.oreilly.com/library/view/linux-device-drivers/0596000081/ch03s02.html (with some details on how to get a dynamically-allocated major number, read that from /proc/devices, how to create device nodes, etc).

Keno commented 2 years ago

Fixed by getting NVIDIA to open source their drivers: https://github.com/NVIDIA/open-gpu-kernel-modules/.