[OpenPower-Firmware] [PATCH 1/2] Add packages to support Infiniband

Daniel M. Weeks weeksd2 at rpi.edu
Fri Apr 17 06:42:16 AEST 2020


This adds basic userspace components to support Infiniband (newer
Mellanox adapters only).

Signed-off-by: Daniel M. Weeks <weeksd2 at rpi.edu>
---
 openpower/custom/Config.in                    |  4 ++++
 openpower/custom/external.mk                  |  1 +
 openpower/custom/package/libibverbs/Config.in |  5 +++++
 .../custom/package/libibverbs/libibverbs.mk   | 17 +++++++++++++++++
 openpower/custom/package/libmlx5/Config.in    |  5 +++++
 openpower/custom/package/libmlx5/libmlx5.mk   | 19 +++++++++++++++++++
 .../libmlx5/0001-libmlx5-no-includedir.patch  |  8 ++++++++
 7 files changed, 59 insertions(+)
 create mode 100644 openpower/custom/external.mk
 create mode 100644 openpower/custom/package/libibverbs/Config.in
 create mode 100644 openpower/custom/package/libibverbs/libibverbs.mk
 create mode 100644 openpower/custom/package/libmlx5/Config.in
 create mode 100644 openpower/custom/package/libmlx5/libmlx5.mk
 create mode 100644 openpower/custom/patches/libmlx5/0001-libmlx5-no-includedir.patch

diff --git a/openpower/custom/Config.in b/openpower/custom/Config.in
index e69de29b..956f6e72 100644
--- a/openpower/custom/Config.in
+++ b/openpower/custom/Config.in
@@ -0,0 +1,4 @@
+menu "Infiniband"
+source "$BR2_EXTERNAL_OP_BUILD_PATH/custom/package/libibverbs/Config.in"
+source "$BR2_EXTERNAL_OP_BUILD_PATH/custom/package/libmlx5/Config.in"
+endmenu
diff --git a/openpower/custom/external.mk b/openpower/custom/external.mk
new file mode 100644
index 00000000..16ddcd6d
--- /dev/null
+++ b/openpower/custom/external.mk
@@ -0,0 +1 @@
+include $(sort $(wildcard $(BR2_EXTERNAL_OP_BUILD_PATH)/custom/package/*/*.mk))
diff --git a/openpower/custom/package/libibverbs/Config.in b/openpower/custom/package/libibverbs/Config.in
new file mode 100644
index 00000000..d7f98e53
--- /dev/null
+++ b/openpower/custom/package/libibverbs/Config.in
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_LIBIBVERBS
+	bool "libibverbs"
+	select BR2_PACKAGE_LIBNL
+	help
+	  Userspace support for IB verbs
diff --git a/openpower/custom/package/libibverbs/libibverbs.mk b/openpower/custom/package/libibverbs/libibverbs.mk
new file mode 100644
index 00000000..333b5db3
--- /dev/null
+++ b/openpower/custom/package/libibverbs/libibverbs.mk
@@ -0,0 +1,17 @@
+################################################################################
+#
+# libibverbs
+#
+################################################################################
+
+LIBIBVERBS_VERSION = 41mlnx1
+LIBIBVERBS_SOURCE = libibverbs-$(LIBIBVERBS_VERSION).tar.gz
+LIBIBVERBS_SITE ?= file://$(HOME)
+LIBIBVERBS_DEPENDENCIES = libnl
+#PETITBOOT_LICENSE = GPLv2
+#PETITBOOT_LICENSE_FILES = COPYING
+
+LIBIBVERBS_INSTALL_STAGING = YES
+#LIBIBVERBS_INSTALL_TARGET = YES
+
+$(eval $(autotools-package))
diff --git a/openpower/custom/package/libmlx5/Config.in b/openpower/custom/package/libmlx5/Config.in
new file mode 100644
index 00000000..388991db
--- /dev/null
+++ b/openpower/custom/package/libmlx5/Config.in
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_LIBMLX5
+	bool "libmlx5"
+	select BR2_PACKAGE_LIBIBVERBS
+	help
+	  Userspace support for mlx5
diff --git a/openpower/custom/package/libmlx5/libmlx5.mk b/openpower/custom/package/libmlx5/libmlx5.mk
new file mode 100644
index 00000000..debdbf7f
--- /dev/null
+++ b/openpower/custom/package/libmlx5/libmlx5.mk
@@ -0,0 +1,19 @@
+################################################################################
+#
+# libmlx5
+#
+################################################################################
+
+LIBMLX5_VERSION = 41mlnx1
+LIBMLX5_SOURCE = libmlx5-$(LIBMLX5_VERSION).tar.gz
+LIBMLX5_SITE ?= file://$(HOME)
+LIBMLX5_DEPENDENCIES = libibverbs
+#PETITBOOT_LICENSE = GPLv2
+#PETITBOOT_LICENSE_FILES = COPYING
+
+LIBMLX5_INSTALL_TARGET = YES
+
+LIBMLX5_AUTORECONF = YES
+LIBMLX5_AUTORECONF_OPTS = -if
+
+$(eval $(autotools-package))
diff --git a/openpower/custom/patches/libmlx5/0001-libmlx5-no-includedir.patch b/openpower/custom/patches/libmlx5/0001-libmlx5-no-includedir.patch
new file mode 100644
index 00000000..3b8f82be
--- /dev/null
+++ b/openpower/custom/patches/libmlx5/0001-libmlx5-no-includedir.patch
@@ -0,0 +1,8 @@
+--- a/Makefile.am	2019-11-07 15:03:22.760060988 -0500
++++ b/Makefile.am	2019-11-07 15:03:31.973872979 -0500
+@@ -1,4 +1,4 @@
+-AM_CFLAGS = -g -Wall -Werror -D_GNU_SOURCE -I$(includedir) -Xlinker -z -Xlinker nodelete
++AM_CFLAGS = -g -Wall -Werror -D_GNU_SOURCE -Xlinker -z -Xlinker nodelete
+ LDFLAGS += @NUMA_LIB@
+ EXTRA_DIST = src/mlx5.map libmlx5.spec.in mlx5.driver
+ EXTRA_DIST += debian
-- 
Daniel M. Weeks


-- 
Daniel M. Weeks
Lead HPC Developer
Center for Computational Innovations
Rensselaer Polytechnic Institute
Troy, NY 12180
518-276-4458


More information about the OpenPower-Firmware mailing list