Skip to content

Commit dabbe32

Browse files
authored
Merge branch 'Azure:master' into config
2 parents 87c169d + f21a45b commit dabbe32

File tree

788 files changed

+48183
-15239
lines changed

Some content is hidden

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

788 files changed

+48183
-15239
lines changed

.azure-pipelines/azure-pipelines-UpgrateVersion.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ schedules:
1111
displayName: Daily Build
1212
branches:
1313
include:
14-
- 202012
14+
- 20*
15+
exclude:
16+
- 200*
17+
- 201*
18+
- 202006
1519
always: true
1620

1721
pool: sonicbld

.azure-pipelines/azure-pipelines-image-template.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
[ -n "$SYSTEM_PULLREQUEST_PULLREQUESTID" ] && BRANCH_NAME="$SYSTEM_PULLREQUEST_TARGETBRANCH-$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER"
4444
git checkout -b $BRANCH_NAME
4545
sudo modprobe overlay
46+
pip3 install MarkupSafe==2.0.1 --force-reinstall
4647
sudo apt-get install -y acl
4748
sudo bash -c "echo 1 > /proc/sys/vm/compact_memory"
4849
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM_AZP) PLATFORM_ARCH=$(PLATFORM_ARCH) $(BUILD_OPTIONS) configure
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
variables:
2+
${{ if and(ge(variables['Build.SourceBranchName'], '202012'), le(variables['Build.SourceBranchName'], '299999')) }}:
3+
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker'
4+
${{ if or(lt(variables['Build.SourceBranchName'], '202012'), gt(variables['Build.SourceBranchName'], '299999')) }}:
5+
VERSION_CONTROL_OPTIONS: ''

.azure-pipelines/official-build-cache.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ stages:
1818
- stage: Build
1919
pool: sonicbld
2020
variables:
21-
CACHE_MODE: cache
21+
- name: CACHE_MODE
22+
value: cache
23+
- template: azure-pipelines-repd-build-variables.yml
2224
jobs:
2325
- template: azure-pipelines-build.yml
2426
parameters:

.azure-pipelines/official-build-multi-asic.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ stages:
1818
- stage: Build
1919
pool: sonicbld
2020
variables:
21-
CACHE_MODE: wcache
22-
${{ if eq(variables['Build.SourceBranchName'], '202012') }}:
23-
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web'
21+
- template: azure-pipelines-repd-build-variables.yml
22+
- name: CACHE_MODE
23+
value: wcache
2424
jobs:
2525
- template: azure-pipelines-build.yml
2626
parameters:

.azure-pipelines/official-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ stages:
2525
- stage: Build
2626
pool: sonicbld
2727
variables:
28-
CACHE_MODE: wcache
29-
${{ if eq(variables['Build.SourceBranchName'], '202012') }}:
30-
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web'
28+
- name: CACHE_MODE
29+
value: wcache
30+
- template: azure-pipelines-repd-build-variables.yml
3131
jobs:
3232
- template: azure-pipelines-build.yml
3333
parameters:

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# a pull request.
1111
* @lguohan
1212

13-
/device/ @jleveque
13+
/device/ @sujinmkang @prgeor @vdahiya12
1414

1515
# build
1616
/rules/ @qiluo-msft @xumia @lguohan

.github/pull_request_template.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,20 @@
3030
- [ ] 202006
3131
- [ ] 202012
3232
- [ ] 202106
33+
- [ ] 202111
3334

3435
#### Description for the changelog
3536
<!--
3637
Write a short (one line) summary that describes the changes in this
3738
pull request for inclusion in the changelog:
3839
-->
3940

41+
#### Link to config_db schema for YANG module changes
42+
<!--
43+
Provide a link to config_db schema for the table for which YANG model
44+
is defined
45+
Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration.
46+
-->
4047

4148
#### A picture of a cute animal (not mandatory but encouraged)
4249

.github/workflows/label.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ on:
1313
- reopened
1414
branches:
1515
- '202012'
16+
- '202[1-9][0-9][0-9]'
17+
- '20[3-9][0-9][0-9][0-9]'
1618
paths:
1719
- 'files/build/versions/**'
1820

.gitmodules

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,7 @@
9999
url = https://github.com/Azure/sonic-linkmgrd.git
100100
[submodule "src/sonic-p4rt/sonic-pins"]
101101
path = src/sonic-p4rt/sonic-pins
102-
url = https://github.com/Azure/sonic-pins.git
102+
url = https://github.com/Azure/sonic-pins.git
103+
[submodule "src/thrift_0_14_1/thrift"]
104+
path = src/thrift_0_14_1/thrift
105+
url = https://github.com/apache/thrift.git

Makefile.cache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
# Run the 'touch cache.skip.common' command in the base directory to exclude the common files from caching
6969
SONIC_COMMON_FILES_LIST := $(if $(wildcard cache.skip.common),, .platform slave.mk rules/functions Makefile.cache)
7070
SONIC_COMMON_FLAGS_LIST := $(CONFIGURED_PLATFORM) \
71+
$(CONFIGURED_ARCH) \
7172
$(BLDENV) \
7273
$(SONIC_DEBUGGING_ON) \
7374
$(SONIC_PROFILING_ON) $(SONIC_ENABLE_SYNCD_RPC)

Makefile.work

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,10 @@ ifneq ($(SONIC_DPKG_CACHE_SOURCE),)
185185
endif
186186

187187
ifeq ($(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD), y)
188+
ifneq ($(MULTIARCH_QEMU_ENVIRON), y)
188189
DOCKER_RUN += -v /var/run/docker.sock:/var/run/docker.sock
189190
endif
191+
endif
190192

191193
ifeq ($(MULTIARCH_QEMU_ENVIRON), y)
192194
ifeq ($(DOCKER_DATA_ROOT_FOR_MULTIARCH),)
@@ -211,7 +213,7 @@ endif
211213
#Override Native config to prevent docker service
212214
SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD=y
213215

214-
DOCKER_MULTIARCH_CHECK := docker inspect --type image multiarch/qemu-user-static:register &> /dev/null || (echo "multiarch docker not found ..."; docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes)
216+
DOCKER_MULTIARCH_CHECK := docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes
215217

216218
DOCKER_SERVICE_SAFE_KILLER := (MARCH_PID=`ps -eo pid,cmd | grep "[0-9] dockerd.*march" | awk '{print $$1}'`; echo "Killing march docker $$MARCH_PID"; [ -z "$$MARCH_PID" ] || sudo kill -9 "$$MARCH_PID";)
217219
DOCKER_SERVICE_MULTIARCH_CHECK := ($(DOCKER_SERVICE_SAFE_KILLER); sudo rm -fr /var/run/march/; (echo "Starting docker march service..."; sudo $(SONIC_NATIVE_DOCKERD_FOR_MUTLIARCH) &) &>/dev/null ; sleep 2; sudo $(SONIC_USERFACL_DOCKERD_FOR_MUTLIARCH);)
@@ -268,6 +270,7 @@ SONIC_BUILD_INSTRUCTION := make \
268270
SONIC_ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \
269271
SONIC_ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \
270272
SONIC_INSTALL_DEBUG_TOOLS=$(INSTALL_DEBUG_TOOLS) \
273+
SONIC_SAITHRIFT_V2=$(SAITHRIFT_V2) \
271274
MDEBUG=$(MDEBUG) \
272275
PASSWORD=$(PASSWORD) \
273276
USERNAME=$(USERNAME) \
@@ -292,6 +295,7 @@ SONIC_BUILD_INSTRUCTION := make \
292295
SLAVE_DIR=$(SLAVE_DIR) \
293296
ENABLE_AUTO_TECH_SUPPORT=$(ENABLE_AUTO_TECH_SUPPORT) \
294297
BUILD_MULTIASIC_KVM=$(BUILD_MULTIASIC_KVM) \
298+
ENABLE_ASAN=$(ENABLE_ASAN) \
295299
$(SONIC_OVERRIDE_BUILD_VARS)
296300

297301
.PHONY: sonic-slave-build sonic-slave-bash init reset
@@ -336,6 +340,9 @@ sonic-build-hooks:
336340
@cp src/sonic-build-hooks/buildinfo/sonic-build-hooks* $(SLAVE_DIR)/buildinfo
337341

338342
sonic-slave-base-build : sonic-build-hooks
343+
ifeq ($(MULTIARCH_QEMU_ENVIRON), y)
344+
@$(DOCKER_MULTIARCH_CHECK)
345+
endif
339346
@$(OVERLAY_MODULE_CHECK)
340347
@echo Checking sonic-slave-base image: $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG)
341348
@docker inspect --type image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) &> /dev/null || \

azure-pipelines.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ stages:
3535
- stage: Build
3636
pool: sonicbld
3737
variables:
38-
CACHE_MODE: rcache
39-
${{ if eq(variables['Build.SourceBranchName'], '202012') }}:
40-
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker'
38+
- template: .azure-pipelines/azure-pipelines-repd-build-variables.yml
39+
- name: CACHE_MODE
40+
value: rcache
4141
jobs:
4242
- template: .azure-pipelines/azure-pipelines-build.yml
4343
parameters:

build_debian.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,17 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
320320
python-is-python3 \
321321
cron \
322322
libprotobuf23 \
323-
libgrpc++ \
323+
libgrpc++1 \
324+
libgrpc10 \
324325
haveged \
325326
fdisk \
326327
gpg \
327328
jq \
328329
auditd
329330

331+
# Change auditd log file path to fix auditd can't startup issue.
332+
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "sudo sed -i 's/^\s*log_file\s*=.*/log_file = \/var\/log\/audit.log/g' /etc/audit/auditd.conf"
333+
330334
if [[ $CONFIGURED_ARCH == amd64 ]]; then
331335
## Pre-install the fundamental packages for amd64 (x86)
332336
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \
@@ -582,7 +586,7 @@ sudo rm -f $ONIE_INSTALLER_PAYLOAD $FILESYSTEM_SQUASHFS
582586
sudo du -hsx $FILESYSTEM_ROOT
583587
sudo mkdir -p $FILESYSTEM_ROOT/var/lib/docker
584588
scripts/collect_host_image_version_files.sh $TARGET_PATH $FILESYSTEM_ROOT
585-
sudo mksquashfs $FILESYSTEM_ROOT $FILESYSTEM_SQUASHFS -e boot -e var/lib/docker -e $PLATFORM_DIR
589+
sudo mksquashfs $FILESYSTEM_ROOT $FILESYSTEM_SQUASHFS -comp zstd -b 1M -e boot -e var/lib/docker -e $PLATFORM_DIR
586590

587591
# Ensure admin gid is 1000
588592
gid_user=$(sudo LANG=C chroot $FILESYSTEM_ROOT id -g $USERNAME) || gid_user="none"

build_image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ generate_device_list()
9797

9898
for d in `find -L ./device -maxdepth 2 -mindepth 2 -type d`; do
9999
if [ -f $d/platform_asic ]; then
100-
if [ "$CONFIGURED_PLATFORM" = "generic" ] || grep -Fxq "$CONFIGURED_PLATFORM" $d/platform_asic; then
100+
if [ "$TARGET_MACHINE" = "generic" ] || grep -Fxq "$TARGET_MACHINE" $d/platform_asic; then
101101
echo "${d##*/}" >> "$platforms_asic";
102102
fi;
103103
fi;
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"XCVR":
3+
{
4+
"xcvr_present":
5+
{
6+
"i2c":
7+
{
8+
"valmap-SFP28": {"1":true, "0":false },
9+
"valmap-QSFP28": {"1":true, "0":false}
10+
}
11+
}
12+
},
13+
14+
"PSU":
15+
{
16+
"psu_present":
17+
{
18+
"i2c":
19+
{
20+
"valmap": { "1":true, "0":false }
21+
}
22+
},
23+
24+
"psu_power_good":
25+
{
26+
"i2c":
27+
{
28+
"valmap": { "1": true, "0":false }
29+
}
30+
},
31+
32+
"psu_fan_dir":
33+
{
34+
"i2c":
35+
{
36+
"valmap": { "F2B":"EXHAUST", "B2F":"INTAKE" }
37+
}
38+
},
39+
40+
"PSU_FAN_MAX_SPEED":"18000"
41+
},
42+
43+
"FAN":
44+
{
45+
"direction":
46+
{
47+
"i2c":
48+
{
49+
"valmap": {"1":"EXHAUST", "0":"INTAKE"}
50+
}
51+
},
52+
53+
"present":
54+
{
55+
"i2c":
56+
{
57+
"valmap": {"1":true, "0":false}
58+
}
59+
},
60+
61+
"duty_cycle_to_pwm": "lambda dc: ((dc*100.0)/625)",
62+
63+
"pwm_to_duty_cycle": "lambda pwm: ((pwm*625.0)/100)"
64+
}
65+
66+
}

0 commit comments

Comments
 (0)