[OpenPower-Firmware] [PATCH 2/2] Initscript to load ipoib module

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


Something needs to manually load the ib_ipoib kernel module as it is not
loaded through hardware discovery. This provides a simple initscript to
perform that function.

Signed-off-by: Daniel M. Weeks <weeksd2 at rpi.edu>
---
 openpower/custom/Config.in               |  1 +
 openpower/custom/package/ipoib/Config.in |  5 ++++
 openpower/custom/package/ipoib/S99ipoib  | 30 ++++++++++++++++++++++++
 openpower/custom/package/ipoib/ipoib.mk  | 17 ++++++++++++++
 4 files changed, 53 insertions(+)
 create mode 100644 openpower/custom/package/ipoib/Config.in
 create mode 100644 openpower/custom/package/ipoib/S99ipoib
 create mode 100644 openpower/custom/package/ipoib/ipoib.mk

diff --git a/openpower/custom/Config.in b/openpower/custom/Config.in
index 956f6e72..bf0a71da 100644
--- a/openpower/custom/Config.in
+++ b/openpower/custom/Config.in
@@ -1,4 +1,5 @@
 menu "Infiniband"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/custom/package/libibverbs/Config.in"
 source "$BR2_EXTERNAL_OP_BUILD_PATH/custom/package/libmlx5/Config.in"
+source "$BR2_EXTERNAL_OP_BUILD_PATH/custom/package/ipoib/Config.in"
 endmenu
diff --git a/openpower/custom/package/ipoib/Config.in b/openpower/custom/package/ipoib/Config.in
new file mode 100644
index 00000000..cb3b2a22
--- /dev/null
+++ b/openpower/custom/package/ipoib/Config.in
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_IPOIB
+	bool "ipoib"
+	select BR2_PACKAGE_LIBMLX5
+	help
+	  Load IPoIB module on boot
diff --git a/openpower/custom/package/ipoib/S99ipoib b/openpower/custom/package/ipoib/S99ipoib
new file mode 100644
index 00000000..001bc1e9
--- /dev/null
+++ b/openpower/custom/package/ipoib/S99ipoib
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+start() {
+	echo "ipoib: loading module"
+
+	modprobe ib_ipoib
+}
+
+stop() {
+	echo "ipoib: removing module"
+
+	modprobe -r ib_ipoib
+}
+
+case "$1" in
+start)
+	start
+;;
+stop)
+	stop
+;;
+restart)
+	stop
+	start
+;;
+*)
+	echo "ipoib: Please use start, stop, or restart."
+	exit 1
+;;
+esac
diff --git a/openpower/custom/package/ipoib/ipoib.mk b/openpower/custom/package/ipoib/ipoib.mk
new file mode 100644
index 00000000..415bfd5f
--- /dev/null
+++ b/openpower/custom/package/ipoib/ipoib.mk
@@ -0,0 +1,17 @@
+################################################################################
+#
+# ipoib
+#
+################################################################################
+
+#IPOIB_VERSION = 0
+#IPOIB_SOURCE = libmlx5-$(IPOIB_VERSION).tar.gz
+#IPOIB_SITE ?= file://$(HOME)
+IPOIB_DEPENDENCIES = libmlx5
+
+define IPOIB_INSTALL_INIT_SYSV
+	$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_OP_BUILD_PATH)/custom/package/ipoib/S99ipoib \
+		$(TARGET_DIR)/etc/init.d/S99ipoib
+endef
+
+$(eval $(generic-package))
-- 
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