diff --git a/dockers/docker-saiserver-brcm/Dockerfile b/dockers/docker-saiserver-brcm/Dockerfile new file mode 100755 index 000000000000..a85e7023204e --- /dev/null +++ b/dockers/docker-saiserver-brcm/Dockerfile @@ -0,0 +1,24 @@ +FROM docker-base + +RUN apt-get update + +COPY ["/deps/libsaibcm*.deb","/deps/libopennsl_*.deb","/deps/python-sdk-api_*.deb", "/deps/iproute2_*.deb", "/deps/libthrift-0.9.3_*.deb", "/deps/libnl-3-200_*.deb", "/deps/libnl-genl-3-200_*.deb", "/deps/libnl-route-3-200_*.deb", "/deps/"] + +RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \ + dpkg_apt /deps/libopennsl_*.deb \ + && dpkg_apt /deps/libsaibcm_*.deb \ + && dpkg_apt /deps/libthrift-0.9.3_*.deb \ + && dpkg_apt /deps/libnl-3-200_*.deb \ + && dpkg_apt /deps/libnl-genl-3-200_*.deb \ + && dpkg_apt /deps/libnl-route-3-200_*.deb + +COPY ["deps/saiserver", "start.sh", "/usr/bin/"] + +COPY ["profile.ini", "portmap.ini", "/etc/sai/"] + +## Clean up +RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y +RUN rm -rf /deps + +ENTRYPOINT ["/bin/bash"] +CMD ["/usr/bin/start.sh"] diff --git a/dockers/docker-saiserver-brcm/portmap.ini b/dockers/docker-saiserver-brcm/portmap.ini new file mode 100644 index 000000000000..7161416e4d4c --- /dev/null +++ b/dockers/docker-saiserver-brcm/portmap.ini @@ -0,0 +1,33 @@ +# alias lanes +Ethernet0 29,30,31,32 +Ethernet4 25,26,27,28 +Ethernet8 37,38,39,40 +Ethernet12 33,34,35,36 +Ethernet16 41,42,43,44 +Ethernet20 45,46,47,48 +Ethernet24 5,6,7,8 +Ethernet28 1,2,3,4 +Ethernet32 9,10,11,12 +Ethernet36 13,14,15,16 +Ethernet40 21,22,23,24 +Ethernet44 17,18,19,20 +Ethernet48 49,50,51,52 +Ethernet52 53,54,55,56 +Ethernet56 61,62,63,64 +Ethernet60 57,58,59,60 +Ethernet64 65,66,67,68 +Ethernet68 69,70,71,72 +Ethernet72 77,78,79,80 +Ethernet76 73,74,75,76 +Ethernet80 105,106,107,108 +Ethernet84 109,110,111,112 +Ethernet88 117,118,119,120 +Ethernet92 113,114,115,116 +Ethernet96 121,122,123,124 +Ethernet100 125,126,127,128 +Ethernet104 85,86,87,88 +Ethernet108 81,82,83,84 +Ethernet112 89,90,91,92 +Ethernet116 93,94,95,96 +Ethernet120 97,98,99,100 +Ethernet124 101,102,103,104 diff --git a/dockers/docker-saiserver-brcm/profile.ini b/dockers/docker-saiserver-brcm/profile.ini new file mode 100644 index 000000000000..b64d997fb451 --- /dev/null +++ b/dockers/docker-saiserver-brcm/profile.ini @@ -0,0 +1 @@ +SAI_INIT_CONFIG_FILE=/etc/bcm/td2-s6000-32x40G.config.bcm diff --git a/dockers/docker-saiserver-brcm/start.sh b/dockers/docker-saiserver-brcm/start.sh new file mode 100755 index 000000000000..07d03b41a9ba --- /dev/null +++ b/dockers/docker-saiserver-brcm/start.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +function clean_up { + service rsyslog stop +} + +start_bcm() +{ + [ -e /dev/linux-bcm-knet ] || mknod /dev/linux-bcm-knet c 122 0 + [ -e /dev/linux-user-bde ] || mknod /dev/linux-user-bde c 126 0 + [ -e /dev/linux-kernel-bde ] || mknod /dev/linux-kernel-bde c 127 0 +} + +trap clean_up SIGTERM SIGKILL + +service rsyslog start + +start_bcm + +/usr/bin/saiserver -p /etc/sai/profile.ini -f /etc/sai/portmap.ini