Skip to content

Commit

Permalink
Merge branch 'Azure:master' into config
Browse files Browse the repository at this point in the history
  • Loading branch information
iris00522 authored Feb 22, 2022
2 parents 87c169d + f21a45b commit dabbe32
Show file tree
Hide file tree
Showing 788 changed files with 48,183 additions and 15,239 deletions.
6 changes: 5 additions & 1 deletion .azure-pipelines/azure-pipelines-UpgrateVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ schedules:
displayName: Daily Build
branches:
include:
- 202012
- 20*
exclude:
- 200*
- 201*
- 202006
always: true

pool: sonicbld
Expand Down
1 change: 1 addition & 0 deletions .azure-pipelines/azure-pipelines-image-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
[ -n "$SYSTEM_PULLREQUEST_PULLREQUESTID" ] && BRANCH_NAME="$SYSTEM_PULLREQUEST_TARGETBRANCH-$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER"
git checkout -b $BRANCH_NAME
sudo modprobe overlay
pip3 install MarkupSafe==2.0.1 --force-reinstall
sudo apt-get install -y acl
sudo bash -c "echo 1 > /proc/sys/vm/compact_memory"
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM_AZP) PLATFORM_ARCH=$(PLATFORM_ARCH) $(BUILD_OPTIONS) configure
Expand Down
5 changes: 5 additions & 0 deletions .azure-pipelines/azure-pipelines-repd-build-variables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
variables:
${{ if and(ge(variables['Build.SourceBranchName'], '202012'), le(variables['Build.SourceBranchName'], '299999')) }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker'
${{ if or(lt(variables['Build.SourceBranchName'], '202012'), gt(variables['Build.SourceBranchName'], '299999')) }}:
VERSION_CONTROL_OPTIONS: ''
4 changes: 3 additions & 1 deletion .azure-pipelines/official-build-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ stages:
- stage: Build
pool: sonicbld
variables:
CACHE_MODE: cache
- name: CACHE_MODE
value: cache
- template: azure-pipelines-repd-build-variables.yml
jobs:
- template: azure-pipelines-build.yml
parameters:
Expand Down
6 changes: 3 additions & 3 deletions .azure-pipelines/official-build-multi-asic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ stages:
- stage: Build
pool: sonicbld
variables:
CACHE_MODE: wcache
${{ if eq(variables['Build.SourceBranchName'], '202012') }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web'
- template: azure-pipelines-repd-build-variables.yml
- name: CACHE_MODE
value: wcache
jobs:
- template: azure-pipelines-build.yml
parameters:
Expand Down
6 changes: 3 additions & 3 deletions .azure-pipelines/official-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ stages:
- stage: Build
pool: sonicbld
variables:
CACHE_MODE: wcache
${{ if eq(variables['Build.SourceBranchName'], '202012') }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web'
- name: CACHE_MODE
value: wcache
- template: azure-pipelines-repd-build-variables.yml
jobs:
- template: azure-pipelines-build.yml
parameters:
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# a pull request.
* @lguohan

/device/ @jleveque
/device/ @sujinmkang @prgeor @vdahiya12

# build
/rules/ @qiluo-msft @xumia @lguohan
Expand Down
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,20 @@
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111

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

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

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

2 changes: 2 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ on:
- reopened
branches:
- '202012'
- '202[1-9][0-9][0-9]'
- '20[3-9][0-9][0-9][0-9]'
paths:
- 'files/build/versions/**'

Expand Down
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,7 @@
url = https://github.com/Azure/sonic-linkmgrd.git
[submodule "src/sonic-p4rt/sonic-pins"]
path = src/sonic-p4rt/sonic-pins
url = https://github.com/Azure/sonic-pins.git
url = https://github.com/Azure/sonic-pins.git
[submodule "src/thrift_0_14_1/thrift"]
path = src/thrift_0_14_1/thrift
url = https://github.com/apache/thrift.git
1 change: 1 addition & 0 deletions Makefile.cache
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
# Run the 'touch cache.skip.common' command in the base directory to exclude the common files from caching
SONIC_COMMON_FILES_LIST := $(if $(wildcard cache.skip.common),, .platform slave.mk rules/functions Makefile.cache)
SONIC_COMMON_FLAGS_LIST := $(CONFIGURED_PLATFORM) \
$(CONFIGURED_ARCH) \
$(BLDENV) \
$(SONIC_DEBUGGING_ON) \
$(SONIC_PROFILING_ON) $(SONIC_ENABLE_SYNCD_RPC)
Expand Down
9 changes: 8 additions & 1 deletion Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,10 @@ ifneq ($(SONIC_DPKG_CACHE_SOURCE),)
endif

ifeq ($(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD), y)
ifneq ($(MULTIARCH_QEMU_ENVIRON), y)
DOCKER_RUN += -v /var/run/docker.sock:/var/run/docker.sock
endif
endif

ifeq ($(MULTIARCH_QEMU_ENVIRON), y)
ifeq ($(DOCKER_DATA_ROOT_FOR_MULTIARCH),)
Expand All @@ -211,7 +213,7 @@ endif
#Override Native config to prevent docker service
SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD=y

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)
DOCKER_MULTIARCH_CHECK := docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes

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";)
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);)
Expand Down Expand Up @@ -268,6 +270,7 @@ SONIC_BUILD_INSTRUCTION := make \
SONIC_ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \
SONIC_ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \
SONIC_INSTALL_DEBUG_TOOLS=$(INSTALL_DEBUG_TOOLS) \
SONIC_SAITHRIFT_V2=$(SAITHRIFT_V2) \
MDEBUG=$(MDEBUG) \
PASSWORD=$(PASSWORD) \
USERNAME=$(USERNAME) \
Expand All @@ -292,6 +295,7 @@ SONIC_BUILD_INSTRUCTION := make \
SLAVE_DIR=$(SLAVE_DIR) \
ENABLE_AUTO_TECH_SUPPORT=$(ENABLE_AUTO_TECH_SUPPORT) \
BUILD_MULTIASIC_KVM=$(BUILD_MULTIASIC_KVM) \
ENABLE_ASAN=$(ENABLE_ASAN) \
$(SONIC_OVERRIDE_BUILD_VARS)

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

sonic-slave-base-build : sonic-build-hooks
ifeq ($(MULTIARCH_QEMU_ENVIRON), y)
@$(DOCKER_MULTIARCH_CHECK)
endif
@$(OVERLAY_MODULE_CHECK)
@echo Checking sonic-slave-base image: $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG)
@docker inspect --type image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) &> /dev/null || \
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ stages:
- stage: Build
pool: sonicbld
variables:
CACHE_MODE: rcache
${{ if eq(variables['Build.SourceBranchName'], '202012') }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker'
- template: .azure-pipelines/azure-pipelines-repd-build-variables.yml
- name: CACHE_MODE
value: rcache
jobs:
- template: .azure-pipelines/azure-pipelines-build.yml
parameters:
Expand Down
8 changes: 6 additions & 2 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,17 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
python-is-python3 \
cron \
libprotobuf23 \
libgrpc++ \
libgrpc++1 \
libgrpc10 \
haveged \
fdisk \
gpg \
jq \
auditd

# Change auditd log file path to fix auditd can't startup issue.
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"

if [[ $CONFIGURED_ARCH == amd64 ]]; then
## Pre-install the fundamental packages for amd64 (x86)
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \
Expand Down Expand Up @@ -582,7 +586,7 @@ sudo rm -f $ONIE_INSTALLER_PAYLOAD $FILESYSTEM_SQUASHFS
sudo du -hsx $FILESYSTEM_ROOT
sudo mkdir -p $FILESYSTEM_ROOT/var/lib/docker
scripts/collect_host_image_version_files.sh $TARGET_PATH $FILESYSTEM_ROOT
sudo mksquashfs $FILESYSTEM_ROOT $FILESYSTEM_SQUASHFS -e boot -e var/lib/docker -e $PLATFORM_DIR
sudo mksquashfs $FILESYSTEM_ROOT $FILESYSTEM_SQUASHFS -comp zstd -b 1M -e boot -e var/lib/docker -e $PLATFORM_DIR

# Ensure admin gid is 1000
gid_user=$(sudo LANG=C chroot $FILESYSTEM_ROOT id -g $USERNAME) || gid_user="none"
Expand Down
2 changes: 1 addition & 1 deletion build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ generate_device_list()

for d in `find -L ./device -maxdepth 2 -mindepth 2 -type d`; do
if [ -f $d/platform_asic ]; then
if [ "$CONFIGURED_PLATFORM" = "generic" ] || grep -Fxq "$CONFIGURED_PLATFORM" $d/platform_asic; then
if [ "$TARGET_MACHINE" = "generic" ] || grep -Fxq "$TARGET_MACHINE" $d/platform_asic; then
echo "${d##*/}" >> "$platforms_asic";
fi;
fi;
Expand Down
66 changes: 66 additions & 0 deletions device/accton/x86_64-accton_as4630_54pe-r0/pddf/pd-plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"XCVR":
{
"xcvr_present":
{
"i2c":
{
"valmap-SFP28": {"1":true, "0":false },
"valmap-QSFP28": {"1":true, "0":false}
}
}
},

"PSU":
{
"psu_present":
{
"i2c":
{
"valmap": { "1":true, "0":false }
}
},

"psu_power_good":
{
"i2c":
{
"valmap": { "1": true, "0":false }
}
},

"psu_fan_dir":
{
"i2c":
{
"valmap": { "F2B":"EXHAUST", "B2F":"INTAKE" }
}
},

"PSU_FAN_MAX_SPEED":"18000"
},

"FAN":
{
"direction":
{
"i2c":
{
"valmap": {"1":"EXHAUST", "0":"INTAKE"}
}
},

"present":
{
"i2c":
{
"valmap": {"1":true, "0":false}
}
},

"duty_cycle_to_pwm": "lambda dc: ((dc*100.0)/625)",

"pwm_to_duty_cycle": "lambda pwm: ((pwm*625.0)/100)"
}

}
Loading

0 comments on commit dabbe32

Please sign in to comment.