[kmods,v3] linux/igb_uio: add build instructions
Checks
Commit Message
From: Anatoly Burakov <anatoly.burakov@intel.com>
Currently, compilation instructions for igb_uio are missing.
Add them, as well as referring users to per-OS subdirectories.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
v3: improvements suggested one year ago
No need to wait one more year, this patch is directly applied.
---
README | 3 +++
linux/README.rst | 58 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 61 insertions(+)
create mode 100644 linux/README.rst
@@ -8,3 +8,6 @@ Now the preference is to contribute kernel modules to the upstream project
if possible, otherwise to host kernel code in dpdk-kmods.git.
The license can be BSD-3-Clause or GPL-2.0.
+
+For specific instructions per OS,
+please refer to the README file in the respective sub-directory.
new file mode 100644
@@ -0,0 +1,58 @@
+Building Out-of-Tree Kernel Drivers for Linux
+=============================================
+
+Prerequisites
+-------------
+
+The system must have relevant Linux kernel headers or source code installed.
+
+
+Build
+-----
+
+To build ``igb_uio`` driver, simply run ``make`` command
+inside the ``igb_uio`` directory:
+
+.. code-block:: console
+
+ cd igb_uio
+ make
+
+If compiling against a specific kernel source directory is required,
+it is possible to specify the kernel source directory
+using the ``KSRC`` variable:
+
+.. code-block:: console
+
+ make KSRC=/path/to/custom/kernel/source
+
+
+Load
+----
+
+.. note::
+
+ These commands are to be run as ``root`` user.
+
+The ``igb_uio`` driver requires the UIO driver to be loaded beforehand.
+If ``uio`` is not built-in:
+
+.. code-block:: console
+
+ modprobe uio
+
+Then the out-of-tree driver may be loaded.
+
+.. code-block:: console
+
+ insmod igb_uio.ko
+
+
+Clean
+-----
+
+To clean the build directory, the following command can be run:
+
+.. code-block:: console
+
+ make clean