Skip to content

Commit 86a4391

Browse files
author
Liuqu
committed
Merge branch 'master' into tacacs+
2 parents 3db34d5 + 4213b2d commit 86a4391

File tree

182 files changed

+9550
-1786
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+9550
-1786
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@ dockers/docker-fpm-quagga/Dockerfile
4646
dockers/docker-lldp-sv2/Dockerfile
4747
dockers/docker-orchagent/Dockerfile
4848
dockers/docker-platform-monitor/Dockerfile
49+
dockers/docker-router-advertiser/Dockerfile
4950
dockers/docker-snmp-sv2/Dockerfile
5051
dockers/docker-teamd/Dockerfile
5152
dockers/docker-sonic-mgmt/Dockerfile
5253
platform/*/docker-syncd-*/Dockerfile
5354
platform/*/docker-syncd-*-rpc/Dockerfile
55+
platform/vs/docker-sonic-vs/Dockerfile
5456

5557
# Installer-related files and directories
5658
installer/x86_64/platforms/

.gitmodules

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
[submodule "sonic-swss"]
1111
path = src/sonic-swss
1212
url = https://github.com/Azure/sonic-swss
13-
[submodule "src/p4-switch/switch"]
14-
path = platform/p4/p4-switch/switch
15-
url = https://github.com/krambn/switch
16-
[submodule "src/p4-bmv2/behavioral-model"]
17-
path = platform/p4/p4-bmv/behavioral-model
18-
url = https://github.com/krambn/behavioral-model
1913
[submodule "src/p4c-bm/p4c-bm"]
2014
path = platform/p4/p4c-bm/p4c-bm
2115
url = https://github.com/krambn/p4c-bm
@@ -68,3 +62,9 @@
6862
[submodule "src/sonic-frr/frr"]
6963
path = src/sonic-frr/frr
7064
url = https://github.com/FRRouting/frr.git
65+
[submodule "platform/p4/p4-hlir/p4-hlir-v1.1"]
66+
path = platform/p4/p4-hlir/p4-hlir-v1.1
67+
url = https://github.com/p4lang/p4-hlir.git
68+
[submodule "platform/p4/SAI-P4-BM"]
69+
path = platform/p4/SAI-P4-BM
70+
url = https://github.com/Mellanox/SAI-P4-BM.git

Makefile

+8-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# * USERNAME: Desired username -- default at rules/config
1313
# * PASSWORD: Desired password -- default at rules/config
1414
# * KEEP_SLAVE_ON: Keeps slave container up after building-process concludes.
15+
# * SOURCE_FOLDER: host path to be mount as /var/src, only effective when KEEP_SLAVE_ON=yes
1516
#
1617
###############################################################################
1718

@@ -25,8 +26,8 @@ $(shell rm -f .screen)
2526

2627
MAKEFLAGS += -B
2728

28-
SLAVE_BASE_TAG = $(shell shasum sonic-slave/Dockerfile | awk '{print substr($$1,0,11);}')
29-
SLAVE_TAG = $(shell cat sonic-slave/Dockerfile.user sonic-slave/Dockerfile | shasum | awk '{print substr($$1,0,11);}')
29+
SLAVE_BASE_TAG = $(shell sha1sum sonic-slave/Dockerfile | awk '{print substr($$1,0,11);}')
30+
SLAVE_TAG = $(shell cat sonic-slave/Dockerfile.user sonic-slave/Dockerfile | sha1sum | awk '{print substr($$1,0,11);}')
3031
SLAVE_BASE_IMAGE = sonic-slave-base
3132
SLAVE_IMAGE = sonic-slave-$(USER)
3233

@@ -72,7 +73,11 @@ SONIC_BUILD_INSTRUCTION := make \
7273
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
7374
$(DOCKER_BUILD) ; }
7475
ifeq "$(KEEP_SLAVE_ON)" "yes"
75-
@$(DOCKER_RUN) $(SLAVE_IMAGE):$(SLAVE_TAG) bash -c "$(SONIC_BUILD_INSTRUCTION) $@; /bin/bash"
76+
ifdef SOURCE_FOLDER
77+
@$(DOCKER_RUN) -v $(SOURCE_FOLDER):/var/src $(SLAVE_IMAGE):$(SLAVE_TAG) bash -c "$(SONIC_BUILD_INSTRUCTION) $@; /bin/bash"
78+
else
79+
@$(DOCKER_RUN) $(SLAVE_IMAGE):$(SLAVE_TAG) bash -c "$(SONIC_BUILD_INSTRUCTION) $@; /bin/bash"
80+
endif
7681
else
7782
@$(DOCKER_RUN) $(SLAVE_IMAGE):$(SLAVE_TAG) $(SONIC_BUILD_INSTRUCTION) $@
7883
endif

README.md

+15-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1-
Broadcom: [![Broadcom](https://sonic-jenkins.westus.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all/badge/icon)](https://sonic-jenkins.westus.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all)
2-
Cavium: [![Cavium](https://sonic-jenkins.westus.cloudapp.azure.com/job/cavium/job/buildimage-cavm-all/badge/icon)](https://sonic-jenkins.westus.cloudapp.azure.com/job/cavium/job/buildimage-cavm-all/)
3-
Centec: [![Centec](https://sonic-jenkins.westus.cloudapp.azure.com/job/centec/job/buildimage-centec-all/badge/icon)](https://sonic-jenkins.westus.cloudapp.azure.com/job/centec/job/buildimage-centec-all/)
4-
Mellanox: [![Mellanox](https://sonic-jenkins.westus.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all/badge/icon)](https://sonic-jenkins.westus.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all)
5-
P4: [![Broadcom](https://sonic-jenkins.westus.cloudapp.azure.com/job/p4/job/buildimage-p4-all/badge/icon)](https://sonic-jenkins.westus.cloudapp.azure.com/job/p4/job/buildimage-p4-all)
1+
*master*: Broadcom: [![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all)
2+
Mellanox: [![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all)
3+
P4: [![P4](https://sonic-jenkins.westus2.cloudapp.azure.com/job/p4/job/buildimage-p4-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/p4/job/buildimage-p4-all)
4+
VS: [![VS](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all)
5+
6+
*201709*:
7+
Broadcom: [![Broadcom](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201709/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-201709/)
8+
Cavium: [![Cavium](https://sonic-jenkins.westus2.cloudapp.azure.com/job/cavium/job/buildimage-cavm-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/cavium/job/buildimage-cavm-all/)
9+
Centec: [![Centec](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/centec/job/buildimage-centec-all/)
10+
Nephos: [![Nephos](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/nephos/job/buildimage-nephos-all/)
11+
Marvell: [![Marvell](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-all/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/marvell/job/buildimage-mrvl-all/)
12+
Mellanox: [![Mellanox](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201709/badge/icon)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-201709/)
613

714
# sonic-buildimage
815

916
## Build SONiC Switch Images
1017

1118
# Description
1219

13-
Following is the instruction on how to build an [(ONIE)](https://github.com/opencomputeproject/onie) compatiable network operating system (NOS) installer image for network switches, and also how to build docker images running inside the NOS. Note that SONiC image are build per ASIC platform. Switches using the same ASIC platform share a common image. For a list of supported switches and ASIC, please refer to this [document](https://sonic-jenkins.westus.cloudapp.azure.com/job/p4/job/buildimage-p4-all).
20+
Following is the instruction on how to build an [(ONIE)](https://github.com/opencomputeproject/onie) compatiable network operating system (NOS) installer image for network switches, and also how to build docker images running inside the NOS. Note that SONiC image are build per ASIC platform. Switches using the same ASIC platform share a common image. For a list of supported switches and ASIC, please refer to this [list](https://github.com/Azure/SONiC/wiki/Supported-Devices-and-Platforms)
1421

1522
# Hardware
1623
Any server can be a build image server. We are using a server with 1T hard disk. The OS is Ubuntu 16.04.
@@ -47,6 +54,7 @@ The SONiC installer contains all docker images needed. SONiC uses one image for
4754
- PLATFORM=cavium
4855
- PLATFORM=centec
4956
- PLATFORM=p4
57+
- PLATFORM=vs
5058

5159
For Broadcom ASIC, we build ONIE and EOS image. EOS image is used for Arista devices, ONIE image is used for all other Broadcom ASIC based devices.
5260

@@ -92,6 +100,7 @@ This may take a while, but it is a one-time action, so please be patient.
92100
- docker-syncd-cavm.gz: docker image for the daemon to sync database and Cavium switch ASIC (gzip tar archive)
93101
- docker-syncd-mlnx.gz: docker image for the daemon to sync database and Mellanox switch ASIC (gzip tar archive)
94102
- docker-sonic-p4.gz: docker image for all-in-one for p4 software switch (gzip tar archive)
103+
- docker-sonic-vs.gz: docker image for all-in-one for software virtual switch (gzip tar archive)
95104

96105
## Contribution Guide
97106

build_debian.sh

+2
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ sudo cp files/initramfs-tools/arista-convertfs $FILESYSTEM_ROOT/etc/initramfs-to
123123
sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/arista-convertfs
124124
sudo cp files/initramfs-tools/mke2fs $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/mke2fs
125125
sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/mke2fs
126+
sudo cp files/initramfs-tools/setfacl $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/setfacl
127+
sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/setfacl
126128

127129
# Hook into initramfs: rename the management interfaces on arista switches
128130
sudo cp files/initramfs-tools/arista-net $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/arista-net
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,73 @@
1-
# name lanes alias
2-
Ethernet0 13 tenGigE0
3-
Ethernet1 14 tenGigE1
4-
Ethernet2 15 tenGigE2
5-
Ethernet3 16 tenGigE3
6-
Ethernet4 21 tenGigE4
7-
Ethernet5 22 tenGigE5
8-
Ethernet6 23 tenGigE6
9-
Ethernet7 24 tenGigE7
10-
Ethernet8 25 tenGigE8
11-
Ethernet9 26 tenGigE9
12-
Ethernet10 27 tenGigE10
13-
Ethernet11 28 tenGigE11
14-
Ethernet12 29 tenGigE12
15-
Ethernet13 30 tenGigE13
16-
Ethernet14 31 tenGigE14
17-
Ethernet15 32 tenGigE15
18-
Ethernet16 45 tenGigE16
19-
Ethernet17 46 tenGigE17
20-
Ethernet18 47 tenGigE18
21-
Ethernet19 48 tenGigE19
22-
Ethernet20 49 tenGigE20
23-
Ethernet21 50 tenGigE21
24-
Ethernet22 51 tenGigE22
25-
Ethernet23 52 tenGigE23
26-
Ethernet24 53 tenGigE24
27-
Ethernet25 54 tenGigE25
28-
Ethernet26 55 tenGigE26
29-
Ethernet27 56 tenGigE27
30-
Ethernet28 57 tenGigE28
31-
Ethernet29 58 tenGigE29
32-
Ethernet30 59 tenGigE30
33-
Ethernet31 60 tenGigE31
34-
Ethernet32 61 tenGigE32
35-
Ethernet33 62 tenGigE33
36-
Ethernet34 63 tenGigE34
37-
Ethernet35 64 tenGigE35
38-
Ethernet36 65 tenGigE36
39-
Ethernet37 66 tenGigE37
40-
Ethernet38 67 tenGigE38
41-
Ethernet39 68 tenGigE39
42-
Ethernet40 69 tenGigE40
43-
Ethernet41 70 tenGigE41
44-
Ethernet42 71 tenGigE42
45-
Ethernet43 72 tenGigE43
46-
Ethernet44 73 tenGigE44
47-
Ethernet45 74 tenGigE45
48-
Ethernet46 75 tenGigE46
49-
Ethernet47 76 tenGigE47
50-
Ethernet48 97 tenGigE48
51-
Ethernet49 98 tenGigE49
52-
Ethernet50 99 tenGigE50
53-
Ethernet51 100 tenGigE51
54-
Ethernet52 101 tenGigE52
55-
Ethernet53 102 tenGigE53
56-
Ethernet54 103 tenGigE54
57-
Ethernet55 104 tenGigE55
58-
Ethernet56 81 tenGigE56
59-
Ethernet57 82 tenGigE57
60-
Ethernet58 83 tenGigE58
61-
Ethernet59 84 tenGigE59
62-
Ethernet60 105 tenGigE60
63-
Ethernet61 106 tenGigE61
64-
Ethernet62 107 tenGigE62
65-
Ethernet63 108 tenGigE63
66-
Ethernet64 109 tenGigE64
67-
Ethernet65 110 tenGigE65
68-
Ethernet66 111 tenGigE66
69-
Ethernet67 112 tenGigE67
70-
Ethernet68 77 tenGigE68
71-
Ethernet69 78 tenGigE69
72-
Ethernet70 79 tenGigE70
73-
Ethernet71 80 tenGigE71
74-
1+
# name lanes alias index
2+
Ethernet0 13 tenGigE0 0
3+
Ethernet1 14 tenGigE1 1
4+
Ethernet2 15 tenGigE2 2
5+
Ethernet3 16 tenGigE3 3
6+
Ethernet4 21 tenGigE4 4
7+
Ethernet5 22 tenGigE5 5
8+
Ethernet6 23 tenGigE6 6
9+
Ethernet7 24 tenGigE7 7
10+
Ethernet8 25 tenGigE8 8
11+
Ethernet9 26 tenGigE9 9
12+
Ethernet10 27 tenGigE10 10
13+
Ethernet11 28 tenGigE11 11
14+
Ethernet12 29 tenGigE12 12
15+
Ethernet13 30 tenGigE13 13
16+
Ethernet14 31 tenGigE14 14
17+
Ethernet15 32 tenGigE15 15
18+
Ethernet16 45 tenGigE16 16
19+
Ethernet17 46 tenGigE17 17
20+
Ethernet18 47 tenGigE18 18
21+
Ethernet19 48 tenGigE19 19
22+
Ethernet20 49 tenGigE20 20
23+
Ethernet21 50 tenGigE21 21
24+
Ethernet22 51 tenGigE22 22
25+
Ethernet23 52 tenGigE23 23
26+
Ethernet24 53 tenGigE24 24
27+
Ethernet25 54 tenGigE25 25
28+
Ethernet26 55 tenGigE26 26
29+
Ethernet27 56 tenGigE27 27
30+
Ethernet28 57 tenGigE28 28
31+
Ethernet29 58 tenGigE29 29
32+
Ethernet30 59 tenGigE30 30
33+
Ethernet31 60 tenGigE31 31
34+
Ethernet32 61 tenGigE32 32
35+
Ethernet33 62 tenGigE33 33
36+
Ethernet34 63 tenGigE34 34
37+
Ethernet35 64 tenGigE35 35
38+
Ethernet36 65 tenGigE36 36
39+
Ethernet37 66 tenGigE37 37
40+
Ethernet38 67 tenGigE38 38
41+
Ethernet39 68 tenGigE39 39
42+
Ethernet40 69 tenGigE40 40
43+
Ethernet41 70 tenGigE41 41
44+
Ethernet42 71 tenGigE42 42
45+
Ethernet43 72 tenGigE43 43
46+
Ethernet44 73 tenGigE44 44
47+
Ethernet45 74 tenGigE45 45
48+
Ethernet46 75 tenGigE46 46
49+
Ethernet47 76 tenGigE47 47
50+
Ethernet48 97 tenGigE48 48
51+
Ethernet49 98 tenGigE49 49
52+
Ethernet50 99 tenGigE50 50
53+
Ethernet51 100 tenGigE51 51
54+
Ethernet52 101 tenGigE52 52
55+
Ethernet53 102 tenGigE53 53
56+
Ethernet54 103 tenGigE54 54
57+
Ethernet55 104 tenGigE55 55
58+
Ethernet56 81 tenGigE56 56
59+
Ethernet57 82 tenGigE57 57
60+
Ethernet58 83 tenGigE58 58
61+
Ethernet59 84 tenGigE59 59
62+
Ethernet60 105 tenGigE60 60
63+
Ethernet61 106 tenGigE61 61
64+
Ethernet62 107 tenGigE62 62
65+
Ethernet63 108 tenGigE63 63
66+
Ethernet64 109 tenGigE64 64
67+
Ethernet65 110 tenGigE65 65
68+
Ethernet66 111 tenGigE66 66
69+
Ethernet67 112 tenGigE67 67
70+
Ethernet68 77 tenGigE68 68
71+
Ethernet69 78 tenGigE69 69
72+
Ethernet70 79 tenGigE70 70
73+
Ethernet71 80 tenGigE71 71
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
SAI_INIT_CONFIG_FILE=/etc/bcm/td2-as5712-72x10G.config.bcm
2-

0 commit comments

Comments
 (0)