diff --git a/debian/rules b/debian/rules index 29d6d65c5b2c..c6dce5058224 100755 --- a/debian/rules +++ b/debian/rules @@ -28,5 +28,17 @@ DEB_SAI_FLAVOR ?= "bcm" # dh_auto_configure -- \ # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) +ifeq ($(findstring --enable-rpcserver=yes,${CONFIGURE_ARGS}),--enable-rpcserver=yes) + saithrift = yes +else + saithrift = no +endif + override_dh_auto_configure: dh_auto_configure -- --with-sai=$(DEB_SAI_FLAVOR) ${CONFIGURE_ARGS} + +override_dh_installinit: + ifeq ($(saithrift), yes) + sed -i 's/ENABLE_SAITHRIFT=0/ENABLE_SAITHRIFT=1/' debian/syncd.init + endif + dh_installinit diff --git a/debian/syncd.init b/debian/syncd.init index f6662f0d66b2..7bb726b70f87 100644 --- a/debian/syncd.init +++ b/debian/syncd.init @@ -15,6 +15,7 @@ DAEMON_SYNCD=/usr/bin/syncd # dsserve: domain socket server for stdio DAEMON_DSSERVE=/usr/bin/dsserve DAEMON_DSSERVE_ARGS="-d $DAEMON_SYNCD --diag" +ENABLE_SAITHRIFT=0 if [ -x $DAEMON_DSSERVE ]; then DAEMON=$DAEMON_DSSERVE @@ -50,6 +51,10 @@ start) elif [ "$onie_platform" == "x86_64-mlnx_x86-r5.0.1400" ]; then start_mlnx DAEMON_ARGS="-p /etc/syncd.d/mlnx_2700.profile -N" + + if [ ${ENABLE_SAITHRIFT} == 1 ]; then + DAEMON_ARGS+="-r -m /etc/syncd.d/msn2700_port_map.ini" + fi fi start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_ARGS diff --git a/etc/syncd.d/msn2700_port_map.ini b/etc/syncd.d/msn2700_port_map.ini new file mode 100644 index 000000000000..874a74effba9 --- /dev/null +++ b/etc/syncd.d/msn2700_port_map.ini @@ -0,0 +1,33 @@ +# alias lanes +Ethernet1 0,1,2,3 +Ethernet2 4,5,6,7 +Ethernet3 8,9,10,11 +Ethernet4 12,13,14,15 +Ethernet5 16,17,18,19 +Ethernet6 20,21,22,23 +Ethernet7 24,25,26,27 +Ethernet8 28,29,30,31 +Ethernet9 32,33,34,35 +Ethernet10 36,37,38,39 +Ethernet11 40,41,42,43 +Ethernet12 44,45,46,47 +Ethernet13 48,49,50,51 +Ethernet14 52,53,54,55 +Ethernet15 56,57,58,59 +Ethernet16 60,61,62,63 +Ethernet17 64,65,66,67 +Ethernet18 68,69,70,71 +Ethernet19 72,73,74,75 +Ethernet20 76,77,78,79 +Ethernet21 80,81,82,83 +Ethernet22 84,85,86,87 +Ethernet23 88,89,90,91 +Ethernet24 92,93,94,95 +Ethernet25 96,97,98,99 +Ethernet26 100,101,102,103 +Ethernet27 104,105,106,107 +Ethernet28 108,109,110,111 +Ethernet29 112,113,114,115 +Ethernet30 116,117,118,119 +Ethernet31 120,121,122,123 +Ethernet32 124,125,126,127