Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code sync #113

Merged
merged 33 commits into from
Sep 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
aea84a7
BIOS upgrade support with API2.0 for DellEMC S6100 (#3116)
Aug 23, 2019
8924739
[device/arista] Update drivers submodules (#3378)
Staphylo Aug 23, 2019
97b43f9
[mlnx_platform_api.thermal]align thermal sensor names with hw-managem…
stephenxs Aug 23, 2019
f238042
Z9264f-LED_changes (#3376)
aravindmani-1 Aug 23, 2019
4aadbbe
remove platform_wait script from mellanox simx platform (#3380)
keboliu Aug 23, 2019
9e44070
[doc]: use docker without sudo (#3336)
tim-rj Aug 26, 2019
1840bef
[devices]: Add serdes tuning for Arista 7060PX4 32x400G (#3382)
zzhiyuan Aug 28, 2019
14458b7
Create the src archive in target/ when INSTALL_DEBUG_TOOLS=y (#3323)
renukamanavalan Aug 28, 2019
bdce201
[Makefile] Multiarch docker service cleanup at make reset (#3366)
antony-rheneus Aug 28, 2019
768beb7
create multiple Redis DB instances based on CONFIG at /etc/sonic/data…
dzhangalibaba Aug 28, 2019
a5b805e
[platform/cel]: Add new API installer to pmon and base image (#3379)
Aug 28, 2019
4c36866
[syncd-rpc-brcm]: Fix syncd terminated in broadcom rpc image (#3391)
chiourung Aug 28, 2019
5c2d711
[Mellanox] optimize new platform api (#3289)
stephenxs Aug 28, 2019
f920560
[swss]: Add hash seed 15 for SpineRouter type (#3390)
zhenggen-xu Aug 28, 2019
754c0b1
[platform]: BFN platform modules update (#3389)
akokhan Aug 29, 2019
7bf8fbe
[build_debian] docker version update for ARM arch (#3353)
antony-rheneus Aug 29, 2019
3323e9b
[device][accton]: ADD the Accton new device support, AS9716-32D (#3372)
pollyhsu2git Aug 29, 2019
be3cbdb
[docker-fpm-frr/bgpcfgd]: Update interface of bgpcfgd from swsssdk to…
Pterosaur Aug 29, 2019
1c06ae6
[libteam]: timerfd read() could return 0 fix (#3393)
pavel-shirshov Aug 29, 2019
1b0e900
Add IPv6 Support in TACACS (#3395)
SuvarnaMeenakshi Sep 3, 2019
063567c
[minigraph]: Ignore mirror session portion in minigraph (#3410)
stcheng Sep 5, 2019
47504d1
[src/sonic-utilities] Update sonic-utilities submodule (#3405)
daall Sep 5, 2019
cfcf305
[build_debian] Include checksum of ASIC config files in SONiC filesys…
daall Sep 6, 2019
fdcb69d
[devices]: Adding platform support for Juniper QFX5210 (#3270)
ciju-juniper Sep 6, 2019
ca43dad
Use dot1p to tc mapping for backend switches (#3412)
wendani Sep 6, 2019
9fdc6bd
[dhcp_relay]:filter out the ipv6 address of dhcp server for dhcp rela…
wangshengjun Sep 6, 2019
309af83
[DELL][S6000] Platform 2.0 TransceiverChange Support (#3414)
sridhar-ravindran Sep 6, 2019
150ee07
[device/celestica]: Update new platform APIs (#3415)
Sep 6, 2019
d47ec52
[devices]: Add to support thermal plan in as9716 platform (#3409)
jostar-yang Sep 6, 2019
a27f127
[baseimage]: Log message containing SONiC version to syslog at boot (…
jleveque Sep 9, 2019
a1158c6
Revert "Use dot1p to tc mapping for backend switches (#3412)" (#3421)
lguohan Sep 9, 2019
aa76ef3
[sonic-utilities] Update submodule (#3425)
jleveque Sep 10, 2019
2095d6e
[devices]: Update arista submodule (#3431)
zzhiyuan Sep 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -227,18 +227,24 @@ init :
@git submodule update --init --recursive
@git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $$(realpath --relative-to=. $$(cut -d" " -f2 .git))" > .git'

.ONESHELL : reset
reset :
@echo && echo -n "Warning! All local changes will be lost. Proceed? [y/N]: "
@read ans && \
if [ $$ans == y ]; then \
echo "Resetting local repository. Please wait..."; \
$(DOCKER_RUN) $(SLAVE_IMAGE):$(SLAVE_TAG) sudo rm -rf fsroot; \
git clean -xfdf; \
git reset --hard; \
git submodule foreach --recursive git clean -xfdf; \
git submodule foreach --recursive git reset --hard; \
git submodule update --init --recursive; \
echo "Reset complete!"; \
else \
echo "Reset aborted"; \
fi
@read ans && (
if [ $$ans == y ]; then
echo "Resetting local repository. Please wait...";
$(DOCKER_RUN) $(SLAVE_IMAGE):$(SLAVE_TAG) sudo rm -rf fsroot;
if [[ "$(CONFIGURED_ARCH)" == "armhf" || "$(CONFIGURED_ARCH)" == "arm64" ]]; then
echo "Stopping march $(CONFIGURED_ARCH) docker"
sudo kill -9 `sudo cat /var/run/march/docker.pid` || true
sudo rm -f /var/run/march/docker.pid || true
fi
git clean -xfdf;
git reset --hard;
git submodule foreach --recursive git clean -xfdf;
git submodule foreach --recursive git reset --hard;
git submodule update --init --recursive;
echo "Reset complete!";
else
echo "Reset aborted";
fi )
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ Install pip and jinja in host build machine, execute below commands if j2/j2cli
sudo pip install --force-reinstall --upgrade jinja2>=2.10
sudo pip install j2cli

Configure your system to allow running the 'docker' command without 'sudo':
Add current user to the docker group
`sudo gpasswd -a ${USER} docker`
Log out and log back in so that your group membership is re-evaluated

## SAI Version
Please refer to [SONiC roadmap](https://github.com/Azure/SONiC/wiki/Sonic-Roadmap-Planning) on the SAI version for each SONiC release.

Expand Down
20 changes: 15 additions & 5 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ set -x -e
CONFIGURED_ARCH=$([ -f .arch ] && cat .arch || echo amd64)

## docker engine version (with platform)
DOCKER_VERSION=5:18.09.8~3-0~debian-stretch
if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then
# Version name differs between ARCH, copying same version as in sonic-slave docker
DOCKER_VERSION=18.06.3~ce~3-0~debian
else
DOCKER_VERSION=5:18.09.8~3-0~debian-stretch
fi
LINUX_KERNEL_VERSION=4.9.0-9-2

## Working directory to prepare the file system
Expand Down Expand Up @@ -458,6 +463,14 @@ build_number: ${BUILD_NUMBER:-0}
built_by: $USER@$BUILD_HOSTNAME
EOF

## Copy ASIC config checksum
python files/build_scripts/generate_asic_config_checksum.py
if [[ ! -f './asic_config_checksum' ]]; then
echo 'asic_config_checksum not found'
exit 1
fi
sudo cp ./asic_config_checksum $FILESYSTEM_ROOT/etc/sonic/asic_config_checksum

if [ -f sonic_debian_extension.sh ]; then
./sonic_debian_extension.sh $FILESYSTEM_ROOT $PLATFORM_DIR
fi
Expand Down Expand Up @@ -488,10 +501,7 @@ then
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '/debug is mounted in each docker' >> /etc/motd"

sudo mkdir -p $FILESYSTEM_ROOT/src
pushd src
../scripts/dbg_files.sh | sudo tar -cvzf ../$FILESYSTEM_ROOT/src/sonic_src.tar.gz -T -
popd

sudo cp $DEBUG_SRC_ARCHIVE_FILE $FILESYSTEM_ROOT/src/
sudo mkdir -p $FILESYSTEM_ROOT/debug

fi
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# name lanes alias index speed
Ethernet0 73,74,75,76,77,78,79,80 fourHundredGigE1 0 400000
Ethernet4 65,66,67,68,69,70,71,72 fourHundredGigE2 1 400000
Ethernet8 81,82,83,84,85,86,87,88 fourHundredGigE3 2 400000
Ethernet12 89,90,91,92,93,94,95,96 fourHundredGigE4 3 400000
Ethernet16 97,98,99,100,101,102,103,104 fourHundredGigE5 4 400000
Ethernet20 105,106,107,108,109,110,111,112 fourHundredGigE6 5 400000
Ethernet24 113,114,115,116,117,118,119,120 fourHundredGigE7 6 400000
Ethernet28 121,122,123,124,125,126,127,128 fourHundredGigE8 7 400000
Ethernet32 41,42,43,44,45,46,47,48 fourHundredGigE9 8 400000
Ethernet36 33,34,35,36,37,38,39,40 fourHundredGigE10 9 400000
Ethernet40 49,50,51,52,53,54,55,56 fourHundredGigE11 10 400000
Ethernet44 57,58,59,60,61,62,63,64 fourHundredGigE12 11 400000
Ethernet48 129,130,131,132,133,134,135,136 fourHundredGigE13 12 400000
Ethernet52 137,138,139,140,141,142,143,144 fourHundredGigE14 13 400000
Ethernet56 145,146,147,148,149,150,151,152 fourHundredGigE15 14 400000
Ethernet60 153,154,155,156,157,158,159,160 fourHundredGigE16 15 400000
Ethernet64 169,170,171,172,173,174,175,176 fourHundredGigE17 16 400000
Ethernet68 161,162,163,164,165,166,167,168 fourHundredGigE18 17 400000
Ethernet72 177,178,179,180,181,182,183,184 fourHundredGigE19 18 400000
Ethernet76 185,186,187,188,189,190,191,192 fourHundredGigE20 19 400000
Ethernet80 1,2,3,4,5,6,7,8 fourHundredGigE21 20 400000
Ethernet84 9,10,11,12,13,14,15,16 fourHundredGigE22 21 400000
Ethernet88 17,18,19,20,21,22,23,24 fourHundredGigE23 22 400000
Ethernet92 25,26,27,28,29,30,31,32 fourHundredGigE24 23 400000
Ethernet96 201,202,203,204,205,206,207,208 fourHundredGigE25 24 400000
Ethernet100 193,194,195,196,197,198,199,200 fourHundredGigE26 25 400000
Ethernet104 217,218,219,220,221,222,223,224 fourHundredGigE27 26 400000
Ethernet108 209,210,211,212,213,214,215,216 fourHundredGigE28 27 400000
Ethernet112 233,234,235,236,237,238,239,240 fourHundredGigE29 28 400000
Ethernet116 225,226,227,228,229,230,231,232 fourHundredGigE30 29 400000
Ethernet120 249,250,251,252,253,254,255,256 fourHundredGigE31 30 400000
Ethernet124 241,242,243,244,245,246,247,248 fourHundredGigE32 31 400000
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SAI_INIT_CONFIG_FILE=/etc/bcm/th3-as9716-32x400G.config.bcm
1 change: 1 addition & 0 deletions device/accton/x86_64-accton_as9716_32d-r0/default_sku
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Accton-AS9716-32D t1
4 changes: 4 additions & 0 deletions device/accton/x86_64-accton_as9716_32d-r0/installer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONSOLE_PORT=0x3f8
CONSOLE_DEV=0
CONSOLE_SPEED=115200
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="pcie_aspm=off"
21 changes: 21 additions & 0 deletions device/accton/x86_64-accton_as9716_32d-r0/plugins/eeprom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env python

try:
import exceptions
import binascii
import time
import optparse
import warnings
import os
import sys
from sonic_eeprom import eeprom_base
from sonic_eeprom import eeprom_tlvinfo
import subprocess
except ImportError, e:
raise ImportError (str(e) + "- required module not found")

class board(eeprom_tlvinfo.TlvInfoDecoder):
_TLV_INFO_MAX_LEN = 256
def __init__(self, name, path, cpld_root, ro):
self.eeprom_path = "/sys/bus/i2c/devices/0-0056/eeprom"
super(board, self).__init__(self.eeprom_path, 0, '', True)
61 changes: 61 additions & 0 deletions device/accton/x86_64-accton_as9716_32d-r0/plugins/psuutil.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/env python

#############################################################################
# Accton
#
# Module contains an implementation of SONiC PSU Base API and
# provides the PSUs status which are available in the platform
#
#############################################################################

import os.path

try:
from sonic_psu.psu_base import PsuBase
except ImportError as e:
raise ImportError (str(e) + "- required module not found")

class PsuUtil(PsuBase):
"""Platform-specific PSUutil class"""

def __init__(self):
PsuBase.__init__(self)

self.psu_path = "/sys/bus/i2c/devices/"
self.psu_presence = "/psu_present"
self.psu_oper_status = "/psu_power_good"
self.psu_mapping = {
2: "10-0051",
1: "9-0050",
}

def get_num_psus(self):
return len(self.psu_mapping)

def get_psu_status(self, index):
if index is None:
return False

status = 0
node = self.psu_path + self.psu_mapping[index]+self.psu_oper_status
try:
with open(node, 'r') as power_status:
status = int(power_status.read())
except IOError:
return False

return status == 1

def get_psu_presence(self, index):
if index is None:
return False

status = 0
node = self.psu_path + self.psu_mapping[index] + self.psu_presence
try:
with open(node, 'r') as presence_status:
status = int(presence_status.read())
except IOError:
return False

return status == 1
150 changes: 150 additions & 0 deletions device/accton/x86_64-accton_as9716_32d-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
# sfputil.py
#
# Platform-specific SFP transceiver interface for SONiC
#

try:
import time
from sonic_sfp.sfputilbase import SfpUtilBase
except ImportError as e:
raise ImportError("%s - required module not found" % str(e))


class SfpUtil(SfpUtilBase):
"""Platform-specific SfpUtil class"""

PORT_START = 0
PORT_END = 33
PORTS_IN_BLOCK = 34

BASE_OOM_PATH = "/sys/bus/i2c/devices/{0}-0050/"
BASE_CPLD1_PATH = "/sys/bus/i2c/devices/20-0061/"
BASE_CPLD2_PATH = "/sys/bus/i2c/devices/21-0062/"

_port_to_is_present = {}
_port_to_lp_mode = {}

_port_to_eeprom_mapping = {}
_port_to_i2c_mapping = {
0: [1, 25],
1: [2, 26],
2: [3, 27],
3: [4, 28],
4: [5, 29],
5: [6, 30],
6: [7, 31],
7: [8, 32],
8: [9, 33],
9: [10, 34],
10: [11, 35],
11: [12, 36],
12: [13, 37],
13: [14, 38],
14: [15, 39],
15: [16, 40],
16: [17, 41],
17: [18, 42],
18: [19, 43],
19: [20, 44],
20: [21, 45],
21: [22, 46],
22: [23, 47],
23: [24, 48],
24: [25, 49],
25: [26, 50],
26: [27, 51],
27: [28, 52],
28: [29, 53],
29: [30, 54],
30: [31, 55],
31: [32, 56],
32: [33, 57],
33: [34, 58],
}

@property
def port_start(self):
return self.PORT_START

@property
def port_end(self):
return self.PORT_END

@property
def qsfp_ports(self):
return range(self.PORT_START, self.PORTS_IN_BLOCK + 1)

@property
def port_to_eeprom_mapping(self):
return self._port_to_eeprom_mapping

def __init__(self):
eeprom_path = self.BASE_OOM_PATH + "eeprom"

for x in range(0, self.port_end+1):
self.port_to_eeprom_mapping[x] = eeprom_path.format(
self._port_to_i2c_mapping[x][1]
)

SfpUtilBase.__init__(self)

def get_presence(self, port_num):
# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
return False
if port_num < 16 :
present_path = self.BASE_CPLD1_PATH + "module_present_" + str(port_num+1)
else:
present_path = self.BASE_CPLD2_PATH + "module_present_" + str(port_num+1)
self.__port_to_is_present = present_path

try:
val_file = open(self.__port_to_is_present)
except IOError as e:
print "Error: unable to open file: %s" % str(e)
return False

content = val_file.readline().rstrip()
val_file.close()

if content == "1":
return True

return False

def get_low_power_mode(self, port_num):
raise NotImplementedError

def set_low_power_mode(self, port_num, lpmode):
raise NotImplementedError

def reset(self, port_num):
if port_num < self.port_start or port_num > self.port_end:
return False

if port_num < 16 :
mod_rst_path = self.BASE_CPLD1_PATH + "module_reset_" + str(port_num+1)
else:
mod_rst_path = self.BASE_CPLD2_PATH + "module_reset_" + str(port_num+1)

self.__port_to_mod_rst = mod_rst_path
try:
reg_file = open(self.__port_to_mod_rst, 'r+')
except IOError as e:
print "Error: unable to open file: %s" % str(e)
return False

reg_value = '1'

reg_file.write(reg_value)
reg_file.close()

return True

def get_transceiver_change_event(self):
"""
TODO: This function need to be implemented
when decide to support monitoring SFP(Xcvrd)
on this platform.
"""
raise NotImplementedError
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Loading