meta-facebook: yosemite4: add mctp service conf
- Add script to setup mctp link and local address for each bus.
- Add service conf for running script before the service start,
and make it has dependency with entity-manager.
Tested: tested on yv4 system.
Change-Id: I20ac5b9935acf7d805dceec029fe5b30374a5532
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
diff --git a/meta-facebook/meta-yosemite4/recipes-networking/mctp/files/mctp-config.sh b/meta-facebook/meta-yosemite4/recipes-networking/mctp/files/mctp-config.sh
new file mode 100644
index 0000000..fcb8677
--- /dev/null
+++ b/meta-facebook/meta-yosemite4/recipes-networking/mctp/files/mctp-config.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Set mctpi2c link up and assign local address.
+localEid=8
+
+# The Sentinel Dome BICs are on the i2c bus0 to bus7.
+busnum=0
+while [ $busnum -le 7 ]
+do
+ mctp link set mctpi2c${busnum} up
+ mctp addr add ${localEid} dev mctpi2c${busnum}
+ busnum=$((busnum+1))
+done
+
+# The NICs are on the i2c bus24 to bus27.
+busnum=24
+while [ $busnum -le 27 ]
+do
+ mctp link set mctpi2c${busnum} up
+ mctp addr add ${localEid} dev mctpi2c${busnum}
+ busnum=$((busnum+1))
+done