Merge branch 'rel_6_0' into bf-master
This commit is contained in:
commit
c019a461d2
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -1,15 +1,15 @@
|
|||||||
[submodule "sonic-swss-common"]
|
[submodule "sonic-swss-common"]
|
||||||
path = src/sonic-swss-common
|
path = src/sonic-swss-common
|
||||||
url = https://github.com/Azure/sonic-swss-common
|
url = https://github.com/barefootnetworks/sonic-swss-common
|
||||||
[submodule "sonic-linux-kernel"]
|
[submodule "sonic-linux-kernel"]
|
||||||
path = src/sonic-linux-kernel
|
path = src/sonic-linux-kernel
|
||||||
url = https://github.com/Azure/sonic-linux-kernel
|
url = https://github.com/Azure/sonic-linux-kernel
|
||||||
[submodule "sonic-sairedis"]
|
[submodule "sonic-sairedis"]
|
||||||
path = src/sonic-sairedis
|
path = src/sonic-sairedis
|
||||||
url = https://github.com/Azure/sonic-sairedis
|
url = https://github.com/barefootnetworks/sonic-sairedis
|
||||||
[submodule "sonic-swss"]
|
[submodule "sonic-swss"]
|
||||||
path = src/sonic-swss
|
path = src/sonic-swss
|
||||||
url = https://github.com/Azure/sonic-swss
|
url = https://github.com/barefootnetworks/sonic-swss
|
||||||
[submodule "src/p4-switch/switch"]
|
[submodule "src/p4-switch/switch"]
|
||||||
path = platform/p4/p4-switch/switch
|
path = platform/p4/p4-switch/switch
|
||||||
url = https://github.com/krambn/switch
|
url = https://github.com/krambn/switch
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
CONSOLE_SPEED=57600
|
1079
device/barefoot/x86_64-accton_wedge100bf_32x-r0/minigraph.xml
Normal file
1079
device/barefoot/x86_64-accton_wedge100bf_32x-r0/minigraph.xml
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,33 @@
|
|||||||
|
# name lanes
|
||||||
|
Ethernet0 0,1,2,3
|
||||||
|
Ethernet4 4,5,6,7
|
||||||
|
Ethernet8 8,9,10,11
|
||||||
|
Ethernet12 12,13,14,15
|
||||||
|
Ethernet16 16,17,18,19
|
||||||
|
Ethernet20 20,21,22,23
|
||||||
|
Ethernet24 24,25,26,27
|
||||||
|
Ethernet28 28,29,30,31
|
||||||
|
Ethernet32 32,33,34,35
|
||||||
|
Ethernet36 36,37,38,39
|
||||||
|
Ethernet40 40,41,42,43
|
||||||
|
Ethernet44 44,45,46,47
|
||||||
|
Ethernet48 48,49,50,51
|
||||||
|
Ethernet52 52,53,54,55
|
||||||
|
Ethernet56 56,57,58,59
|
||||||
|
Ethernet60 60,61,62,63
|
||||||
|
Ethernet64 64,65,66,67
|
||||||
|
Ethernet68 68,69,70,71
|
||||||
|
Ethernet72 72,73,74,75
|
||||||
|
Ethernet76 76,77,78,79
|
||||||
|
Ethernet80 80,81,82,83
|
||||||
|
Ethernet84 84,85,86,87
|
||||||
|
Ethernet88 88,89,90,91
|
||||||
|
Ethernet92 92,93,94,95
|
||||||
|
Ethernet96 96,97,98,99
|
||||||
|
Ethernet100 100,101,102,103
|
||||||
|
Ethernet104 104,105,106,107
|
||||||
|
Ethernet108 108,109,110,111
|
||||||
|
Ethernet112 112,113,114,115
|
||||||
|
Ethernet116 116,117,118,119
|
||||||
|
Ethernet120 120,121,122,123
|
||||||
|
Ethernet124 124,125,126,127
|
@ -0,0 +1 @@
|
|||||||
|
CONSOLE_SPEED=57600
|
@ -0,0 +1,66 @@
|
|||||||
|
# name lanes
|
||||||
|
Ethernet0 0,1,2,3
|
||||||
|
Ethernet4 4,5,6,7
|
||||||
|
Ethernet8 8,9,10,11
|
||||||
|
Ethernet12 12,13,14,15
|
||||||
|
Ethernet16 16,17,18,19
|
||||||
|
Ethernet20 20,21,22,23
|
||||||
|
Ethernet24 24,25,26,27
|
||||||
|
Ethernet28 28,29,30,31
|
||||||
|
Ethernet32 32,33,34,35
|
||||||
|
Ethernet36 36,37,38,39
|
||||||
|
Ethernet40 40,41,42,43
|
||||||
|
Ethernet44 44,45,46,47
|
||||||
|
Ethernet48 48,49,50,51
|
||||||
|
Ethernet52 52,53,54,55
|
||||||
|
Ethernet56 56,57,58,59
|
||||||
|
Ethernet60 60,61,62,63
|
||||||
|
Ethernet64 64,65,66,67
|
||||||
|
Ethernet68 68,69,70,71
|
||||||
|
Ethernet72 72,73,74,75
|
||||||
|
Ethernet76 76,77,78,79
|
||||||
|
Ethernet80 80,81,82,83
|
||||||
|
Ethernet84 84,85,86,87
|
||||||
|
Ethernet88 88,89,90,91
|
||||||
|
Ethernet92 92,93,94,95
|
||||||
|
Ethernet96 96,97,98,99
|
||||||
|
Ethernet100 100,101,102,103
|
||||||
|
Ethernet104 104,105,106,107
|
||||||
|
Ethernet108 108,109,110,111
|
||||||
|
Ethernet112 112,113,114,115
|
||||||
|
Ethernet116 116,117,118,119
|
||||||
|
Ethernet120 120,121,122,123
|
||||||
|
Ethernet124 124,125,126,127
|
||||||
|
Ethernet128 128,129,130,131
|
||||||
|
Ethernet132 132,133,134,135
|
||||||
|
Ethernet136 136,137,138,139
|
||||||
|
Ethernet140 140,141,142,143
|
||||||
|
Ethernet144 144,145,146,147
|
||||||
|
Ethernet148 148,149,150,151
|
||||||
|
Ethernet152 152,153,154,155
|
||||||
|
Ethernet156 156,157,158,159
|
||||||
|
Ethernet160 160,161,162,163
|
||||||
|
Ethernet164 164,165,166,167
|
||||||
|
Ethernet168 168,169,170,171
|
||||||
|
Ethernet172 172,173,174,175
|
||||||
|
Ethernet176 176,177,178,179
|
||||||
|
Ethernet180 180,181,182,183
|
||||||
|
Ethernet184 184,185,186,187
|
||||||
|
Ethernet188 188,189,190,191
|
||||||
|
Ethernet192 192,193,194,195
|
||||||
|
Ethernet196 196,197,198,199
|
||||||
|
Ethernet200 200,201,202,203
|
||||||
|
Ethernet204 204,205,206,207
|
||||||
|
Ethernet208 208,209,210,211
|
||||||
|
Ethernet212 212,213,214,215
|
||||||
|
Ethernet216 216,217,218,219
|
||||||
|
Ethernet220 220,221,222,223
|
||||||
|
Ethernet224 224,225,226,227
|
||||||
|
Ethernet228 228,229,230,231
|
||||||
|
Ethernet232 232,233,234,235
|
||||||
|
Ethernet236 236,237,238,239
|
||||||
|
Ethernet240 240,241,242,243
|
||||||
|
Ethernet244 244,245,246,247
|
||||||
|
Ethernet248 248,249,250,251
|
||||||
|
Ethernet252 252,253,254,255
|
||||||
|
Ethernet256 256,257,258,259
|
1079
device/barefoot/x86_64-accton_wedge100bf_65x-r0/minigraph.xml
Normal file
1079
device/barefoot/x86_64-accton_wedge100bf_65x-r0/minigraph.xml
Normal file
File diff suppressed because it is too large
Load Diff
38
dockers/docker-bfn-sswsyncd-rpc/Dockerfile
Normal file
38
dockers/docker-bfn-sswsyncd-rpc/Dockerfile
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
FROM docker-base
|
||||||
|
|
||||||
|
## Make apt-get non-interactive
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
## Pre-install the fundamental packages
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get -y install \
|
||||||
|
net-tools
|
||||||
|
|
||||||
|
COPY deps /deps
|
||||||
|
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \
|
||||||
|
dpkg_apt /deps/python-tabulate_*.deb \
|
||||||
|
&& dpkg_apt /deps/applibs_*.deb \
|
||||||
|
&& dpkg_apt /deps/applibs-dev_*.deb \
|
||||||
|
&& dpkg_apt /deps/sx-complib_*.deb \
|
||||||
|
&& dpkg_apt /deps/sxd-libs_*.deb \
|
||||||
|
&& dpkg_apt /deps/sx-scew_*.deb \
|
||||||
|
&& dpkg_apt /deps/sx-examples_*.deb \
|
||||||
|
&& dpkg_apt /deps/sx-gen-utils_*.deb \
|
||||||
|
&& dpkg_apt /deps/python-sdk-api_*.deb \
|
||||||
|
&& dpkg_apt /deps/sx-libnl_*.deb \
|
||||||
|
&& dpkg_apt /deps/iproute2_*.deb \
|
||||||
|
&& dpkg_apt /deps/libsswsdk_*.deb \
|
||||||
|
&& dpkg_apt /deps/libthrift-0.9.3_*.deb \
|
||||||
|
&& dpkg_apt /deps/libthrift-dev_*.deb
|
||||||
|
|
||||||
|
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \
|
||||||
|
dpkg_apt /deps/mlnx-sai_*.deb \
|
||||||
|
&& dpkg_apt /deps/sswsyncd-saithrift_*.deb
|
||||||
|
|
||||||
|
## Clean up
|
||||||
|
RUN apt-get clean -y ; apt-get autoclean -y ; apt-get autoremove -y ; rm -rf /deps
|
||||||
|
|
||||||
|
ENTRYPOINT service rsyslog start \
|
||||||
|
&& mkdir -p /dev/sxdevs && ( [ -e /dev/sxdevs/sxcdev ] || mknod /dev/sxdevs/sxcdev c 231 193 ) \
|
||||||
|
&& service sswsyncd start \
|
||||||
|
&& /bin/bash
|
17
dockers/docker-bfn-sswsyncd/Dockerfile
Executable file
17
dockers/docker-bfn-sswsyncd/Dockerfile
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
FROM docker-base
|
||||||
|
|
||||||
|
## Make apt-get non-interactive
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
|
||||||
|
## Pre-install the fundamental packages
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get -y install \
|
||||||
|
net-tools
|
||||||
|
|
||||||
|
COPY deps /deps
|
||||||
|
|
||||||
|
ENTRYPOINT service rsyslog start \
|
||||||
|
&& sleep 5 && service sswsyncd start \
|
||||||
|
&& /bin/bash
|
1
dockers/docker-orchagent-bfn
Symbolic link
1
dockers/docker-orchagent-bfn
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
docker-orchagent
|
@ -18,6 +18,8 @@ if [ "$platform" == "broadcom" ]; then
|
|||||||
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
||||||
elif [ "$platform" == "cavium" ]; then
|
elif [ "$platform" == "cavium" ]; then
|
||||||
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
||||||
|
elif [ "$ASIC" == "barefoot" ]; then
|
||||||
|
ORCHAGENT_ARGS+="-m $MAC_ADDRESS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec /usr/bin/orchagent ${ORCHAGENT_ARGS}
|
exec /usr/bin/orchagent ${ORCHAGENT_ARGS}
|
||||||
|
38
dockers/docker-saiserver-bfn/Dockerfile
Executable file
38
dockers/docker-saiserver-bfn/Dockerfile
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
FROM docker-base
|
||||||
|
|
||||||
|
## Make apt-get non-interactive
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
|
||||||
|
COPY ["deps/applibs_*.deb", "/deps/applibs-dev_*.deb", "/deps/sx-complib_*.deb", "/deps/sxd-libs_*.deb", "/deps/sx-scew_*.deb", "/deps/sx-examples_*.deb", "/deps/sx-gen-utils_*.deb", "/deps/python-sdk-api_*.deb", "/deps/iproute2_*.deb", "/deps/mlnx-sai_*.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/applibs_*.deb \
|
||||||
|
&& dpkg_apt /deps/applibs-dev_*.deb \
|
||||||
|
&& dpkg_apt /deps/sx-complib_*.deb \
|
||||||
|
&& dpkg_apt /deps/sxd-libs_*.deb \
|
||||||
|
&& dpkg_apt /deps/sx-scew_*.deb \
|
||||||
|
&& dpkg_apt /deps/sx-examples_*.deb \
|
||||||
|
&& dpkg_apt /deps/sx-gen-utils_*.deb \
|
||||||
|
&& dpkg_apt /deps/python-sdk-api_*.deb \
|
||||||
|
&& dpkg_apt /deps/iproute2_*.deb \
|
||||||
|
&& dpkg_apt /deps/mlnx-sai_*.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 ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||||
|
|
||||||
|
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 ["/usr/bin/supervisord"]
|
||||||
|
|
33
dockers/docker-saiserver-bfn/portmap.ini
Normal file
33
dockers/docker-saiserver-bfn/portmap.ini
Normal file
@ -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
|
1
dockers/docker-saiserver-bfn/profile.ini
Normal file
1
dockers/docker-saiserver-bfn/profile.ini
Normal file
@ -0,0 +1 @@
|
|||||||
|
SAI_INIT_CONFIG_FILE=/usr/share/sai_tofino.xml
|
2
dockers/docker-saiserver-bfn/sai_tofino.xml
Normal file
2
dockers/docker-saiserver-bfn/sai_tofino.xml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
|
16
dockers/docker-saiserver-bfn/start.sh
Executable file
16
dockers/docker-saiserver-bfn/start.sh
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
start_mlnx()
|
||||||
|
{
|
||||||
|
[ -e /dev/sxdevs/sxcdev ] || ( mkdir -p /dev/sxdevs && mknod /dev/sxdevs/sxcdev c 231 193 )
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
rm -f /var/run/rsyslogd.pid
|
||||||
|
|
||||||
|
supervisorctl start rsyslogd
|
||||||
|
|
||||||
|
start_mlnx
|
||||||
|
|
||||||
|
supervisorctl start saiserver
|
||||||
|
|
29
dockers/docker-saiserver-bfn/supervisord.conf
Normal file
29
dockers/docker-saiserver-bfn/supervisord.conf
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
[supervisord]
|
||||||
|
logfile_maxbytes=1MB
|
||||||
|
logfile_backups=2
|
||||||
|
nodaemon=true
|
||||||
|
|
||||||
|
[program:start.sh]
|
||||||
|
command=/usr/bin/start.sh
|
||||||
|
priority=1
|
||||||
|
autostart=true
|
||||||
|
autorestart=false
|
||||||
|
stdout_logfile=syslog
|
||||||
|
stderr_logfile=syslog
|
||||||
|
|
||||||
|
[program:rsyslogd]
|
||||||
|
command=/usr/sbin/rsyslogd -n
|
||||||
|
priority=2
|
||||||
|
autostart=false
|
||||||
|
autorestart=false
|
||||||
|
stdout_logfile=syslog
|
||||||
|
stderr_logfile=syslog
|
||||||
|
|
||||||
|
[program:saiserver]
|
||||||
|
command=/usr/bin/saiserver -p /etc/sai/profile.ini -f /etc/sai/portmap.ini
|
||||||
|
priority=3
|
||||||
|
autostart=false
|
||||||
|
autorestart=false
|
||||||
|
stdout_logfile=syslog
|
||||||
|
stderr_logfile=syslog
|
||||||
|
|
@ -18,6 +18,11 @@ iface lo {{ 'inet' if prefix | ipv4 else 'inet6' }} static
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock loopback %}
|
{% endblock loopback %}
|
||||||
{% block mgmt_interface %}
|
{% block mgmt_interface %}
|
||||||
|
# BMC interface
|
||||||
|
auto usb0
|
||||||
|
iface usb0 inet static
|
||||||
|
address 192.168.0.2
|
||||||
|
netmask 255.255.255.0
|
||||||
# The management network interface
|
# The management network interface
|
||||||
auto eth0
|
auto eth0
|
||||||
{% if MGMT_INTERFACE %}
|
{% if MGMT_INTERFACE %}
|
||||||
|
6
platform/barefoot/bfn-sai.mk
Normal file
6
platform/barefoot/bfn-sai.mk
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
BFN_SAI = bfnsdk_1.0.0_amd64.deb
|
||||||
|
$(BFN_SAI)_URL = "https://www.dropbox.com/s/4ljk6hzw82rudsr/bfnsdk_1.0.0_amd64.deb?dl=0"
|
||||||
|
# $(BFN_SAI_DEV)_URL = "https://www.dropbox.com/s/4ljk6hzw82rudsr/bfnsdk_1.0.0_amd64.deb?dl=0"
|
||||||
|
|
||||||
|
SONIC_ONLINE_DEBS += $(BFN_SAI) # $(BFN_SAI_DEV)
|
||||||
|
$(BFN_SAI_DEV)_DEPENDS += $(BFN_SAI)
|
18
platform/barefoot/docker-orchagent-bfn.mk
Normal file
18
platform/barefoot/docker-orchagent-bfn.mk
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# docker image for orchagent
|
||||||
|
|
||||||
|
DOCKER_ORCHAGENT_BFN = docker-orchagent-bfn.gz
|
||||||
|
$(DOCKER_ORCHAGENT_BFN)_PATH = $(DOCKERS_PATH)/docker-orchagent
|
||||||
|
$(DOCKER_ORCHAGENT_BFN)_DEPENDS += $(SWSS) $(REDIS_TOOLS)
|
||||||
|
$(DOCKER_ORCHAGENT_BFN)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||||
|
SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_BFN)
|
||||||
|
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT_BFN)
|
||||||
|
|
||||||
|
$(DOCKER_ORCHAGENT_BFN)_CONTAINER_NAME = swss
|
||||||
|
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += --net=host --privileged -t
|
||||||
|
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interfaces:ro
|
||||||
|
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro
|
||||||
|
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro
|
||||||
|
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||||
|
$(DOCKER_ORCHAGENT_BFN)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw
|
||||||
|
|
||||||
|
$(DOCKER_ORCHAGENT_BFN)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
|
5
platform/barefoot/docker-ptf-bfn.mk
Normal file
5
platform/barefoot/docker-ptf-bfn.mk
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# docker image for docker-ptf
|
||||||
|
|
||||||
|
DOCKER_PTF_BFN = docker-ptf-bfn.gz
|
||||||
|
$(DOCKER_PTF_BFN)_PATH = $(DOCKERS_PATH)/docker-ptf-saithrift
|
||||||
|
$(DOCKER_PTF_BFN)_LOAD_DOCKERS += $(DOCKER_PTF)
|
15
platform/barefoot/docker-syncd-bfn-rpc.mk
Normal file
15
platform/barefoot/docker-syncd-bfn-rpc.mk
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# docker image for syncd with rpc
|
||||||
|
|
||||||
|
DOCKER_SYNCD_BFN_RPC = docker-syncd-bfn-rpc.gz
|
||||||
|
$(DOCKER_SYNCD_BFN_RPC)_PATH = $(PLATFORM_PATH)/docker-syncd-bfn-rpc
|
||||||
|
$(DOCKER_SYNCD_BFN_RPC)_DEPENDS += $(SYNCD_RPC) $(LIBTHRIFT)
|
||||||
|
$(DOCKER_SYNCD_BFN_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BFN)
|
||||||
|
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN_RPC)
|
||||||
|
ifeq ($(ENABLE_SYNCD_RPC),y)
|
||||||
|
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN_RPC)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(DOCKER_SYNCD_BFN_RPC)_CONTAINER_NAME = syncd
|
||||||
|
$(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += --net=host --privileged -t
|
||||||
|
$(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||||
|
$(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
52
platform/barefoot/docker-syncd-bfn-rpc/Dockerfile.j2
Normal file
52
platform/barefoot/docker-syncd-bfn-rpc/Dockerfile.j2
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
FROM docker-syncd-bfn
|
||||||
|
|
||||||
|
## Make apt-get non-interactive
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
COPY \
|
||||||
|
{% for deb in docker_syncd_bfn.split(' ') -%}
|
||||||
|
debs/{{ deb }}{{' '}}
|
||||||
|
{%- endfor -%}
|
||||||
|
debs/
|
||||||
|
|
||||||
|
RUN dpkg -P syncd
|
||||||
|
|
||||||
|
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
|
||||||
|
{% for deb in docker_syncd_bfn.split(' ') -%}
|
||||||
|
dpkg_apt debs/{{ deb }}{{'; '}}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
## Pre-install the fundamental packages
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get -y install \
|
||||||
|
net-tools \
|
||||||
|
python-pip \
|
||||||
|
build-essential \
|
||||||
|
libssl-dev \
|
||||||
|
libffi-dev \
|
||||||
|
python-dev \
|
||||||
|
wget \
|
||||||
|
cmake \
|
||||||
|
&& wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \
|
||||||
|
&& tar xvfz 1.0.0.tar.gz \
|
||||||
|
&& cd nanomsg-1.0.0 \
|
||||||
|
&& mkdir -p build \
|
||||||
|
&& cmake . \
|
||||||
|
&& make install \
|
||||||
|
&& ldconfig \
|
||||||
|
&& cd .. \
|
||||||
|
&& rm -fr nanomsg-1.0.0 \
|
||||||
|
&& rm -f 1.0.0.tar.gz \
|
||||||
|
&& pip install cffi==1.7.0 \
|
||||||
|
&& pip install --upgrade cffi==1.7.0 \
|
||||||
|
&& pip install nnpy \
|
||||||
|
&& mkdir -p /opt \
|
||||||
|
&& cd /opt \
|
||||||
|
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \
|
||||||
|
&& apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \
|
||||||
|
&& rm -rf /root/deps
|
||||||
|
|
||||||
|
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/supervisord"]
|
||||||
|
|
10
platform/barefoot/docker-syncd-bfn-rpc/ptf_nn_agent.conf
Normal file
10
platform/barefoot/docker-syncd-bfn-rpc/ptf_nn_agent.conf
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[program:ptf_nn_agent]
|
||||||
|
command=/usr/bin/python /opt/ptf_nn_agent.py --device-socket 1@tcp://0.0.0.0:10900 -i 1-3@Ethernet12 --set-iface-rcv-buffer=109430400
|
||||||
|
process_name=ptf_nn_agent
|
||||||
|
stdout_logfile=/tmp/ptf_nn_agent.out.log
|
||||||
|
stderr_logfile=/tmp/ptf_nn_agent.err.log
|
||||||
|
redirect_stderr=false
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
startsecs=1
|
||||||
|
numprocs=1
|
15
platform/barefoot/docker-syncd-bfn.mk
Normal file
15
platform/barefoot/docker-syncd-bfn.mk
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# docker image for syncd
|
||||||
|
|
||||||
|
DOCKER_SYNCD_BFN = docker-syncd-bfn.gz
|
||||||
|
$(DOCKER_SYNCD_BFN)_PATH = $(PLATFORM_PATH)/docker-syncd-bfn
|
||||||
|
$(DOCKER_SYNCD_BFN)_DEPENDS += $(SYNCD)
|
||||||
|
$(DOCKER_SYNCD_BFN)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
|
||||||
|
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN)
|
||||||
|
ifneq ($(ENABLE_SYNCD_RPC),y)
|
||||||
|
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(DOCKER_SYNCD_BFN)_CONTAINER_NAME = syncd
|
||||||
|
$(DOCKER_SYNCD_BFN)_RUN_OPT += --net=host --privileged -t
|
||||||
|
$(DOCKER_SYNCD_BFN)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
|
||||||
|
$(DOCKER_SYNCD_BFN)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
29
platform/barefoot/docker-syncd-bfn/Dockerfile.j2
Executable file
29
platform/barefoot/docker-syncd-bfn/Dockerfile.j2
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
FROM docker-config-engine
|
||||||
|
|
||||||
|
## Make apt-get non-interactive
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
|
||||||
|
COPY \
|
||||||
|
{% for deb in docker_syncd_bfn_debs.split(' ') -%}
|
||||||
|
debs/{{ deb }}{{' '}}
|
||||||
|
{%- endfor -%}
|
||||||
|
debs/
|
||||||
|
|
||||||
|
RUN apt-get install -y libxml2 libpcap-dev libusb-1.0-0-dev libcurl3 libcurl4-gnutls-dev
|
||||||
|
|
||||||
|
RUN dpkg -i \
|
||||||
|
{% for deb in docker_syncd_bfn_debs.split(' ') -%}
|
||||||
|
debs/{{ deb }}{{' '}}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
COPY ["start.sh", "/usr/bin/"]
|
||||||
|
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||||
|
|
||||||
|
## Clean up
|
||||||
|
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
||||||
|
RUN rm -rf /debs
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/supervisord"]
|
||||||
|
|
9
platform/barefoot/docker-syncd-bfn/start.sh
Executable file
9
platform/barefoot/docker-syncd-bfn/start.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
rm -f /var/run/rsyslogd.pid
|
||||||
|
|
||||||
|
supervisorctl start rsyslogd
|
||||||
|
|
||||||
|
. /opt/bfn/install/bin/dma_setup.sh
|
||||||
|
# . /opt/bfn/install/bin/bf_kdrv_mod_load /opt/bfn/install
|
||||||
|
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/bfn/install/lib supervisorctl start syncd
|
29
platform/barefoot/docker-syncd-bfn/supervisord.conf
Normal file
29
platform/barefoot/docker-syncd-bfn/supervisord.conf
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
[supervisord]
|
||||||
|
logfile_maxbytes=1MB
|
||||||
|
logfile_backups=2
|
||||||
|
nodaemon=true
|
||||||
|
|
||||||
|
[program:start.sh]
|
||||||
|
command=/usr/bin/start.sh
|
||||||
|
priority=1
|
||||||
|
autostart=true
|
||||||
|
autorestart=false
|
||||||
|
stdout_logfile=syslog
|
||||||
|
stderr_logfile=syslog
|
||||||
|
|
||||||
|
[program:rsyslogd]
|
||||||
|
command=/usr/sbin/rsyslogd -n
|
||||||
|
priority=2
|
||||||
|
autostart=false
|
||||||
|
autorestart=false
|
||||||
|
stdout_logfile=syslog
|
||||||
|
stderr_logfile=syslog
|
||||||
|
|
||||||
|
[program:syncd]
|
||||||
|
command=/usr/bin/syncd_start.sh
|
||||||
|
priority=3
|
||||||
|
autostart=false
|
||||||
|
autorestart=false
|
||||||
|
stdout_logfile=syslog
|
||||||
|
stderr_logfile=syslog
|
||||||
|
|
7
platform/barefoot/libsaithrift-dev.mk
Normal file
7
platform/barefoot/libsaithrift-dev.mk
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# libsaithrift-dev package
|
||||||
|
|
||||||
|
LIBSAITHRIFT_DEV_BFN = libsaithrift-dev_0.9.4_amd64.deb
|
||||||
|
$(LIBSAITHRIFT_DEV_BFN)_SRC_PATH = $(SRC_PATH)/SAI
|
||||||
|
$(LIBSAITHRIFT_DEV_BFN)_DEPENDS += $(LIBTHRIFT) $(LIBTHRIFT_DEV) $(THRIFT_COMPILER) $(BFN_SAI) $(BFN_SAI_DEV)
|
||||||
|
$(LIBSAITHRIFT_DEV_BFN)_RDEPENDS += $(LIBTHRIFT) $(BFN_SAI)
|
||||||
|
#SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV_BFN)
|
11
platform/barefoot/one-image.mk
Normal file
11
platform/barefoot/one-image.mk
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# sonic one image installer
|
||||||
|
|
||||||
|
SONIC_ONE_IMAGE = sonic-barefoot.bin
|
||||||
|
$(SONIC_ONE_IMAGE)_MACHINE = barefoot
|
||||||
|
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
|
||||||
|
$(SONIC_ONE_IMAGE)_INSTALLS += $(BFN_PLATFORM_MODULE)
|
||||||
|
$(SONIC_ONE_IMAGE)_INSTALLS += $(BFN_MONTARA_PLATFORM_MODULE)
|
||||||
|
$(SONIC_ONE_IMAGE)_DEPENDS += $(BFN_PLATFORM_MODULE)
|
||||||
|
$(SONIC_ONE_IMAGE)_DEPENDS += $(BFN_MONTARA_PLATFORM_MODULE)
|
||||||
|
$(SONIC_ONE_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
|
||||||
|
SONIC_INSTALLERS += $(SONIC_ONE_IMAGE)
|
11
platform/barefoot/platform-modules-bfn-montara.mk
Normal file
11
platform/barefoot/platform-modules-bfn-montara.mk
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# BFN Platform modules
|
||||||
|
|
||||||
|
BFN_MONTARA_PLATFORM_MODULE_VERSION = 1.0
|
||||||
|
|
||||||
|
export BFN_MONTARA_PLATFORM_MODULE_VERSION
|
||||||
|
|
||||||
|
BFN_MONTARA_PLATFORM_MODULE = platform-modules-bfn-montara_$(BFN_MONTARA_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||||
|
$(BFN_MONTARA_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-bfn-montara
|
||||||
|
$(BFN_MONTARA_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
|
||||||
|
$(BFN_MONTARA_PLATFORM_MODULE)_PLATFORM = x86_64-accton_wedge100bf_32x-r0
|
||||||
|
SONIC_DPKG_DEBS += $(BFN_MONTARA_PLATFORM_MODULE)
|
11
platform/barefoot/platform-modules-bfn.mk
Normal file
11
platform/barefoot/platform-modules-bfn.mk
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# BFN Platform modules
|
||||||
|
|
||||||
|
BFN_PLATFORM_MODULE_VERSION = 1.0
|
||||||
|
|
||||||
|
export BFN_PLATFORM_MODULE_VERSION
|
||||||
|
|
||||||
|
BFN_PLATFORM_MODULE = platform-modules-bfn_$(BFN_PLATFORM_MODULE_VERSION)_amd64.deb
|
||||||
|
$(BFN_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-bfn
|
||||||
|
$(BFN_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
|
||||||
|
$(BFN_PLATFORM_MODULE)_PLATFORM = x86_64-accton_wedge100bf_65x-r0
|
||||||
|
SONIC_DPKG_DEBS += $(BFN_PLATFORM_MODULE)
|
0
platform/barefoot/platform.conf
Normal file
0
platform/barefoot/platform.conf
Normal file
6
platform/barefoot/python-saithrift.mk
Normal file
6
platform/barefoot/python-saithrift.mk
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# python-saithrift package
|
||||||
|
|
||||||
|
PYTHON_SAITHRIFT_BFN = python-saithrift_0.9.4_amd64.deb
|
||||||
|
$(PYTHON_SAITHRIFT_BFN)_SRC_PATH = $(SRC_PATH)/SAI
|
||||||
|
$(PYTHON_SAITHRIFT_BFN)_DEPENDS += $(BFN_SAI_DEV) $(BFN_SAI) $(THRIFT_COMPILER) $(PYTHON_THRIFT) $(LIBTHRIFT_DEV)
|
||||||
|
#SONIC_DPKG_DEBS += $(PYTHON_SAITHRIFT_BFN)
|
19
platform/barefoot/rules.mk
Normal file
19
platform/barefoot/rules.mk
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
include $(PLATFORM_PATH)/platform-modules-bfn.mk
|
||||||
|
include $(PLATFORM_PATH)/platform-modules-bfn-montara.mk
|
||||||
|
include $(PLATFORM_PATH)/bfn-sai.mk
|
||||||
|
include $(PLATFORM_PATH)/docker-syncd-bfn.mk
|
||||||
|
include $(PLATFORM_PATH)/docker-syncd-bfn-rpc.mk
|
||||||
|
include $(PLATFORM_PATH)/docker-orchagent-bfn.mk
|
||||||
|
include $(PLATFORM_PATH)/one-image.mk
|
||||||
|
include $(PLATFORM_PATH)/libsaithrift-dev.mk
|
||||||
|
include $(PLATFORM_PATH)/python-saithrift.mk
|
||||||
|
include $(PLATFORM_PATH)/docker-ptf-bfn.mk
|
||||||
|
|
||||||
|
SONIC_ALL += $(SONIC_ONE_IMAGE) \
|
||||||
|
$(DOCKER_FPM)
|
||||||
|
|
||||||
|
# Inject sai into sairedis
|
||||||
|
$(LIBSAIREDIS)_DEPENDS += $(BFN_SAI) #$(LIBSAITHRIFT_DEV_BFN)
|
||||||
|
|
||||||
|
# Runtime dependency on sai is set only for syncd
|
||||||
|
$(SYNCD)_RDEPENDS += $(BFN_SAI)
|
15
platform/barefoot/sonic-platform-modules-bfn-montara/LICENSE
Normal file
15
platform/barefoot/sonic-platform-modules-bfn-montara/LICENSE
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Copyright (C) 2016 Microsoft, Inc
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
@ -0,0 +1,7 @@
|
|||||||
|
# This file describes the maintainers for sonic-platform-modules-bfn
|
||||||
|
# See the SONiC project governance document for more information
|
||||||
|
|
||||||
|
Name = "Daxay"
|
||||||
|
Email = "support@barefootnetworks.com"
|
||||||
|
Github = barefootnetworks
|
||||||
|
Mailinglist = sonicproject@googlegroups.com
|
@ -0,0 +1,2 @@
|
|||||||
|
# sonic-platform-modules-bfn
|
||||||
|
Device drivers for support of BFN platform for the SONiC project
|
@ -0,0 +1,5 @@
|
|||||||
|
platform-modules-bfn-montara (1.0) unstable; urgency=low
|
||||||
|
|
||||||
|
* Initial release
|
||||||
|
|
||||||
|
-- Shuotian Cheng <shuche@microsoft.com> Mon, 11 Nov 2015 11:11:11 -0800
|
@ -0,0 +1 @@
|
|||||||
|
8
|
@ -0,0 +1,12 @@
|
|||||||
|
Source: platform-modules-bfn-montara
|
||||||
|
Section: main
|
||||||
|
Priority: extra
|
||||||
|
Maintainer: Shuotian Cheng <shuche@microsoft.com>
|
||||||
|
Build-Depends: debhelper (>= 8.0.0), bzip2
|
||||||
|
Standards-Version: 3.9.3
|
||||||
|
|
||||||
|
Package: platform-modules-bfn-montara
|
||||||
|
Architecture: amd64
|
||||||
|
Depends: linux-image-3.16.0-4-amd64
|
||||||
|
Description: kernel modules for platform devices such as fan, led, sfp
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
Provides linux kernel driver for BF PCIe devices
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
@ -0,0 +1 @@
|
|||||||
|
platform-modules-bfn-montara_1.0_amd64.deb main extra
|
32
platform/barefoot/sonic-platform-modules-bfn-montara/debian/rules
Executable file
32
platform/barefoot/sonic-platform-modules-bfn-montara/debian/rules
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
export INSTALL_MOD_DIR:=extra
|
||||||
|
|
||||||
|
PACKAGE_NAME := platform-modules-bfn-montara
|
||||||
|
KVERSION ?= $(shell uname -r)
|
||||||
|
KERNEL_SRC := /lib/modules/$(KVERSION)
|
||||||
|
MODULE_SRC := $(shell pwd)/modules
|
||||||
|
SCRIPT_SRC := $(shell pwd)/scripts
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
override_dh_auto_build:
|
||||||
|
make -C $(KERNEL_SRC)/build M=$(MODULE_SRC)
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
|
dh_installdirs -p$(PACKAGE_NAME) $(KERNEL_SRC)/$(INSTALL_MOD_DIR)
|
||||||
|
cp $(MODULE_SRC)/*.ko debian/$(PACKAGE_NAME)/$(KERNEL_SRC)/$(INSTALL_MOD_DIR)
|
||||||
|
dh_installdirs -p$(PACKAGE_NAME) usr/local/bin
|
||||||
|
cp -r $(SCRIPT_SRC)/* debian/$(PACKAGE_NAME)/usr/local/bin
|
||||||
|
|
||||||
|
override_dh_usrlocal:
|
||||||
|
|
||||||
|
override_dh_pysupport:
|
||||||
|
|
||||||
|
override_dh_clean:
|
||||||
|
dh_clean
|
||||||
|
rm -f $(MODULE_SRC)/*.o $(MODULE_SRC)/*.ko $(MODULE_SRC)/*.mod.c $(MODULE_SRC)/.*.cmd
|
||||||
|
rm -f $(MODULE_SRC)/Module.markers $(MODULE_SRC)/Module.symvers $(MODULE_SRC)/modules.order
|
||||||
|
rm -rf $(MODULE_SRC)/.tmp_versions
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
../../sonic-platform-modules-bfn/modules/Makefile
|
@ -0,0 +1 @@
|
|||||||
|
../../sonic-platform-modules-bfn/modules/bf_kdrv.c
|
@ -0,0 +1 @@
|
|||||||
|
../../sonic-platform-modules-bfn/modules/bf_tun.c
|
1
platform/barefoot/sonic-platform-modules-bfn-montara/scripts/test
Executable file
1
platform/barefoot/sonic-platform-modules-bfn-montara/scripts/test
Executable file
@ -0,0 +1 @@
|
|||||||
|
echo "test"
|
15
platform/barefoot/sonic-platform-modules-bfn/LICENSE
Normal file
15
platform/barefoot/sonic-platform-modules-bfn/LICENSE
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Copyright (C) 2016 Microsoft, Inc
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
7
platform/barefoot/sonic-platform-modules-bfn/MAINTAINERS
Normal file
7
platform/barefoot/sonic-platform-modules-bfn/MAINTAINERS
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# This file describes the maintainers for sonic-platform-modules-bfn
|
||||||
|
# See the SONiC project governance document for more information
|
||||||
|
|
||||||
|
Name = "Daxay"
|
||||||
|
Email = "support@barefootnetworks.com"
|
||||||
|
Github = barefootnetworks
|
||||||
|
Mailinglist = sonicproject@googlegroups.com
|
2
platform/barefoot/sonic-platform-modules-bfn/README.md
Normal file
2
platform/barefoot/sonic-platform-modules-bfn/README.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# sonic-platform-modules-bfn
|
||||||
|
Device drivers for support of BFN platform for the SONiC project
|
@ -0,0 +1,5 @@
|
|||||||
|
platform-modules-bfn (1.0) unstable; urgency=low
|
||||||
|
|
||||||
|
* Initial release
|
||||||
|
|
||||||
|
-- Shuotian Cheng <shuche@microsoft.com> Mon, 11 Nov 2015 11:11:11 -0800
|
@ -0,0 +1 @@
|
|||||||
|
8
|
12
platform/barefoot/sonic-platform-modules-bfn/debian/control
Normal file
12
platform/barefoot/sonic-platform-modules-bfn/debian/control
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Source: platform-modules-bfn
|
||||||
|
Section: main
|
||||||
|
Priority: extra
|
||||||
|
Maintainer: Shuotian Cheng <shuche@microsoft.com>
|
||||||
|
Build-Depends: debhelper (>= 8.0.0), bzip2
|
||||||
|
Standards-Version: 3.9.3
|
||||||
|
|
||||||
|
Package: platform-modules-bfn
|
||||||
|
Architecture: amd64
|
||||||
|
Depends: linux-image-3.16.0-4-amd64
|
||||||
|
Description: kernel modules for platform devices such as fan, led, sfp
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
Provides linux kernel driver for BF PCIe devices
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
@ -0,0 +1 @@
|
|||||||
|
platform-modules-bfn_1.0_amd64.deb main extra
|
32
platform/barefoot/sonic-platform-modules-bfn/debian/rules
Executable file
32
platform/barefoot/sonic-platform-modules-bfn/debian/rules
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
export INSTALL_MOD_DIR:=extra
|
||||||
|
|
||||||
|
PACKAGE_NAME := platform-modules-bfn
|
||||||
|
KVERSION ?= $(shell uname -r)
|
||||||
|
KERNEL_SRC := /lib/modules/$(KVERSION)
|
||||||
|
MODULE_SRC := $(shell pwd)/modules
|
||||||
|
SCRIPT_SRC := $(shell pwd)/scripts
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
override_dh_auto_build:
|
||||||
|
make -C $(KERNEL_SRC)/build M=$(MODULE_SRC)
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
|
dh_installdirs -p$(PACKAGE_NAME) $(KERNEL_SRC)/$(INSTALL_MOD_DIR)
|
||||||
|
cp $(MODULE_SRC)/*.ko debian/$(PACKAGE_NAME)/$(KERNEL_SRC)/$(INSTALL_MOD_DIR)
|
||||||
|
dh_installdirs -p$(PACKAGE_NAME) usr/local/bin
|
||||||
|
cp -r $(SCRIPT_SRC)/* debian/$(PACKAGE_NAME)/usr/local/bin
|
||||||
|
|
||||||
|
override_dh_usrlocal:
|
||||||
|
|
||||||
|
override_dh_pysupport:
|
||||||
|
|
||||||
|
override_dh_clean:
|
||||||
|
dh_clean
|
||||||
|
rm -f $(MODULE_SRC)/*.o $(MODULE_SRC)/*.ko $(MODULE_SRC)/*.mod.c $(MODULE_SRC)/.*.cmd
|
||||||
|
rm -f $(MODULE_SRC)/Module.markers $(MODULE_SRC)/Module.symvers $(MODULE_SRC)/modules.order
|
||||||
|
rm -rf $(MODULE_SRC)/.tmp_versions
|
||||||
|
|
@ -0,0 +1,2 @@
|
|||||||
|
obj-m := bf_kdrv.o
|
||||||
|
obj-m += bf_tun.o
|
1152
platform/barefoot/sonic-platform-modules-bfn/modules/bf_kdrv.c
Normal file
1152
platform/barefoot/sonic-platform-modules-bfn/modules/bf_kdrv.c
Normal file
File diff suppressed because it is too large
Load Diff
2396
platform/barefoot/sonic-platform-modules-bfn/modules/bf_tun.c
Normal file
2396
platform/barefoot/sonic-platform-modules-bfn/modules/bf_tun.c
Normal file
File diff suppressed because it is too large
Load Diff
1
platform/barefoot/sonic-platform-modules-bfn/scripts/test
Executable file
1
platform/barefoot/sonic-platform-modules-bfn/scripts/test
Executable file
@ -0,0 +1 @@
|
|||||||
|
echo "test"
|
@ -114,6 +114,9 @@ RUN apt-get update && apt-get install -y \
|
|||||||
# For mellanox sai build
|
# For mellanox sai build
|
||||||
libtool-bin \
|
libtool-bin \
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
|
# For BFN sdk build
|
||||||
|
libusb-1.0-0-dev \
|
||||||
|
libcurl3-nss-dev \
|
||||||
# For build image
|
# For build image
|
||||||
cpio \
|
cpio \
|
||||||
squashfs-tools \
|
squashfs-tools \
|
||||||
|
@ -15,6 +15,11 @@ iface lo inet6 static
|
|||||||
address fc00:1::32
|
address fc00:1::32
|
||||||
netmask 128
|
netmask 128
|
||||||
#
|
#
|
||||||
|
# BMC interface
|
||||||
|
auto usb0
|
||||||
|
iface usb0 inet static
|
||||||
|
address 192.168.0.2
|
||||||
|
netmask 255.255.255.0
|
||||||
# The management network interface
|
# The management network interface
|
||||||
auto eth0
|
auto eth0
|
||||||
iface eth0 inet static
|
iface eth0 inet static
|
||||||
|
Loading…
Reference in New Issue
Block a user