Skip to content

Commit 49855cc

Browse files
Merge branch 'master' of https://github.com/Azure/sonic-buildimage into fix_rates
Conflicts: dockers/docker-orchagent/enable_counters.py
2 parents 5889d86 + e6ec5d0 commit 49855cc

File tree

957 files changed

+65304
-7709
lines changed

Some content is hidden

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

957 files changed

+65304
-7709
lines changed

Makefile.cache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ define SHOW_WHY
325325
@echo "[ FLAGS FILE ] : [$($(1)_FILE_FLAGS)] " >> $($(1)_DST_PATH)/$(1).log
326326
@echo "[ FLAGS DEPENDS ] : [$($(1)_DEP_FLAGS_ALL)] " >> $($(1)_DST_PATH)/$(1).log
327327
@echo "[ FLAGS DIFF ] : [$($(1)_FLAGS_DIFF)] " >> $($(1)_DST_PATH)/$(1).log
328-
@echo "[ DEP DEPENDS ] : [$($(1)_DEP_FILES_MODIFIED)] " >> $($(1)_DST_PATH)/$(1).log
329-
@echo "[ SMDEP DEPENDS ] : [$($(1)_SMDEP_FILES_MODIFIED)] " >> $($(1)_DST_PATH)/$(1).log
330-
@echo "[ TARGET DEPENDS ] : [$?] " >> $($(1)_DST_PATH)/$(1).log
328+
@$(file >>$($(1)_DST_PATH)/$(1).log, "[ DEP DEPENDS ] : [$($(1)_DEP_FILES_MODIFIED)] ")
329+
@$(file >>$($(1)_DST_PATH)/$(1).log, "[ SMDEP DEPENDS ] : [$($(1)_SMDEP_FILES_MODIFIED)] ")
330+
@$(file >>$($(1)_DST_PATH)/$(1).log, "[ TARGET DEPENDS ] : [$?] ")
331331
endef
332332

333333

Makefile.work

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ SONIC_BUILD_INSTRUCTION := make \
190190
PLATFORM_ARCH=$(PLATFORM_ARCH) \
191191
BUILD_NUMBER=$(BUILD_NUMBER) \
192192
BUILD_TIMESTAMP=$(BUILD_TIMESTAMP) \
193+
SONIC_IMAGE_VERSION=$(SONIC_IMAGE_VERSION) \
193194
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \
194195
ENABLE_ZTP=$(ENABLE_ZTP) \
195196
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \
@@ -300,6 +301,7 @@ reset :
300301
git reset --hard;
301302
git submodule foreach --recursive 'git clean -xfdf || true';
302303
git submodule foreach --recursive 'git reset --hard || true';
304+
git submodule foreach --recursive 'git remote update || true';
303305
git submodule update --init --recursive;
304306
echo "Reset complete!";
305307
else

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
[![P4](https://sonic-jenkins.westus2.cloudapp.azure.com/job/p4/job/buildimage-p4-all/badge/icon?subject=P4)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/p4/job/buildimage-p4-all)
1515
[![VS](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all/badge/icon?subject=VS)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all)
1616

17+
*202006 builds*:
18+
19+
[![Barefoot](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-202006/badge/icon?subject=Barefoot)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-202006/)
20+
1721
*201911 builds*:
1822

1923
[![Barefoot](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-201911/badge/icon?subject=Barefoot)](https://sonic-jenkins.westus2.cloudapp.azure.com/job/barefoot/job/buildimage-bf-201911/)

build_debian.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
315315
python-pip \
316316
python3-pip \
317317
cron \
318-
haveged
319-
318+
haveged \
319+
jq
320320

321321
if [[ $CONFIGURED_ARCH == amd64 ]]; then
322322
## Pre-install the fundamental packages for amd64 (x86)
@@ -396,7 +396,7 @@ sudo mkdir -p $FILESYSTEM_ROOT/var/core
396396

397397
# Config sysctl
398398
sudo augtool --autosave "
399-
set /files/etc/sysctl.conf/kernel.core_pattern '|/usr/bin/coredump-compress %e %t %p %P'
399+
set /files/etc/sysctl.conf/kernel.core_pattern '|/usr/local/bin/coredump-compress %e %t %p %P'
400400
set /files/etc/sysctl.conf/kernel.softlockup_panic 1
401401
set /files/etc/sysctl.conf/kernel.panic 10
402402
set /files/etc/sysctl.conf/vm.panic_on_oom 2
@@ -413,13 +413,15 @@ done < files/image_config/sysctl/sysctl-net.conf
413413

414414
sudo augtool --autosave "$sysctl_net_cmd_string" -r $FILESYSTEM_ROOT
415415

416-
## docker Python API package is needed by Ansible docker module
417-
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install 'docker==4.1.0'
416+
# docker Python API package is needed by Ansible docker module as well as some SONiC applications
417+
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip2 install 'docker==4.1.0'
418+
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'docker==4.3.1'
419+
418420
## Note: keep pip installed for maintainance purpose
419421

420422
## Get gcc and python dev pkgs
421423
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install gcc libpython2.7-dev
422-
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install 'netifaces==0.10.7'
424+
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip2 install 'netifaces==0.10.7'
423425

424426
## Create /var/run/redis folder for docker-database to mount
425427
sudo mkdir -p $FILESYSTEM_ROOT/var/run/redis
@@ -449,7 +451,7 @@ fi
449451
## Version file
450452
sudo mkdir -p $FILESYSTEM_ROOT/etc/sonic
451453
sudo tee $FILESYSTEM_ROOT/etc/sonic/sonic_version.yml > /dev/null <<EOF
452-
build_version: '$(sonic_get_version)'
454+
build_version: '${SONIC_IMAGE_VERSION}'
453455
debian_version: '$(cat $FILESYSTEM_ROOT/etc/debian_version)'
454456
kernel_version: '$kversion'
455457
asic_type: $sonic_asic_platform
@@ -463,7 +465,8 @@ EOF
463465
sudo cp ./files/scripts/core_cleanup.py $FILESYSTEM_ROOT/usr/bin/core_cleanup.py
464466

465467
## Copy ASIC config checksum
466-
python files/build_scripts/generate_asic_config_checksum.py
468+
sudo chmod 755 files/build_scripts/generate_asic_config_checksum.py
469+
./files/build_scripts/generate_asic_config_checksum.py
467470
if [[ ! -f './asic_config_checksum' ]]; then
468471
echo 'asic_config_checksum not found'
469472
exit 1

build_image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fi
2323
exit 1
2424
}
2525

26-
IMAGE_VERSION=$(. functions.sh && sonic_get_version)
26+
IMAGE_VERSION="${SONIC_IMAGE_VERSION}"
2727

2828
generate_onie_installer_image()
2929
{
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td2-as5712-72x10G.config.bcm
2+
SAI_NUM_ECMP_MEMBERS=64
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td2-as5812t-72x10G.config.bcm
2+
SAI_NUM_ECMP_MEMBERS=64

device/accton/x86_64-accton_as5812_54t-r0/plugins/sfputil.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
try:
66
import time
77
import os
8-
import pickle
98
from ctypes import create_string_buffer
109
from sonic_sfp.sfputilbase import SfpUtilBase
1110
except ImportError as e:
@@ -83,16 +82,13 @@ def __init__(self):
8382

8483
#Two i2c buses might get flipped order, check them both.
8584
def update_i2c_order(self):
86-
if os.path.exists("/tmp/accton_util.p"):
87-
self.I2C_BUS_ORDER = pickle.load(open("/tmp/accton_util.p", "rb"))
88-
else:
89-
if self.I2C_BUS_ORDER < 0:
90-
eeprom_path = "/sys/bus/i2c/devices/1-0057/eeprom"
91-
if os.path.exists(eeprom_path):
92-
self.I2C_BUS_ORDER = 0
93-
eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom"
94-
if os.path.exists(eeprom_path):
95-
self.I2C_BUS_ORDER = 1
85+
if self.I2C_BUS_ORDER < 0:
86+
eeprom_path = "/sys/bus/i2c/devices/1-0057/eeprom"
87+
if os.path.exists(eeprom_path):
88+
self.I2C_BUS_ORDER = 0
89+
eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom"
90+
if os.path.exists(eeprom_path):
91+
self.I2C_BUS_ORDER = 1
9692
return self.I2C_BUS_ORDER
9793

9894
def get_presence(self, port_num):
@@ -285,4 +281,3 @@ def get_transceiver_change_event(self, timeout=2000):
285281
else:
286282
return True, {}
287283
return False, {}
288-
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td2-as5812-72x10G.config.bcm
2+
SAI_NUM_ECMP_MEMBERS=64

device/accton/x86_64-accton_as5812_54x-r0/plugins/sfputil.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
try:
66
import time
77
import os
8-
import pickle
98
from ctypes import create_string_buffer
109
from sonic_sfp.sfputilbase import SfpUtilBase
1110
except ImportError as e:
@@ -132,16 +131,13 @@ def __init__(self):
132131

133132
#Two i2c buses might get flipped order, check them both.
134133
def update_i2c_order(self):
135-
if os.path.exists("/tmp/accton_util.p"):
136-
self.I2C_BUS_ORDER = pickle.load(open("/tmp/accton_util.p", "rb"))
137-
else:
138-
if self.I2C_BUS_ORDER < 0:
139-
eeprom_path = "/sys/bus/i2c/devices/1-0057/eeprom"
140-
if os.path.exists(eeprom_path):
141-
self.I2C_BUS_ORDER = 0
142-
eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom"
143-
if os.path.exists(eeprom_path):
144-
self.I2C_BUS_ORDER = 1
134+
if self.I2C_BUS_ORDER < 0:
135+
eeprom_path = "/sys/bus/i2c/devices/1-0057/eeprom"
136+
if os.path.exists(eeprom_path):
137+
self.I2C_BUS_ORDER = 0
138+
eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom"
139+
if os.path.exists(eeprom_path):
140+
self.I2C_BUS_ORDER = 1
145141
return self.I2C_BUS_ORDER
146142

147143
def get_presence(self, port_num):

0 commit comments

Comments
 (0)