Skip to content

Commit 89b47d1

Browse files
Merge pull request #19 from Azure/master
Merge last master
2 parents 6121325 + 1db50e5 commit 89b47d1

File tree

196 files changed

+2836
-4701
lines changed

Some content is hidden

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

196 files changed

+2836
-4701
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM_AZP) PLATFORM_ARCH=$(PLATFORM_ARCH) $(BUILD_OPTIONS) configure
4949
displayName: 'Make configure'
5050
postSteps:
51-
- script: cp target -r $(Build.ArtifactStagingDirectory)/
51+
- script: mv target $(Build.ArtifactStagingDirectory)/
5252
displayName: Copy Artifacts
5353
condition: always()
5454
- publish: $(Build.ArtifactStagingDirectory)
@@ -58,6 +58,10 @@ jobs:
5858
condition: failed()
5959
artifact: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)$(System.JobAttempt)'
6060
displayName: "Archive failed sonic image"
61+
- template: trigger-publish-artifacts-build.yml
62+
parameters:
63+
artifactName: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)'
64+
publishPrefix: '$(Build.DefinitionName)/$(Build.SourceBranchName)/$(GROUP_NAME)'
6165
- ${{ parameters.postSteps }}
6266
- template: cleanup.yml
6367
jobGroups: ${{ parameters.jobGroups }}

.azure-pipelines/run-test-template.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ parameters:
77
type: string
88
- name: ptf_name
99
type: string
10+
- name: vmtype
11+
type: string
12+
default: 'ceos'
1013
- name: section
1114
type: string
1215
default: ''
@@ -41,7 +44,7 @@ steps:
4144
git reset --hard origin/master
4245
sed -i s/use_own_value/${username}/ ansible/veos_vtb
4346
echo aaa > ansible/password.txt
44-
docker exec sonic-mgmt bash -c "pushd /data/sonic-mgmt/ansible;./testbed-cli.sh -d /data/sonic-vm -m $(inventory) -t $(testbed_file) -k ceos refresh-dut ${{ parameters.tbname }} password.txt" && sleep 180
47+
docker exec sonic-mgmt bash -c "pushd /data/sonic-mgmt/ansible;./testbed-cli.sh -d /data/sonic-vm -m $(inventory) -t $(testbed_file) -k ${{ parameters.vmtype }} refresh-dut ${{ parameters.tbname }} password.txt" && sleep 180
4548
displayName: "Setup testbed"
4649

4750
- script: |
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# The steps to trigger the pipeline to publish the artifacts
2+
3+
parameters:
4+
- name: artifactName
5+
type: string
6+
default: ""
7+
- name: publishPrefix
8+
type: string
9+
default: "$(Build.DefinitionName)/$(Build.SourceBranchName)"
10+
11+
steps:
12+
- script: |
13+
. functions.sh
14+
sonic_version=$(sonic_get_version)
15+
latest_tag=$(git describe --tags --abbrev=0)
16+
docker_tags="$sonic_version $(Build.SourceBranchName)"
17+
if [ "$(Build.SourceBranchName)" == "master" ]; then
18+
docker_tags="$docker_tags latest"
19+
fi
20+
echo "##vso[task.setvariable variable=sonic_version]$sonic_version"
21+
echo "##vso[task.setvariable variable=latest_tag]$latest_tag"
22+
echo "##vso[task.setvariable variable=docker_tags]$docker_tags"
23+
condition: ne(variables['Build.Reason'], 'PullRequest')
24+
displayName: 'Set trigger build variables'
25+
- task: TriggerBuild@4
26+
condition: ne(variables['Build.Reason'], 'PullRequest')
27+
inputs:
28+
definitionIsInCurrentTeamProject: false
29+
teamProject: internal
30+
tfsServer: $(System.CollectionUri)
31+
buildDefinition: 'publish-artifacts'
32+
queueBuildForUserThatTriggeredBuild: true
33+
ignoreSslCertificateErrors: false
34+
useSameSourceVersion: false
35+
useCustomSourceVersion: false
36+
useSameBranch: false
37+
waitForQueuedBuildsToFinish: false
38+
storeInEnvironmentVariable: true
39+
authenticationMethod: 'Personal Access Token'
40+
password: '$(system.accesstoken)'
41+
enableBuildInQueueCondition: false
42+
dependentOnSuccessfulBuildCondition: false
43+
dependentOnFailedBuildCondition: false
44+
checkbuildsoncurrentbranch: false
45+
failTaskIfConditionsAreNotFulfilled: false
46+
buildParameters: ''
47+
templateParameters: |
48+
pipelineContext: {"buildId":"$(Build.BuildId)",
49+
"pipelineId":"$(System.DefinitionId)",
50+
"project": "$(System.TeamProject)",
51+
"branchName":"$(Build.SourceBranchName)"},
52+
artifactContext: {"artifactName":"${{ parameters.artifactName }}",
53+
"artifactPatterns":"**/*.bin\n
54+
**/*.swi\n
55+
**/*.raw\n
56+
**/*.img.gz\n
57+
**/*-rpc.gz\n
58+
**/python-saithrift*.deb"},
59+
publishContext: {"publishPrefix":"${{ parameters.publishPrefix }}",
60+
"keepArtifactName":false,
61+
"dockerImagePatterns":"target/*-rpc.gz",
62+
"dockerTags":"$(docker_tags)",
63+
"version":"$(sonic_version)",
64+
"latestTag":"$(latest_tag)"}

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pull request for inclusion in the changelog:
4242
<!--
4343
Provide a link to config_db schema for the table for which YANG model
4444
is defined
45-
Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration.
45+
Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md
4646
-->
4747

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

Makefile.cache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ define GET_MOD_DEP_SHA
186186
$(if $($(1)_DEP_FILES_MISSING), $(warning "[ DPKG ] Dependecy file(s) are not found for $(1) : $($(1)_DEP_FILES_MISSING)))
187187

188188
# Include package dependencies hash values into package hash calculation
189-
$(eval $(1)_DEP_PKGS_SHA := $(foreach dfile,$(1)_MOD_DEP_PKGS,$(dfile)_DEP_MOD_SHA $(dfile)_MOD_HASH))
189+
$(eval $(1)_DEP_PKGS_SHA := $(foreach dfile,$($(1)_MOD_DEP_PKGS),$($(dfile)_DEP_MOD_SHA) $($(dfile)_MOD_HASH)))
190190

191191
$(eval $(1)_DEP_MOD_SHA := $(shell bash -c "git hash-object $($(1)_DEP_MOD_SHA_FILES) && echo $($(1)_DEP_PKGS_SHA)" \
192192
| sha1sum | awk '{print substr($$1,0,23);}'))

Makefile.work

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,25 @@ endif
138138
endif
139139
SLAVE_IMAGE = $(SLAVE_BASE_IMAGE)-$(USER_LC)
140140

141+
# Support FIPS feature, armhf not supported yet
142+
ifeq ($(PLATFORM_ARCH),armhf)
143+
ENABLE_FIPS_FEATURE := n
144+
ENABLE_FIPS := n
145+
endif
146+
147+
ifeq ($(ENABLE_FIPS_FEATURE), n)
148+
ifeq ($(ENABLE_FIPS), y)
149+
$(error Cannot set fips config ENABLE_FIPS=y when ENABLE_FIPS_FEATURE=n)
150+
endif
151+
endif
152+
141153
# Generate the version control build info
142154
$(shell SONIC_VERSION_CONTROL_COMPONENTS=$(SONIC_VERSION_CONTROL_COMPONENTS) \
143155
TRUSTED_GPG_URLS=$(TRUSTED_GPG_URLS) PACKAGE_URL_PREFIX=$(PACKAGE_URL_PREFIX) \
144156
scripts/generate_buildinfo_config.sh)
145157

146158
# Generate the slave Dockerfile, and prepare build info for it
147-
$(shell CONFIGURED_ARCH=$(CONFIGURED_ARCH) MULTIARCH_QEMU_ENVIRON=$(MULTIARCH_QEMU_ENVIRON) DOCKER_EXTRA_OPTS=$(DOCKER_EXTRA_OPTS) DEFAULT_CONTAINER_REGISTRY=$(DEFAULT_CONTAINER_REGISTRY) j2 $(SLAVE_DIR)/Dockerfile.j2 > $(SLAVE_DIR)/Dockerfile)
159+
$(shell CONFIGURED_ARCH=$(CONFIGURED_ARCH) MULTIARCH_QEMU_ENVIRON=$(MULTIARCH_QEMU_ENVIRON) ENABLE_FIPS_FEATURE=$(ENABLE_FIPS_FEATURE) DOCKER_EXTRA_OPTS=$(DOCKER_EXTRA_OPTS) DEFAULT_CONTAINER_REGISTRY=$(DEFAULT_CONTAINER_REGISTRY) j2 $(SLAVE_DIR)/Dockerfile.j2 > $(SLAVE_DIR)/Dockerfile)
148160
$(shell CONFIGURED_ARCH=$(CONFIGURED_ARCH) MULTIARCH_QEMU_ENVIRON=$(MULTIARCH_QEMU_ENVIRON) j2 $(SLAVE_DIR)/Dockerfile.user.j2 > $(SLAVE_DIR)/Dockerfile.user)
149161
$(shell BUILD_SLAVE=y DEFAULT_CONTAINER_REGISTRY=$(DEFAULT_CONTAINER_REGISTRY) scripts/prepare_docker_buildinfo.sh $(SLAVE_BASE_IMAGE) $(SLAVE_DIR)/Dockerfile $(CONFIGURED_ARCH) "" $(BLDENV))
150162

@@ -355,6 +367,8 @@ SONIC_BUILD_INSTRUCTION := make \
355367
ENABLE_AUTO_TECH_SUPPORT=$(ENABLE_AUTO_TECH_SUPPORT) \
356368
BUILD_MULTIASIC_KVM=$(BUILD_MULTIASIC_KVM) \
357369
ENABLE_ASAN=$(ENABLE_ASAN) \
370+
ENABLE_FIPS_FEATURE=$(ENABLE_FIPS_FEATURE) \
371+
ENABLE_FIPS=$(ENABLE_FIPS) \
358372
$(SONIC_OVERRIDE_BUILD_VARS)
359373

360374
.PHONY: sonic-slave-build sonic-slave-bash init reset

azure-pipelines.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ variables:
4343
- ${{ else }}:
4444
- template: .azure-pipelines/template-variables.yml@buildimage
4545
- name: CACHE_MODE
46-
value: rcache
46+
value: rcache
47+
- name: ENABLE_FIPS
48+
value: y
4749

4850
stages:
4951
- stage: BuildVS
@@ -191,3 +193,17 @@ stages:
191193
tbname: vms-kvm-t1-lag
192194
ptf_name: ptf_vms6-2
193195
tbtype: t1-lag
196+
197+
- job:
198+
pool: sonictest-sonic-t0
199+
displayName: "kvmtest-t0-sonic"
200+
timeoutInMinutes: 360
201+
202+
steps:
203+
- template: .azure-pipelines/run-test-template.yml
204+
parameters:
205+
dut: vlab-02
206+
tbname: vms-kvm-t0-64-32
207+
ptf_name: ptf_vms6-1
208+
tbtype: t0-sonic
209+
vmtype: vsonic

build_debian.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ CONFIGURED_ARCH=$([ -f .arch ] && cat .arch || echo amd64)
3333
## docker engine version (with platform)
3434
DOCKER_VERSION=5:20.10.14~3-0~debian-$IMAGE_DISTRO
3535
CONTAINERD_IO_VERSION=1.5.11-1
36-
LINUX_KERNEL_VERSION=5.10.0-8-2
36+
LINUX_KERNEL_VERSION=5.10.0-12-2
3737

3838
## Working directory to prepare the file system
3939
FILESYSTEM_ROOT=./fsroot
@@ -189,6 +189,10 @@ sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/arista-
189189
sudo cp files/initramfs-tools/resize-rootfs $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/resize-rootfs
190190
sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/resize-rootfs
191191

192+
# Hook into initramfs: upgrade SSD from initramfs
193+
sudo cp files/initramfs-tools/ssd-upgrade $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/ssd-upgrade
194+
sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/ssd-upgrade
195+
192196
# Hook into initramfs: run fsck to repair a non-clean filesystem prior to be mounted
193197
sudo cp files/initramfs-tools/fsck-rootfs $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/fsck-rootfs
194198
sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-premount/fsck-rootfs
@@ -643,5 +647,5 @@ fi
643647
pushd $FILESYSTEM_ROOT && sudo tar czf $OLDPWD/$FILESYSTEM_DOCKERFS -C ${DOCKERFS_PATH}var/lib/docker .; popd
644648

645649
## Compress together with /boot, /var/lib/docker and $PLATFORM_DIR as an installer payload zip file
646-
pushd $FILESYSTEM_ROOT && sudo zip $OLDPWD/$ONIE_INSTALLER_PAYLOAD -r boot/ $PLATFORM_DIR/; popd
650+
pushd $FILESYSTEM_ROOT && sudo zip --symlinks $OLDPWD/$ONIE_INSTALLER_PAYLOAD -r boot/ $PLATFORM_DIR/; popd
647651
sudo zip -g -n .squashfs:.gz $ONIE_INSTALLER_PAYLOAD $FILESYSTEM_SQUASHFS $FILESYSTEM_DOCKERFS

device/accton/x86_64-accton_as7326_56x-r0/pddf/pddf-device.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@
303303
"TEMP1" :
304304
{
305305
"dev_info": { "device_type":"TEMP_SENSOR", "device_name":"TEMP1", "device_parent":"MUX2"},
306+
"dev_attr": { "display_name":"MB_RearMAC_temp(0x48)"},
306307
"i2c":
307308
{
308309
"topo_info": { "parent_bus":"0xf", "dev_addr":"0x48", "dev_type":"lm75"},
@@ -316,7 +317,8 @@
316317
},
317318
"TEMP2" :
318319
{
319-
"dev_info": { "device_type":"TEMP_SENSOR", "device_name":"TEMP1", "device_parent":"MUX2"},
320+
"dev_info": { "device_type":"TEMP_SENSOR", "device_name":"TEMP2", "device_parent":"MUX2"},
321+
"dev_attr": { "display_name":"MB_FrontMAC_temp(0x49)"},
320322
"i2c":
321323
{
322324
"topo_info": { "parent_bus":"0xf", "dev_addr":"0x49", "dev_type":"lm75"},
@@ -330,7 +332,8 @@
330332
},
331333
"TEMP3" :
332334
{
333-
"dev_info": { "device_type":"TEMP_SENSOR", "device_name":"TEMP1", "device_parent":"MUX2"},
335+
"dev_info": { "device_type":"TEMP_SENSOR", "device_name":"TEMP3", "device_parent":"MUX2"},
336+
"dev_attr": { "display_name":"MB_LeftCenter_temp(0x4A)"},
334337
"i2c":
335338
{
336339
"topo_info": { "parent_bus":"0xf", "dev_addr":"0x4A", "dev_type":"lm75"},
@@ -344,7 +347,8 @@
344347
},
345348
"TEMP4" :
346349
{
347-
"dev_info": { "device_type":"TEMP_SENSOR", "device_name":"TEMP1", "device_parent":"MUX2"},
350+
"dev_info": { "device_type":"TEMP_SENSOR", "device_name":"TEMP4", "device_parent":"MUX2"},
351+
"dev_attr": { "display_name":"CB_temp(0x4B)"},
348352
"i2c":
349353
{
350354
"topo_info": { "parent_bus":"0xf", "dev_addr":"0x4B", "dev_type":"lm75"},
Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,46 @@
11
# libsensors configuration file for as7326-56x
22
# ------------------------------------------------
33
#
4-
54
bus "i2c-11" "i2c-1-mux (chan_id 2)"
65
bus "i2c-13" "i2c-1-mux (chan_id 4)"
76
bus "i2c-15" "i2c-1-mux (chan_id 6)"
87
bus "i2c-17" "i2c-1-mux (chan_id 0)"
98

10-
11-
chip "ym2651-i2c-*-59"
9+
chip "psu_pmbus-i2c-*-59"
1210
label in3 "PSU 1 Voltage"
1311
label fan1 "PSU 1 Fan"
1412
label temp1 "PSU 1 Temperature"
1513
label power2 "PSU 1 Power"
1614
label curr2 "PSU 1 Current"
17-
18-
chip "ym2651-i2c-*-5b"
15+
chip "psu_pmbus-i2c-*-5b"
1916
label in3 "PSU 2 Voltage"
2017
label fan1 "PSU 2 Fan"
2118
label temp1 "PSU 2 Temperature"
2219
label power2 "PSU 2 Power"
2320
label curr2 "PSU 2 Current"
24-
25-
chip "as7326_56x_fan-*"
26-
label fan1 "Fan 1 Front"
27-
label fan2 "Fan 2 Front"
28-
label fan3 "Fan 3 Front"
29-
label fan4 "Fan 4 Front"
30-
label fan5 "Fan 5 Front"
31-
label fan6 "Fan 6 Front"
32-
label fan11 "Fan 1 Rear"
33-
label fan12 "Fan 2 Rear"
34-
label fan13 "Fan 3 Rear"
35-
label fan14 "Fan 4 Rear"
36-
label fan15 "Fan 5 Rear"
37-
label fan16 "Fan 6 Rear"
21+
chip "fan_ctrl-*"
22+
label fan1 "Fantray1 Front"
23+
label fan2 "Fantray1 Rear"
24+
label fan3 "Fantray2 Front"
25+
label fan4 "Fantray2 Rear"
26+
label fan5 "Fantray3 Front"
27+
label fan6 "Fantray3 Rear"
28+
label fan7 "Fantray4 Front"
29+
label fan8 "Fantray4 Rear"
30+
label fan9 "Fantray5 Front"
31+
label fan10 "Fantray5 Rear"
32+
label fan11 "Fantray6 Front"
33+
label fan12 "Fantray6 Rear"
3834

3935

4036
chip "lm75-i2c-*-48"
41-
label temp1 "Main Board Temperature"
37+
label temp1 "MB_RearMAC_temp"
4238

4339
chip "lm75-i2c-*-49"
44-
label temp1 "Main Board Temperature"
40+
label temp1 "MB_FrontMAC_temp"
4541

4642
chip "lm75-i2c-*-4a"
47-
label temp1 "Main Board Temperature"
43+
label temp1 "MB_LeftCenter_temp"
4844

4945
chip "lm75-i2c-*-4b"
50-
label temp1 "CPU Board Temperature"
46+
label temp1 "CB_temp"

0 commit comments

Comments
 (0)