Skip to content

Commit

Permalink
Merge remote-tracking branch 'msft_github/master'
Browse files Browse the repository at this point in the history
* msft_github/master:
  [docker-fpm-quagga]: Manage Quagga processes (zebra, bgpd) using supervisor instead of watchquagga (sonic-net#900)
  Add arista-net initramfs hook (sonic-net#899)
  Add Marvell platform (sonic-net#765)
  [sonic-utilities]: Update submodule to remove pager from CLI utils (sonic-net#897)
  Fixing a couple of issues to enable FRR to run with latest SONiC code. (sonic-net#895)
  Fix the network command for ipv6 vlan interfaces (sonic-net#894)
  Add s8810 32q platform support (sonic-net#867)
  [quagga]: Update sonic-quagga submodule (sonic-net#892)
  [docker-database]: Start rsyslogd to allow supervisor to log to syslog (sonic-net#890)
  [docker-platform-monitor]: Prevent supervisor from logging unexpected exits from processes known to exit in < 1 second (sonic-net#889)
  Update sonic-utilities (sonic-net#887)
  [submodule] update sonic-swss submodule (sonic-net#885)
  [LEDs]: Initialize status and fan LEDs to green on Arista 7050-QX-32/7050-QX-32-S (sonic-net#886)
  [sfputil]: Add support for SFP presence, low-power mode and reset (sonic-net#877)
  [System logs]: Improvements to prevent filling /var/log partition (sonic-net#865)
  Update sonic-utilities pointer to support reload minigraph (sonic-net#871)
  [device/accton]: Update Accton-AS7712-32X (sonic-net#776)
  [ConfigDB] Move all BGP configuration into DB (sonic-net#861)
  [sonic-slave]: Split user commands from generic. (sonic-net#868)
  [platform] Add support for Arista DCS-7260CX3-64 (sonic-net#863)
  • Loading branch information
Rodny Molina committed Aug 22, 2017
2 parents 2625818 + ed66588 commit 05dcbeb
Show file tree
Hide file tree
Showing 90 changed files with 2,397 additions and 397 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Build system related
.platform
.screen

# Build artifacts
fsroot/
Expand Down
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,28 @@ $(shell rm -f .screen)

MAKEFLAGS += -B

SLAVE_TAG = $(shell shasum sonic-slave/Dockerfile | awk '{print substr($$1,0,11);}')
SLAVE_BASE_TAG = $(shell shasum sonic-slave/Dockerfile | awk '{print substr($$1,0,11);}')
SLAVE_TAG = $(shell shasum sonic-slave/Dockerfile.user | awk '{print substr($$1,0,11);}')
SLAVE_BASE_IMAGE = sonic-slave-base
SLAVE_IMAGE = sonic-slave-$(USER)

DOCKER_RUN := docker run --rm=true --privileged \
-v $(PWD):/sonic \
-w /sonic \
-i$(if $(TERM),t,)

DOCKER_BASE_BUILD = docker build --no-cache \
-t $(SLAVE_BASE_IMAGE) \
sonic-slave && \
docker tag $(SLAVE_BASE_IMAGE):latest $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG)

DOCKER_BUILD = docker build --no-cache \
--build-arg user=$(USER) \
--build-arg uid=$(shell id -u) \
--build-arg guid=$(shell id -g) \
--build-arg hostname=$(shell echo $$HOSTNAME) \
-t $(SLAVE_IMAGE) \
-f sonic-slave/Dockerfile.user \
sonic-slave && \
docker tag $(SLAVE_IMAGE):latest $(SLAVE_IMAGE):$(SLAVE_TAG)

Expand All @@ -34,6 +42,9 @@ DOCKER_BUILD = docker build --no-cache \
.DEFAULT_GOAL := all

%::
@docker inspect --type image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) &> /dev/null || \
{ echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Building... ; \
$(DOCKER_BASE_BUILD) ; }
@docker inspect --type image $(SLAVE_IMAGE):$(SLAVE_TAG) &> /dev/null || \
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
$(DOCKER_BUILD) ; }
Expand All @@ -49,9 +60,13 @@ DOCKER_BUILD = docker build --no-cache \
$@

sonic-slave-build :
@$(DOCKER_BUILD)
$(DOCKER_BASE_BUILD)
$(DOCKER_BUILD)

sonic-slave-bash :
@docker inspect --type image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) &> /dev/null || \
{ echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Building... ; \
$(DOCKER_BASE_BUILD) ; }
@docker inspect --type image $(SLAVE_IMAGE):$(SLAVE_TAG) &> /dev/null || \
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
$(DOCKER_BUILD) ; }
Expand Down
4 changes: 4 additions & 0 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/arista-
sudo cp files/initramfs-tools/mke2fs $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/mke2fs
sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/mke2fs

# Hook into initramfs: rename the management interfaces on arista switches
sudo cp files/initramfs-tools/arista-net $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/arista-net
sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/arista-net

## Hook into initramfs: after partition mount and loop file mount
## 1. Prepare layered file system
## 2. Bind-mount docker working directory (docker aufs cannot work over aufs rootfs)
Expand Down
41 changes: 41 additions & 0 deletions device/accton/x86_64-accton_as7712_32x-r0/led_proc_init.soc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=31 REMAP_PORT_1=30 REMAP_PORT_2=29 REMAP_PORT_3=28
m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=27 REMAP_PORT_5=26 REMAP_PORT_6=25 REMAP_PORT_7=24
m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=23 REMAP_PORT_9=22 REMAP_PORT_10=21 REMAP_PORT_11=20
m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=19 REMAP_PORT_13=18 REMAP_PORT_14=17 REMAP_PORT_15=16
m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=63 REMAP_PORT_17=62 REMAP_PORT_18=61 REMAP_PORT_19=60
m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=59 REMAP_PORT_21=58 REMAP_PORT_22=57 REMAP_PORT_23=56
m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=55 REMAP_PORT_25=54 REMAP_PORT_26=53 REMAP_PORT_27=52
m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=51 REMAP_PORT_29=50 REMAP_PORT_30=49 REMAP_PORT_31=48
m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=47 REMAP_PORT_33=46 REMAP_PORT_34=45 REMAP_PORT_35=44
m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=43 REMAP_PORT_37=42 REMAP_PORT_38=41 REMAP_PORT_39=40
m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=39 REMAP_PORT_41=38 REMAP_PORT_42=37 REMAP_PORT_43=36
m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=35 REMAP_PORT_45=34 REMAP_PORT_46=33 REMAP_PORT_47=32
m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=15 REMAP_PORT_49=14 REMAP_PORT_50=13 REMAP_PORT_51=12
m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=11 REMAP_PORT_53=10 REMAP_PORT_54=9 REMAP_PORT_55=8
m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=7 REMAP_PORT_57=6 REMAP_PORT_58=5 REMAP_PORT_59=4
m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=3 REMAP_PORT_61=2 REMAP_PORT_62=1 REMAP_PORT_63=0

m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=35 REMAP_PORT_1=34 REMAP_PORT_2=33 REMAP_PORT_3=32
m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=39 REMAP_PORT_5=38 REMAP_PORT_6=37 REMAP_PORT_7=36
m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=43 REMAP_PORT_9=42 REMAP_PORT_10=41 REMAP_PORT_11=40
m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=47 REMAP_PORT_13=46 REMAP_PORT_14=45 REMAP_PORT_15=44
m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=3 REMAP_PORT_17=2 REMAP_PORT_18=1 REMAP_PORT_19=0
m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=7 REMAP_PORT_21=6 REMAP_PORT_22=5 REMAP_PORT_23=4
m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=11 REMAP_PORT_25=10 REMAP_PORT_26=9 REMAP_PORT_27=8
m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=15 REMAP_PORT_29=14 REMAP_PORT_30=13 REMAP_PORT_31=12
m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=19 REMAP_PORT_33=18 REMAP_PORT_34=17 REMAP_PORT_35=16
m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=23 REMAP_PORT_37=22 REMAP_PORT_38=21 REMAP_PORT_39=20
m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=27 REMAP_PORT_41=26 REMAP_PORT_42=25 REMAP_PORT_43=24
m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=31 REMAP_PORT_45=30 REMAP_PORT_46=29 REMAP_PORT_47=28
m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=51 REMAP_PORT_49=50 REMAP_PORT_50=49 REMAP_PORT_51=48
m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=55 REMAP_PORT_53=54 REMAP_PORT_54=53 REMAP_PORT_55=52
m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=59 REMAP_PORT_57=58 REMAP_PORT_58=57 REMAP_PORT_59=56
m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=63 REMAP_PORT_61=62 REMAP_PORT_62=61 REMAP_PORT_63=60

led 0 prog 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 E0 02 FB 42 40 06 F9 D2 00 74 1E 02 F9 42 03 67 AC 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 84 67 98 57 80 18 71 EB 67 98 67 84 57 67 84 67 84 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
led 0 start

led 1 prog 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 E0 02 FB 42 40 06 F9 D2 00 74 1E 02 F9 42 03 67 AC 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 84 67 98 57 80 18 71 EB 67 98 67 84 57 67 84 67 84 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
led 1 start

led auto on
20 changes: 20 additions & 0 deletions device/arista/x86_64-arista_7050_qx32/plugins/led_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,26 @@ def port_link_state_change(self, port, state):

# Constructor
def __init__(self):
# Initialize all front-panel status LEDs to green
with open("/sys/class/leds/status/brightness", "w") as f:
f.write("1")
with open("/sys/class/leds/fan_status/brightness", "w") as f:
f.write("1")
with open("/sys/class/leds/psu1/brightness", "w") as f:
f.write("1")
with open("/sys/class/leds/psu2/brightness", "w") as f:
f.write("1")

# Initialize all fan LEDs to green
with open("/sys/devices/platform/sb800-fans/hwmon/hwmon1/fan1_led", "w") as f:
f.write("3")
with open("/sys/devices/platform/sb800-fans/hwmon/hwmon1/fan2_led", "w") as f:
f.write("3")
with open("/sys/devices/platform/sb800-fans/hwmon/hwmon1/fan3_led", "w") as f:
f.write("3")
with open("/sys/devices/platform/sb800-fans/hwmon/hwmon1/fan4_led", "w") as f:
f.write("3")

# Initialize: Turn all front panel QSFP LEDs off
for qsfp_index in range(self.QSFP_BREAKOUT_START_IDX, self.QSFP_BREAKOUT_END_IDX + 1):
for lane in range(1, 5):
Expand Down
11 changes: 7 additions & 4 deletions device/arista/x86_64-arista_7050_qx32/plugins/sfputil.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/usr/bin/env python
# sfputil.py
#
# Platform-specific SFP transceiver interface for SONiC
#

try:
import arista.utils.sonic_sfputil as arista_sfputil
except ImportError, e:
raise ImportError (str(e) + "- required module not found")
except ImportError as e:
raise ImportError("%s - required module not found" % str(e))


sfputil = arista_sfputil.getSfpUtil()
SfpUtil = arista_sfputil.getSfpUtil()
21 changes: 21 additions & 0 deletions device/arista/x86_64-arista_7050_qx32s/plugins/led_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,27 @@ def port_link_state_change(self, port, state):

# Constructor
def __init__(self):
# Initialize all front-panel status LEDs to green
with open("/sys/class/leds/status/brightness", "w") as f:
f.write("1")
with open("/sys/class/leds/fan_status/brightness", "w") as f:
f.write("1")
with open("/sys/class/leds/psu1/brightness", "w") as f:
f.write("1")
with open("/sys/class/leds/psu2/brightness", "w") as f:
f.write("1")

# Initialize all fan LEDs to green
with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon2/fan1_led", "w") as f:
f.write("1")
with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon2/fan2_led", "w") as f:
f.write("1")
with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon2/fan3_led", "w") as f:
f.write("1")
with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon2/fan4_led", "w") as f:
f.write("1")


# Initialize: Turn all front panel QSFP LEDs off
for qsfp_index in range(self.QSFP_BREAKOUT_START_IDX, self.QSFP_BREAKOUT_END_IDX + 1):
for lane in range(1, 5):
Expand Down
11 changes: 7 additions & 4 deletions device/arista/x86_64-arista_7050_qx32s/plugins/sfputil.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/usr/bin/env python
# sfputil.py
#
# Platform-specific SFP transceiver interface for SONiC
#

try:
import arista.utils.sonic_sfputil as arista_sfputil
except ImportError, e:
raise ImportError (str(e) + "- required module not found")
except ImportError as e:
raise ImportError("%s - required module not found" % str(e))


sfputil = arista_sfputil.getSfpUtil()
SfpUtil = arista_sfputil.getSfpUtil()
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# name lanes alias port
Ethernet0 77,78,79,80 Ethernet1/1 1
Ethernet4 65,66,67,68 Ethernet2/1 2
Ethernet8 85,86,87,88 Ethernet3/1 3
Ethernet12 89,90,91,92 Ethernet4/1 4
Ethernet16 109,110,111,112 Ethernet5/1 5
Ethernet20 97,98,99,100 Ethernet6/1 6
Ethernet24 117,118,119,120 Ethernet7/1 7
Ethernet28 5,6,7,8 Ethernet8/1 8
Ethernet32 17,18,19,20 Ethernet9/1 9
Ethernet36 13,14,15,16 Ethernet10/1 10
Ethernet40 29,30,31,32 Ethernet11/1 11
Ethernet44 37,38,39,40 Ethernet12/1 12
Ethernet48 49,50,51,52 Ethernet13/1 13
Ethernet52 45,46,47,48 Ethernet14/1 14
Ethernet56 61,62,63,64 Ethernet15/1 15
Ethernet60 121,122,123,124 Ethernet16/1 16
Ethernet64 193,194,195,196 Ethernet17/1 17
Ethernet68 133,134,135,136 Ethernet18/1 18
Ethernet72 205,206,207,208 Ethernet19/1 19
Ethernet76 213,214,215,216 Ethernet20/1 20
Ethernet80 225,226,227,228 Ethernet21/1 21
Ethernet84 221,222,223,224 Ethernet22/1 22
Ethernet88 237,238,239,240 Ethernet23/1 23
Ethernet92 245,246,247,248 Ethernet24/1 24
Ethernet96 141,142,143,144 Ethernet25/1 25
Ethernet100 249,250,251,252 Ethernet26/1 26
Ethernet104 149,150,151,152 Ethernet27/1 27
Ethernet108 153,154,155,156 Ethernet28/1 28
Ethernet112 173,174,175,176 Ethernet29/1 29
Ethernet116 161,162,163,164 Ethernet30/1 30
Ethernet120 181,182,183,184 Ethernet31/1 31
Ethernet124 185,186,187,188 Ethernet32/1 32
Ethernet128 69,70,71,72 Ethernet33/1 33
Ethernet132 73,74,75,76 Ethernet34/1 34
Ethernet136 93,94,95,96 Ethernet35/1 35
Ethernet140 81,82,83,84 Ethernet36/1 36
Ethernet144 101,102,103,104 Ethernet37/1 37
Ethernet148 105,106,107,108 Ethernet38/1 38
Ethernet152 1,2,3,4 Ethernet39/1 39
Ethernet156 113,114,115,116 Ethernet40/1 40
Ethernet160 9,10,11,12 Ethernet41/1 41
Ethernet164 21,22,23,24 Ethernet42/1 42
Ethernet168 33,34,35,36 Ethernet43/1 43
Ethernet172 25,26,27,28 Ethernet44/1 44
Ethernet176 41,42,43,44 Ethernet45/1 45
Ethernet180 53,54,55,56 Ethernet46/1 46
Ethernet184 125,126,127,128 Ethernet47/1 47
Ethernet188 57,58,59,60 Ethernet48/1 48
Ethernet192 129,130,131,132 Ethernet49/1 49
Ethernet196 197,198,199,200 Ethernet50/1 50
Ethernet200 209,210,211,212 Ethernet51/1 51
Ethernet204 201,202,203,204 Ethernet52/1 52
Ethernet208 217,218,219,220 Ethernet53/1 53
Ethernet212 229,230,231,232 Ethernet54/1 54
Ethernet216 241,242,243,244 Ethernet55/1 55
Ethernet220 233,234,235,236 Ethernet56/1 56
Ethernet224 253,254,255,256 Ethernet57/1 57
Ethernet228 137,138,139,140 Ethernet58/1 58
Ethernet232 157,158,159,160 Ethernet59/1 59
Ethernet236 145,146,147,148 Ethernet60/1 60
Ethernet240 165,166,167,168 Ethernet61/1 61
Ethernet244 169,170,171,172 Ethernet62/1 62
Ethernet248 189,190,191,192 Ethernet63/1 63
Ethernet252 177,178,179,180 Ethernet64/1 64
Ethernet256 257 Ethernet65 65
Ethernet260 259 Ethernet66 66
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SAI_INIT_CONFIG_FILE=/etc/bcm/th2-a7260cx3-64-64x100G.config.bcm
Loading

0 comments on commit 05dcbeb

Please sign in to comment.