Skip to content

Commit 3080382

Browse files
committed
Merge branch 'master' into hostcfgd_fix
2 parents 57189d6 + b9dd1df commit 3080382

File tree

161 files changed

+20456
-994
lines changed

Some content is hidden

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

161 files changed

+20456
-994
lines changed

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

+17-6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ schedules:
1818
- 202006
1919
always: true
2020

21+
resources:
22+
repositories:
23+
- repository: buildimage
24+
type: github
25+
name: Azure/sonic-buildimage
26+
ref: master
27+
endpoint: build
28+
2129
pool: sonicbld
2230

2331
parameters:
@@ -37,15 +45,18 @@ parameters:
3745
stages:
3846
- stage: Build
3947
variables:
40-
CACHE_MODE: none
41-
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS='
48+
- name: CACHE_MODE
49+
value: none
50+
- name: VERSION_CONTROL_OPTIONS
51+
value: 'SONIC_VERSION_CONTROL_COMPONENTS='
52+
- template: .azure-pipelines/template-variables.yml@buildimage
4253
jobs:
4354
- template: azure-pipelines-build.yml
4455
parameters:
4556
jobFilters: ${{ parameters.jobFilters }}
46-
buildOptions: '${{ variables.VERSION_CONTROL_OPTIONS }} SONIC_BUILD_JOBS=$(nproc) ENABLE_IMAGE_SIGNATURE=y'
57+
buildOptions: '${{ variables.VERSION_CONTROL_OPTIONS }} ENABLE_DOCKER_BASE_PULL=n SONIC_BUILD_JOBS=$(nproc) ENABLE_IMAGE_SIGNATURE=y'
4758
preSteps:
48-
- template: template-clean-sonic-slave.yml
59+
- template: .azure-pipelines/template-clean-sonic-slave.yml@buildimage
4960
- stage: UpgradeVersions
5061
jobs:
5162
- job: UpgradeVersions
@@ -69,14 +80,14 @@ stages:
6980
default_platform=broadcom
7081
artifacts=$(find $(Pipeline.Workspace) -maxdepth 1 -type d -name 'sonic-buildimage.*' | grep -v "sonic-buildimage.${default_platform}")
7182
echo "artifacts$artifacts"
72-
cp -r $(Pipeline.Workspace)/sonic-buildimage.${default_platform}/versions target/
83+
cp -r $(Pipeline.Workspace)/sonic-buildimage.${default_platform}/target/versions target/
7384
make freeze FREEZE_VERSION_OPTIONS=-r
7485
find files/build/versions
7586
ordered_artifacts=$(echo "$artifacts" | grep -v -E "arm64|armhf" && echo "$artifacts" | grep -E "arm64|armhf")
7687
for artifact in $ordered_artifacts
7788
do
7889
rm -rf target/versions
79-
cp -r $artifact/versions target/
90+
cp -r $artifact/target/versions target/
8091
OPTIONS="-a -d"
8192
[[ "$artifact" == *arm64* || "$artifact" == *armhf* ]] && OPTIONS="-d"
8293
make freeze FREEZE_VERSION_OPTIONS="$OPTIONS"

.azure-pipelines/build-commonlib.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
pr: none
2+
trigger: none
3+
schedules:
4+
- cron: "0 0 * * *"
5+
displayName: Daily build
6+
branches:
7+
include:
8+
- master
9+
- 202???
10+
resources:
11+
repositories:
12+
- repository: buildimage
13+
type: github
14+
name: Azure/sonic-buildimage
15+
ref: master
16+
endpoint: build
17+
18+
jobs:
19+
- template: .azure-pipelines/template-commonlib.yml@buildimage

.azure-pipelines/docker-sonic-slave-arm64.yml

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
# Add steps that build, run tests, deploy, and more:
44
# https://aka.ms/yaml
55
# Build and push sonic-slave-[buster|jessie|stretch] images for amd64/armhf/arm64
6+
resources:
7+
repositories:
8+
- repository: buildimage
9+
type: github
10+
name: Azure/sonic-buildimage
11+
ref: master
12+
endpoint: build
613

714
schedules:
815
- cron: "0 8 * * *"
@@ -23,6 +30,7 @@ pr:
2330
- sonic-slave-stretch
2431
- sonic-slave-buster
2532
- sonic-slave-bullseye
33+
- .azure-pipelines
2634

2735
parameters:
2836
- name: 'dists'

.azure-pipelines/docker-sonic-slave-armhf.yml

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
# Add steps that build, run tests, deploy, and more:
44
# https://aka.ms/yaml
55
# Build and push sonic-slave-[buster|jessie|stretch] images for amd64/armhf/arm64
6+
resources:
7+
repositories:
8+
- repository: buildimage
9+
type: github
10+
name: Azure/sonic-buildimage
11+
ref: master
12+
endpoint: build
613

714
schedules:
815
- cron: "0 8 * * *"
@@ -23,6 +30,7 @@ pr:
2330
- sonic-slave-stretch
2431
- sonic-slave-buster
2532
- sonic-slave-bullseye
33+
- .azure-pipelines
2634

2735
parameters:
2836
- name: 'dists'

.azure-pipelines/docker-sonic-slave-template.yml

+19-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Add steps that build, run tests, deploy, and more:
44
# https://aka.ms/yaml
55
# Build and push sonic-slave-[buster|jessie|stretch] images for amd64/armhf/arm64
6-
76
parameters:
87
- name: arch
98
type: string
@@ -38,7 +37,10 @@ jobs:
3837
pool: ${{ parameters.pool }}
3938
steps:
4039
- template: cleanup.yml
41-
- template: template-clean-sonic-slave.yml
40+
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
41+
- template: template-clean-sonic-slave.yml
42+
- ${{ else }}:
43+
- template: .azure-pipelines/template-variables.yml@buildimage
4244
- checkout: self
4345
clean: true
4446
submodules: recursive
@@ -81,6 +83,10 @@ jobs:
8183
8284
docker tag $SLAVE_BASE_IMAGE:$SLAVE_BASE_TAG $REGISTRY_SERVER/$SLAVE_BASE_IMAGE_UPLOAD:latest
8385
docker tag $SLAVE_BASE_IMAGE:$SLAVE_BASE_TAG $REGISTRY_SERVER/$SLAVE_BASE_IMAGE_UPLOAD:$SLAVE_BASE_TAG
86+
if [ "$SLAVE_BASE_IMAGE_UPLOAD" != "$SLAVE_DIR" ]; then
87+
docker tag $SLAVE_BASE_IMAGE:$SLAVE_BASE_TAG $REGISTRY_SERVER/$SLAVE_DIR:latest-${{ parameters.arch }}
88+
docker tag $SLAVE_BASE_IMAGE:$SLAVE_BASE_TAG $REGISTRY_SERVER/$SLAVE_DIR:$SLAVE_BASE_TAG
89+
fi
8490
set +x
8591
echo "##vso[task.setvariable variable=VARIABLE_SLAVE_BASE_IMAGE]$SLAVE_BASE_IMAGE_UPLOAD"
8692
echo "##vso[task.setvariable variable=VARIABLE_SLAVE_BASE_TAG]$SLAVE_BASE_TAG"
@@ -89,6 +95,7 @@ jobs:
8995
displayName: Build sonic-slave-${{ parameters.dist }}-${{ parameters.arch }}
9096
9197
- task: Docker@2
98+
condition: ne(variables['Build.Reason'], 'PullRequest')
9299
displayName: Upload image
93100
inputs:
94101
containerRegistry: ${{ parameters.registry_conn }}
@@ -97,3 +104,13 @@ jobs:
97104
tags: |
98105
$(VARIABLE_SLAVE_BASE_TAG)
99106
latest
107+
- ${{ if ne(parameters.arch, 'amd64') }}:
108+
- task: Docker@2
109+
condition: ne(variables['Build.Reason'], 'PullRequest')
110+
displayName: Upload image ${{ parameters.dist }}
111+
inputs:
112+
containerRegistry: ${{ parameters.registry_conn }}
113+
repository: "sonic-slave-${{ parameters.dist }}"
114+
command: push
115+
tags: |
116+
$(VARIABLE_SLAVE_BASE_TAG)

.azure-pipelines/docker-sonic-slave.yml

+20-5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
# Add steps that build, run tests, deploy, and more:
44
# https://aka.ms/yaml
55
# Build and push sonic-slave-[buster|jessie|stretch] images for amd64/armhf/arm64
6+
resources:
7+
repositories:
8+
- repository: buildimage
9+
type: github
10+
name: Azure/sonic-buildimage
11+
ref: master
12+
endpoint: build
613

714
schedules:
815
- cron: "0 8 * * *"
@@ -24,6 +31,7 @@ pr:
2431
- sonic-slave-buster
2532
- sonic-slave-bullseye
2633
- src/sonic-build-hooks
34+
- .azure-pipelines
2735

2836
parameters:
2937
- name: 'arches'
@@ -52,8 +60,15 @@ stages:
5260
- ${{ each dist in parameters.dists }}:
5361
- ${{ if endswith(variables['Build.DefinitionName'], dist) }}:
5462
- ${{ each arch in parameters.arches }}:
55-
- template: docker-sonic-slave-template.yml
56-
parameters:
57-
pool: sonicbld
58-
arch: ${{ arch }}
59-
dist: ${{ dist }}
63+
- ${{ if eq(variables['System.PullRequest.TargetBranch'], 'master') }}:
64+
- template: docker-sonic-slave-template.yml
65+
parameters:
66+
pool: sonicbld
67+
arch: ${{ arch }}
68+
dist: ${{ dist }}
69+
- ${{ else }}:
70+
- template: .azure-pipelines/docker-sonic-slave-template.yml@buildimage
71+
parameters:
72+
pool: sonicbld
73+
arch: ${{ arch }}
74+
dist: ${{ dist }}

.azure-pipelines/official-build.yml

+11
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,20 @@ schedules:
1818
- 201911
1919
- 201811
2020

21+
resources:
22+
repositories:
23+
- repository: buildimage
24+
type: github
25+
name: Azure/sonic-buildimage
26+
ref: master
27+
endpoint: build
28+
2129
trigger: none
2230
pr: none
2331

32+
variables:
33+
- template: .azure-pipelines/template-variables.yml@buildimage
34+
2435
stages:
2536
- stage: Build
2637
pool: sonicbld
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
steps:
22
- script: |
3-
containers=$(docker container ls -a | grep "sonic-slave" | awk '{ print $1 }')
4-
[ -n "$containers" ] && docker container rm -f containers
3+
set -x
4+
containers=$(docker container ls -aq)
5+
[ -n "$containers" ] && docker container rm -f $containers
56
docker images | grep "^<none>" | awk '{print$3}' | xargs -i docker rmi {}
67
images=$(docker images 'sonic-slave-*' -a -q)
78
[ -n "$images" ] && docker rmi -f $images
9+
exit 0
810
displayName: 'Cleanup sonic slave'
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
jobs:
2+
- job: Build
3+
timeoutInMinutes: 120
4+
pool: sonicbld
5+
steps:
6+
- checkout: self
7+
clean: true
8+
submodules: recursive
9+
- script: |
10+
set -ex
11+
case $(Build.SourceBranchName) in
12+
202012 | 202106)
13+
bldenv=buster
14+
;;
15+
*)
16+
bldenv=bullseye
17+
;;
18+
esac
19+
BLDENV=$bldenv make -f Makefile.work configure PLATFORM=vs ENABLE_DOCKER_BASE_PULL=y
20+
echo "##vso[task.setvariable variable=bldenv;]$bldenv"
21+
displayName: Make configure
22+
- script: |
23+
set -ex
24+
LIBNL3_VERSION_BASE=$(grep "LIBNL3_VERSION_BASE =" rules/libnl3.mk | awk '{print$3}')
25+
LIBNL3_VERSION=$(grep "LIBNL3_VERSION =" rules/libnl3.mk | awk '{print$3}' | sed -e "s/(//" -e "s/)//" -e "s/\\$//" -e "s/LIBNL3_VERSION_BASE/$LIBNL3_VERSION_BASE/")
26+
BLDENV=$(bldenv) make -f Makefile.work target/debs/$(bldenv)/libnl-3-200_${LIBNL3_VERSION}_amd64.deb ENABLE_DOCKER_BASE_PULL=y
27+
28+
LIBYANG_VERSION_BASE=$(grep "LIBYANG_VERSION_BASE =" rules/libyang.mk | awk '{print$3}')
29+
LIBYANG_VERSION=$(grep "LIBYANG_VERSION =" rules/libyang.mk | awk '{print$3}' | sed -e "s/\\$//" -e "s/(//" -e "s/)//" -e "s/LIBYANG_VERSION_BASE/$LIBYANG_VERSION_BASE/")
30+
BLDENV=$(bldenv) make -f Makefile.work target/debs/$(bldenv)/libyang_${LIBYANG_VERSION}_amd64.deb
31+
find target -name *.deb | xargs -i cp {} $(Build.ArtifactStagingDirectory)
32+
displayName: Make common lib packages
33+
- publish: $(Build.ArtifactStagingDirectory)
34+
artifact: common-lib
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
variables:
2+
DEFAULT_CONTAINER_REGISTRY: 'publicmirror.azurecr.io'

azure-pipelines.yml

+9
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,18 @@ resources:
3030
type: github
3131
name: Azure/sonic-mgmt
3232
endpoint: build
33+
- repository: buildimage
34+
type: github
35+
name: Azure/sonic-buildimage
36+
endpoint: build
37+
ref: master
3338

3439
variables:
3540
- template: .azure-pipelines/azure-pipelines-repd-build-variables.yml
41+
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
42+
- template: .azure-pipelines/template-variables.yml
43+
- ${{ else }}:
44+
- template: .azure-pipelines/template-variables.yml@buildimage
3645
- name: CACHE_MODE
3746
value: rcache
3847

build_debian.sh

+1
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ export build_version="${SONIC_IMAGE_VERSION}"
492492
export debian_version="$(cat $FILESYSTEM_ROOT/etc/debian_version)"
493493
export kernel_version="${kversion}"
494494
export asic_type="${sonic_asic_platform}"
495+
export asic_subtype="${TARGET_MACHINE}"
495496
export commit_id="$(git rev-parse --short HEAD)"
496497
export branch="$(git rev-parse --abbrev-ref HEAD)"
497498
export release="$(if [ -f $FILESYSTEM_ROOT/etc/sonic/sonic_release ]; then cat $FILESYSTEM_ROOT/etc/sonic/sonic_release; fi)"
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+
}

device/accton/x86_64-accton_as4630_54pe-r0/pddf_support

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"skip_ledd": true,
3-
"skip_thermalctld": true
3+
"skip_pcied": true
44
}
55

0 commit comments

Comments
 (0)