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

[build]: add the support of Apt-Cacher-NG proxy configuration to the … #3257

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ef5064f
[build]: add the support of Apt-Cacher-NG proxy configuration to the …
wangshengjun Aug 1, 2019
229ef40
Fix snmpd crash (#3312)
renukamanavalan Aug 9, 2019
53f8934
[dhcp_relay] Only call 'wait_until_iface_ready' once for each interfa…
wangshengjun Aug 9, 2019
32686cc
Fix to ensure that tacacs servers are ordered (reverse) by priority i…
renukamanavalan Aug 9, 2019
4658546
[dhcp_relay] fix the compile error introduced by the fixed issue of …
wangshengjun Aug 10, 2019
67474f7
[platform]: sfputil BFN platform module (#3324)
akokhan Aug 13, 2019
12f0256
platform/nephos:fix the compile error about device accton-as7116 beca…
simonJi2018 Aug 13, 2019
1052e78
[DELL][Z9100,S6100,S6000] Platform 2.0 SFP Changes (#3229)
sridhar-ravindran Aug 13, 2019
9ad54b8
[as5835-54x] Implement get_transceiver_change_event() in sfputil.py (…
brandonchuang Aug 13, 2019
03ec08b
[mmu] add mmu_init_config to HWSKU Arista-7260CX3-Q64 (#3334)
yxieca Aug 14, 2019
e78b7af
[swss][sairedis] advance sub-modules (#3326)
akokhan Aug 14, 2019
e8ae509
[innovium]: Initial commit (#3243)
tonytitus Aug 14, 2019
f7ca312
[sonic-platform-common][sonic-platform-daemon] Update submodules (#3333)
keboliu Aug 14, 2019
46a480b
[device/celestica]: Implement Sfp APIs based on the new platform API …
Aug 15, 2019
51af28d
[baseimage]: install ndisc6 package (#3344)
lguohan Aug 15, 2019
9348a3c
[build] Fix cleaning SONIC_PYTHON_STDEB_DEBS (#3343)
gpaussabrcm Aug 15, 2019
6c64b1f
[Quanta] Add a new supported device and platform, IX9-32X (#3341)
jonathantsai-qci Aug 15, 2019
d7096e8
[control plane assistant] stop control plane assistant after warm reb…
yxieca Aug 15, 2019
635ddce
[Quanta][IX7,IX8,IX8C] Correct port index (#3327)
jonathantsai-qci Aug 15, 2019
0d84105
[device] as5712-54x, add more entries for sensors (#3328)
roylee123 Aug 15, 2019
24e65cc
[devices]: Add support fpga drv and pimutility for minipack platform …
jostar-yang Aug 15, 2019
bd3a8bf
[device][platform] Update Inventec new platform d6356 (#2791)
linalvin Aug 15, 2019
af5c544
[platform]: Added exceptions handling for BFN syseeprom and psuutil (…
vsenchyshyn Aug 15, 2019
01786b2
[device] Add pmon_daemon_control.json for accton (#3340)
brandonchuang Aug 15, 2019
448d40a
[build]: Fix INSTALL_DEBUG_TOOLS build config option (#2564)
jipanyang Aug 15, 2019
97467e3
[device/Arista] Update drivers submodules (#3339)
Staphylo Aug 15, 2019
fbf6165
[Quanta/platform] Update IX1B to support Stretch (#2358)
jonathantsai-qci Aug 15, 2019
d3ce652
[innovium]: Fix package path + add SYSTEMD_SONIC_GENERATOR (#3351)
tonytitus Aug 16, 2019
70c75c4
[radv service] radv service should be a cold only dependent of swss (…
yxieca Aug 16, 2019
e53101b
[docker-fpm-frr]: Generate separated staticd.conf for staticd (#3306)
shikenghua Aug 16, 2019
5d376a6
[Mellanox] Update SDK (v3.4.1886) and hw-magmt (v2.0.0191) (#3359)
andriymoroz-mlnx Aug 19, 2019
125b394
update cpld & swpld module attribute (#3362)
JohnsonYJLu Aug 19, 2019
f7f5d6e
[Mellanox] align platform reboot to use "hardware reboot" (#3321)
mykolaf Aug 19, 2019
52f31b3
[barefoot]: updated SDK to 9.0 pre-release (#3350)
akokhan Aug 19, 2019
3ed7cb7
[Fast-Reboot]: FR mode is active only first 3 minutes after start. (#…
pavel-shirshov Aug 19, 2019
ccbc3ec
[kernel] Upgrade kernel to version 4.9.168-1+deb9u5 (#3369)
yxieca Aug 21, 2019
ae79f67
BIOS upgrade support with API2.0 for DellEMC S6100 (#3116)
Aug 23, 2019
d63d306
[device/arista] Update drivers submodules (#3378)
Staphylo Aug 23, 2019
ba4566f
[mlnx_platform_api.thermal]align thermal sensor names with hw-managem…
stephenxs Aug 23, 2019
dedd2cc
Z9264f-LED_changes (#3376)
aravindmani-1 Aug 23, 2019
89bc93e
remove platform_wait script from mellanox simx platform (#3380)
keboliu Aug 23, 2019
aaf76b3
[doc]: use docker without sudo (#3336)
tim-rj Aug 26, 2019
8e95699
[devices]: Add serdes tuning for Arista 7060PX4 32x400G (#3382)
zzhiyuan Aug 28, 2019
98fdea9
Create the src archive in target/ when INSTALL_DEBUG_TOOLS=y (#3323)
renukamanavalan Aug 28, 2019
8f27851
[Makefile] Multiarch docker service cleanup at make reset (#3366)
antony-rheneus Aug 28, 2019
ccd51c2
create multiple Redis DB instances based on CONFIG at /etc/sonic/data…
dzhangalibaba Aug 28, 2019
ce07586
[platform/cel]: Add new API installer to pmon and base image (#3379)
Aug 28, 2019
5196f13
[syncd-rpc-brcm]: Fix syncd terminated in broadcom rpc image (#3391)
chiourung Aug 28, 2019
7b53d43
[Mellanox] optimize new platform api (#3289)
stephenxs Aug 28, 2019
b99981b
[swss]: Add hash seed 15 for SpineRouter type (#3390)
zhenggen-xu Aug 28, 2019
52ef900
[platform]: BFN platform modules update (#3389)
akokhan Aug 29, 2019
65a179e
[build_debian] docker version update for ARM arch (#3353)
antony-rheneus Aug 29, 2019
f739f1c
[device][accton]: ADD the Accton new device support, AS9716-32D (#3372)
pollyhsu2git Aug 29, 2019
2cef1ef
[docker-fpm-frr/bgpcfgd]: Update interface of bgpcfgd from swsssdk to…
Pterosaur Aug 29, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.DS_Store

# Build system related
.arch
.platform
.screen

Expand Down
35 changes: 22 additions & 13 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ DOCKER_BASE_BUILD = docker build --no-cache \
-t $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) \
--build-arg http_proxy=$(http_proxy) \
--build-arg https_proxy=$(https_proxy) \
--build-arg apt_cacher_ng_proxy=$(apt_cacher_ng_proxy) \
$(SLAVE_DIR)

DOCKER_BUILD = docker build --no-cache \
Expand All @@ -149,6 +150,7 @@ DOCKER_BUILD = docker build --no-cache \
--build-arg guid=$(shell id -g) \
--build-arg hostname=$(shell echo $$HOSTNAME) \
--build-arg slave_base_tag_ref=$(SLAVE_BASE_TAG) \
--build-arg apt_cacher_ng_proxy=$(apt_cacher_ng_proxy) \
-t $(SLAVE_IMAGE):$(SLAVE_TAG) \
-f $(SLAVE_DIR)/Dockerfile.user \
$(SLAVE_DIR)
Expand All @@ -173,6 +175,7 @@ SONIC_BUILD_INSTRUCTION := make \
KERNEL_PROCURE_METHOD=$(KERNEL_PROCURE_METHOD) \
HTTP_PROXY=$(http_proxy) \
HTTPS_PROXY=$(https_proxy) \
APT_CACHER_NG_PROXY=$(apt_cacher_ng_proxy) \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

              [](start = 0, length = 13)

The indentation is not same as above lines

SONIC_ENABLE_SYSTEM_TELEMETRY=$(ENABLE_SYSTEM_TELEMETRY) \
EXTRA_JESSIE_TARGETS=$(EXTRA_JESSIE_TARGETS) \
$(SONIC_OVERRIDE_BUILD_VARS)
Expand Down Expand Up @@ -227,18 +230,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
17 changes: 11 additions & 6 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 @@ -270,7 +275,10 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
tcptraceroute \
mtr-tiny \
locales \
cgroup-tools
cgroup-tools \
ipmitool \
ndisc6


if [[ $CONFIGURED_ARCH == amd64 ]]; then
## Pre-install the fundamental packages for amd64 (x86)
Expand Down Expand Up @@ -485,10 +493,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,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

109 changes: 99 additions & 10 deletions device/accton/x86_64-accton_as5835_54x-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
except ImportError as e:
raise ImportError("%s - required module not found" % str(e))

SFP_STATUS_INSERTED = '1'
SFP_STATUS_REMOVED = '0'

class SfpUtil(SfpUtilBase):
"""Platform-specific SfpUtil class"""
Expand Down Expand Up @@ -216,7 +218,7 @@ def get_low_power_mode(self, port_num):
try:
eeprom = None

eeprom = open(self.port_to_eeprom_mapping[port_num], "rb")
eeprom = open(self.port_to_eeprom_mapping[port_num], mode="rb", buffering=0)
eeprom.seek(93)
lpmode = ord(eeprom.read(1))

Expand Down Expand Up @@ -251,7 +253,7 @@ def set_low_power_mode(self, port_num, lpmode):
buffer[0] = chr(regval)

# Write to eeprom
eeprom = open(self.port_to_eeprom_mapping[port_num], "r+b")
eeprom = open(self.port_to_eeprom_mapping[port_num], mode="r+b", buffering=0)
eeprom.seek(93)
eeprom.write(buffer[0])
return True
Expand All @@ -273,7 +275,7 @@ def reset(self, port_num):
path = "/sys/bus/i2c/devices/{0}/module_reset_{1}"
port_ps = path.format(cpld_ps, cage_num)
try:
reg_file = open(port_ps, 'w')
reg_file = open(port_ps, mode='w', buffering=0)
except IOError as e:
print "Error: unable to open file: %s" % str(e)
return False
Expand All @@ -288,10 +290,97 @@ def reset(self, port_num):

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
@property
def _get_presence_bitmap(self):
nodes = []
nodes.append("/sys/bus/i2c/devices/3-0061/module_present_all")
nodes.append("/sys/bus/i2c/devices/3-0062/module_present_all")

bitmap = ""
for node in nodes:
try:
reg_file = open(node)

except IOError as e:
print "Error: unable to open file: %s" % str(e)
return False
bitmap += reg_file.readline().rstrip() + " "
reg_file.close()

rev = bitmap.split(" ")
rev.pop() # Remove the last useless character

# Convert bitmap into continuously port order
rev[4] = hex((int(rev[4],16) | ((int(rev[5],16) & 0x3) << 6)))[2:] # Port 33-40
rev[5] = hex((int(rev[5],16) >> 2) | ((int(rev[6],16) & 0x3) << 6))[2:] # Port 41-48

# Expand port 49-54
tmp = rev.pop()
for i in range (2, 8):
val = (int(tmp,16) >> i) & 0x1
rev.append(hex(val)[2:])

for i in range (0,6):
rev[i] = rev[i].zfill(2)

rev = "".join(rev[::-1])
return int(rev,16)

data = {'valid':0, 'present':0}
def get_transceiver_change_event(self, timeout=0):

start_time = time.time()
port_dict = {}
port = 0
blocking = False

if timeout == 0:
blocking = True
elif timeout > 0:
timeout = timeout / float(1000) # Convert to secs
else:
print "get_transceiver_change_event:Invalid timeout value", timeout
return False, {}

end_time = start_time + timeout
if start_time > end_time:
print 'get_transceiver_change_event:' \
'time wrap / invalid timeout value', timeout

return False, {} # Time wrap or possibly incorrect timeout

while timeout >= 0:
# Check for OIR events and return updated port_dict

reg_value = self._get_presence_bitmap
changed_ports = self.data['present'] ^ reg_value
if changed_ports:
for port in range (self.port_start, self.port_end+1):
# Mask off the bit corresponding to our port
mask = (1 << (port - 1))
if changed_ports & mask:

if (reg_value & mask) == 0:
port_dict[port] = SFP_STATUS_REMOVED
else:
port_dict[port] = SFP_STATUS_INSERTED

# Update cache
self.data['present'] = reg_value
self.data['valid'] = 1
return True, port_dict

if blocking:
time.sleep(1)
else:
timeout = end_time - time.time()
if timeout >= 1:
time.sleep(1) # We poll at 1 second granularity
else:
if timeout > 0:
time.sleep(timeout)
return True, {}
print "get_transceiver_change_event: Should not reach here."
return False, {}


Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_ledd": true
}

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"
Loading