Skip to content

Commit

Permalink
Merge branch 'sonic-net:master' into 20221201_br_master_add_as9736_64…
Browse files Browse the repository at this point in the history
…d_model
  • Loading branch information
ec-michael-shih committed Dec 20, 2022
2 parents 7d62a2c + 364045c commit 99f11ee
Show file tree
Hide file tree
Showing 439 changed files with 109,567 additions and 528 deletions.
2 changes: 2 additions & 0 deletions .azure-pipelines/template-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ variables:
DEFAULT_CONTAINER_REGISTRY: 'publicmirror.azurecr.io'
COMMON_LIB_BUILD_ENVS: 'bullseye'
SONIC_SLAVE_DOCKER_DRIVER: 'overlay2'
SONIC_BUILD_RETRY_COUNT: 3
SONIC_BUILD_RETRY_INTERVAL: 600
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,21 @@ PLATFORM_PATH := platform/$(if $(PLATFORM),$(PLATFORM),$(CONFIGURED_PLATFORM))
PLATFORM_CHECKOUT := platform/checkout
PLATFORM_CHECKOUT_FILE := $(PLATFORM_CHECKOUT)/$(PLATFORM).ini
PLATFORM_CHECKOUT_CMD := $(shell if [ -f $(PLATFORM_CHECKOUT_FILE) ]; then PLATFORM_PATH=$(PLATFORM_PATH) j2 $(PLATFORM_CHECKOUT)/template.j2 $(PLATFORM_CHECKOUT_FILE); fi)
MAKE_WITH_RETRY := ./scripts/run_with_retry $(MAKE)

%::
@echo "+++ --- Making $@ --- +++"
ifeq ($(NOJESSIE), 0)
EXTRA_DOCKER_TARGETS=$(notdir $@) $(MAKE) -f Makefile.work jessie
$(MAKE_WITH_RETRY) EXTRA_DOCKER_TARGETS=$(notdir $@) -f Makefile.work jessie
endif
ifeq ($(NOSTRETCH), 0)
EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=stretch $(MAKE) -f Makefile.work stretch
$(MAKE_WITH_RETRY) EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=stretch -f Makefile.work stretch
endif
ifeq ($(NOBUSTER), 0)
EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=buster $(MAKE) -f Makefile.work buster
$(MAKE_WITH_RETRY) EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=buster -f Makefile.work buster
endif
ifeq ($(NOBULLSEYE), 0)
BLDENV=bullseye $(MAKE) -f Makefile.work $@
$(MAKE_WITH_RETRY) BLDENV=bullseye -f Makefile.work $@
endif
BLDENV=bullseye $(MAKE) -f Makefile.work docker-cleanup

Expand Down
11 changes: 9 additions & 2 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
# * ENABLE_BOOTCHART: Enable SONiC bootchart
# * Default: n
# * Values: y,n
# * GZ_COMPRESS_PROGRAM: Select pigz to reduce build time
# * Default: gzip
# * Values: pigz,gzip
#
###############################################################################

Expand Down Expand Up @@ -140,6 +143,10 @@ ifeq ($(ENABLE_DOCKER_BASE_PULL),)
override ENABLE_DOCKER_BASE_PULL = n
endif

ifneq ($(GZ_COMPRESS_PROGRAM), pigz)
override GZ_COMPRESS_PROGRAM = gzip
endif

ifeq ($(CONFIGURED_ARCH),amd64)
SLAVE_BASE_IMAGE = $(SLAVE_DIR)
MULTIARCH_QEMU_ENVIRON = n
Expand Down Expand Up @@ -200,6 +207,7 @@ $(shell CONFIGURED_ARCH=$(CONFIGURED_ARCH) \
ENABLE_FIPS_FEATURE=$(ENABLE_FIPS_FEATURE) \
DOCKER_EXTRA_OPTS=$(DOCKER_EXTRA_OPTS) \
DEFAULT_CONTAINER_REGISTRY=$(DEFAULT_CONTAINER_REGISTRY) \
GZ_COMPRESS_PROGRAM=$(GZ_COMPRESS_PROGRAM) \
j2 $(SLAVE_DIR)/Dockerfile.j2 > $(SLAVE_DIR)/Dockerfile)

$(shell CONFIGURED_ARCH=$(CONFIGURED_ARCH) \
Expand Down Expand Up @@ -525,14 +533,13 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \
SONIC_SLAVE_DOCKER_DRIVER=$(SONIC_SLAVE_DOCKER_DRIVER) \
MIRROR_URLS=$(MIRROR_URLS) \
MIRROR_SECURITY_URLS=$(MIRROR_SECURITY_URLS) \
GZ_COMPRESS_PROGRAM=$(GZ_COMPRESS_PROGRAM) \
$(SONIC_OVERRIDE_BUILD_VARS)

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


ifeq ($(filter clean,$(MAKECMDGOALS)),)
COLLECT_BUILD_VERSION = { scripts/collect_build_version_files.sh \$$?; }
endif

ifdef SOURCE_FOLDER
DOCKER_RUN += -v $(SOURCE_FOLDER):/var/$(USER)/src
Expand Down
10 changes: 8 additions & 2 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then
else
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c 'cd /dev && MAKEDEV generic'
fi

## docker and mkinitramfs on target system will use pigz/unpigz automatically
if [[ $GZ_COMPRESS_PROGRAM == pigz ]]; then
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install pigz
fi

## Install initramfs-tools and linux kernel
## Note: initramfs-tools recommends depending on busybox, and we really want busybox for
## 1. commands such as touch
Expand Down Expand Up @@ -699,8 +705,8 @@ if [[ $MULTIARCH_QEMU_ENVIRON == y || $CROSS_BUILD_ENVIRON == y ]]; then
fi

## Compress docker files
pushd $FILESYSTEM_ROOT && sudo tar czf $OLDPWD/$FILESYSTEM_DOCKERFS -C ${DOCKERFS_PATH}var/lib/docker .; popd
pushd $FILESYSTEM_ROOT && sudo tar -I $GZ_COMPRESS_PROGRAM -cf $OLDPWD/$FILESYSTEM_DOCKERFS -C ${DOCKERFS_PATH}var/lib/docker .; popd

## Compress together with /boot, /var/lib/docker and $PLATFORM_DIR as an installer payload zip file
pushd $FILESYSTEM_ROOT && sudo tar czf platform.tar.gz -C $PLATFORM_DIR . && sudo zip -n .gz $OLDPWD/$ONIE_INSTALLER_PAYLOAD -r boot/ platform.tar.gz; popd
pushd $FILESYSTEM_ROOT && sudo tar -I $GZ_COMPRESS_PROGRAM -cf platform.tar.gz -C $PLATFORM_DIR . && sudo zip -n .gz $OLDPWD/$ONIE_INSTALLER_PAYLOAD -r boot/ platform.tar.gz; popd
sudo zip -g -n .squashfs:.gz $ONIE_INSTALLER_PAYLOAD $FILESYSTEM_SQUASHFS $FILESYSTEM_DOCKERFS
3 changes: 2 additions & 1 deletion build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ fi

## Save the docker image in a gz file
mkdir -p target
docker save $docker_image_name | gzip -c > target/$docker_image_name.gz
command -v pigz > /dev/null && GZ_COMPRESS_PROGRAM=pigz || GZ_COMPRESS_PROGRAM=gzip
docker save $docker_image_name | $GZ_COMPRESS_PROGRAM -c > target/$docker_image_name.gz

if [ -n "$1" ]; then
./push_docker.sh target/$docker_image_name.gz $@ $docker_image_tag
Expand Down
8 changes: 4 additions & 4 deletions build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ generate_kvm_image()
exit 1
}

gzip $KVM_IMAGE_DISK
$GZ_COMPRESS_PROGRAM $KVM_IMAGE_DISK

[ -r $KVM_IMAGE_DISK.gz ] || {
echo "Error : gzip $KVM_IMAGE_DISK failed!"
echo "Error : $GZ_COMPRESS_PROGRAM $KVM_IMAGE_DISK failed!"
exit 1
}

Expand Down Expand Up @@ -147,10 +147,10 @@ elif [ "$IMAGE_TYPE" = "raw" ]; then
exit 1
}

gzip $OUTPUT_RAW_IMAGE
$GZ_COMPRESS_PROGRAM $OUTPUT_RAW_IMAGE

[ -r $OUTPUT_RAW_IMAGE.gz ] || {
echo "Error : gzip $OUTPUT_RAW_IMAGE failed!"
echo "Error : $GZ_COMPRESS_PROGRAM $OUTPUT_RAW_IMAGE failed!"
exit 1
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,4 +529,3 @@ serdes_preemphasis_127=0x14410a
serdes_driver_current_130=0xe
serdes_preemphasis_130=0x102804
phy_an_lt_msft=1
disable_pcie_firmware_check=1
Original file line number Diff line number Diff line change
Expand Up @@ -572,4 +572,3 @@ serdes_preemphasis_125=0x85804
serdes_preemphasis_127=0x85804
serdes_preemphasis_129=0x85804
phy_an_lt_msft=1
disable_pcie_firmware_check=1
Original file line number Diff line number Diff line change
Expand Up @@ -467,4 +467,3 @@ serdes_core_tx_polarity_flip_physical{129}=0x0
stable_size=0x5500000
tdma_timeout_usec=15000000
tslam_timeout_usec=15000000
disable_pcie_firmware_check=1
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,4 @@ stable_size=0x5500000
tdma_timeout_usec.0=15000000
tslam_timeout_usec.0=15000000
sai_mdio_access_clause22=1
sai_verify_incoming_chksum=0
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/jr2-a7280cr3-32d4-40x100G.config.bcm
SAI_SWITCH_NON_ECMP_MAX_SIZE=3072
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Ethernet112 24,25,26,27 Ethernet15/1 15 Ext 100000 Eth1
Ethernet120 16,17,18,19 Ethernet16/1 16 Ext 100000 Eth120-ASIC0 0 16 8
Ethernet128 8,9,10,11 Ethernet17/1 17 Ext 100000 Eth128-ASIC0 0 17 8
Ethernet136 0,1,2,3 Ethernet18/1 18 Ext 100000 Eth136-ASIC0 0 18 8
Ethernet-Rec0 221 Recirc0/0 19 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 20 Inb 400000 Rcy1-ASIC0 1 222 8
Ethernet-Rec0 221 Recirc0/0 37 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 38 Inb 400000 Rcy1-ASIC0 1 222 8
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/j2p-a7800r3a-36d-36x400G.config.bcm

SAI_SWITCH_NON_ECMP_MAX_SIZE=3072
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# name lanes alias index role speed asic_port_name coreId corePortId numVoq
Ethernet144 72,73,74,75 Ethernet19/1 21 Ext 100000 Eth0-ASIC1 1 1 8
Ethernet152 80,81,82,83 Ethernet20/1 22 Ext 100000 Eth8-ASIC1 1 2 8
Ethernet160 88,89,90,91 Ethernet21/1 23 Ext 100000 Eth16-ASIC1 1 3 8
Ethernet168 96,97,98,99 Ethernet22/1 24 Ext 100000 Eth24-ASIC1 1 4 8
Ethernet176 104,105,106,107 Ethernet23/1 25 Ext 100000 Eth32-ASIC1 1 5 8
Ethernet184 112,113,114,115 Ethernet24/1 26 Ext 100000 Eth40-ASIC1 1 6 8
Ethernet192 120,121,122,123 Ethernet25/1 27 Ext 100000 Eth48-ASIC1 1 7 8
Ethernet200 128,129,130,131 Ethernet26/1 28 Ext 100000 Eth56-ASIC1 1 8 8
Ethernet208 136,137,138,139 Ethernet27/1 29 Ext 100000 Eth64-ASIC1 1 9 8
Ethernet216 64,65,66,67 Ethernet28/1 30 Ext 100000 Eth72-ASIC1 0 10 8
Ethernet224 56,57,58,59 Ethernet29/1 31 Ext 100000 Eth80-ASIC1 0 11 8
Ethernet232 48,49,50,51 Ethernet30/1 32 Ext 100000 Eth88-ASIC1 0 12 8
Ethernet240 40,41,42,43 Ethernet31/1 33 Ext 100000 Eth96-ASIC1 0 13 8
Ethernet248 32,33,34,35 Ethernet32/1 34 Ext 100000 Eth104-ASIC1 0 14 8
Ethernet256 24,25,26,27 Ethernet33/1 35 Ext 100000 Eth112-ASIC1 0 15 8
Ethernet264 16,17,18,19 Ethernet34/1 36 Ext 100000 Eth120-ASIC1 0 16 8
Ethernet272 8,9,10,11 Ethernet35/1 37 Ext 100000 Eth128-ASIC1 0 17 8
Ethernet280 0,1,2,3 Ethernet36/1 38 Ext 100000 Eth136-ASIC1 0 18 8
Ethernet144 72,73,74,75 Ethernet19/1 19 Ext 100000 Eth0-ASIC1 1 1 8
Ethernet152 80,81,82,83 Ethernet20/1 20 Ext 100000 Eth8-ASIC1 1 2 8
Ethernet160 88,89,90,91 Ethernet21/1 21 Ext 100000 Eth16-ASIC1 1 3 8
Ethernet168 96,97,98,99 Ethernet22/1 22 Ext 100000 Eth24-ASIC1 1 4 8
Ethernet176 104,105,106,107 Ethernet23/1 23 Ext 100000 Eth32-ASIC1 1 5 8
Ethernet184 112,113,114,115 Ethernet24/1 24 Ext 100000 Eth40-ASIC1 1 6 8
Ethernet192 120,121,122,123 Ethernet25/1 25 Ext 100000 Eth48-ASIC1 1 7 8
Ethernet200 128,129,130,131 Ethernet26/1 26 Ext 100000 Eth56-ASIC1 1 8 8
Ethernet208 136,137,138,139 Ethernet27/1 27 Ext 100000 Eth64-ASIC1 1 9 8
Ethernet216 64,65,66,67 Ethernet28/1 28 Ext 100000 Eth72-ASIC1 0 10 8
Ethernet224 56,57,58,59 Ethernet29/1 29 Ext 100000 Eth80-ASIC1 0 11 8
Ethernet232 48,49,50,51 Ethernet30/1 30 Ext 100000 Eth88-ASIC1 0 12 8
Ethernet240 40,41,42,43 Ethernet31/1 31 Ext 100000 Eth96-ASIC1 0 13 8
Ethernet248 32,33,34,35 Ethernet32/1 32 Ext 100000 Eth104-ASIC1 0 14 8
Ethernet256 24,25,26,27 Ethernet33/1 33 Ext 100000 Eth112-ASIC1 0 15 8
Ethernet264 16,17,18,19 Ethernet34/1 34 Ext 100000 Eth120-ASIC1 0 16 8
Ethernet272 8,9,10,11 Ethernet35/1 35 Ext 100000 Eth128-ASIC1 0 17 8
Ethernet280 0,1,2,3 Ethernet36/1 36 Ext 100000 Eth136-ASIC1 0 18 8
Ethernet-Rec1 221 Recirc0/0 39 Rec 400000 Rcy0-ASIC1 0 221 8
Ethernet-IB1 222 Recirc0/1 40 Inb 400000 Rcy1-ASIC1 1 222 8
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ Ethernet112 24,25,26,27 Ethernet15/1 15 Ext 100000 Eth1
Ethernet120 16,17,18,19 Ethernet16/1 16 Ext 100000 Eth120-ASIC0 0 16 8
Ethernet128 8,9,10,11 Ethernet17/1 17 Ext 100000 Eth128-ASIC0 0 17 8
Ethernet136 0,1,2,3 Ethernet18/1 18 Ext 100000 Eth136-ASIC0 0 18 8
Ethernet-Rec0 221 Recirc0/0 19 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 20 Inb 400000 Rcy1-ASIC0 1 222 8
Ethernet144 72,73,74,75 Ethernet19/1 21 Ext 100000 Eth0-ASIC1 1 1 8
Ethernet152 80,81,82,83 Ethernet20/1 22 Ext 100000 Eth8-ASIC1 1 2 8
Ethernet160 88,89,90,91 Ethernet21/1 23 Ext 100000 Eth16-ASIC1 1 3 8
Ethernet168 96,97,98,99 Ethernet22/1 24 Ext 100000 Eth24-ASIC1 1 4 8
Ethernet176 104,105,106,107 Ethernet23/1 25 Ext 100000 Eth32-ASIC1 1 5 8
Ethernet184 112,113,114,115 Ethernet24/1 26 Ext 100000 Eth40-ASIC1 1 6 8
Ethernet192 120,121,122,123 Ethernet25/1 27 Ext 100000 Eth48-ASIC1 1 7 8
Ethernet200 128,129,130,131 Ethernet26/1 28 Ext 100000 Eth56-ASIC1 1 8 8
Ethernet208 136,137,138,139 Ethernet27/1 29 Ext 100000 Eth64-ASIC1 1 9 8
Ethernet216 64,65,66,67 Ethernet28/1 30 Ext 100000 Eth72-ASIC1 0 10 8
Ethernet224 56,57,58,59 Ethernet29/1 31 Ext 100000 Eth80-ASIC1 0 11 8
Ethernet232 48,49,50,51 Ethernet30/1 32 Ext 100000 Eth88-ASIC1 0 12 8
Ethernet240 40,41,42,43 Ethernet31/1 33 Ext 100000 Eth96-ASIC1 0 13 8
Ethernet248 32,33,34,35 Ethernet32/1 34 Ext 100000 Eth104-ASIC1 0 14 8
Ethernet256 24,25,26,27 Ethernet33/1 35 Ext 100000 Eth112-ASIC1 0 15 8
Ethernet264 16,17,18,19 Ethernet34/1 36 Ext 100000 Eth120-ASIC1 0 16 8
Ethernet272 8,9,10,11 Ethernet35/1 37 Ext 100000 Eth128-ASIC1 0 17 8
Ethernet280 0,1,2,3 Ethernet36/1 38 Ext 100000 Eth136-ASIC1 0 18 8
Ethernet144 72,73,74,75 Ethernet19/1 19 Ext 100000 Eth0-ASIC1 1 1 8
Ethernet152 80,81,82,83 Ethernet20/1 20 Ext 100000 Eth8-ASIC1 1 2 8
Ethernet160 88,89,90,91 Ethernet21/1 21 Ext 100000 Eth16-ASIC1 1 3 8
Ethernet168 96,97,98,99 Ethernet22/1 22 Ext 100000 Eth24-ASIC1 1 4 8
Ethernet176 104,105,106,107 Ethernet23/1 23 Ext 100000 Eth32-ASIC1 1 5 8
Ethernet184 112,113,114,115 Ethernet24/1 24 Ext 100000 Eth40-ASIC1 1 6 8
Ethernet192 120,121,122,123 Ethernet25/1 25 Ext 100000 Eth48-ASIC1 1 7 8
Ethernet200 128,129,130,131 Ethernet26/1 26 Ext 100000 Eth56-ASIC1 1 8 8
Ethernet208 136,137,138,139 Ethernet27/1 27 Ext 100000 Eth64-ASIC1 1 9 8
Ethernet216 64,65,66,67 Ethernet28/1 28 Ext 100000 Eth72-ASIC1 0 10 8
Ethernet224 56,57,58,59 Ethernet29/1 29 Ext 100000 Eth80-ASIC1 0 11 8
Ethernet232 48,49,50,51 Ethernet30/1 30 Ext 100000 Eth88-ASIC1 0 12 8
Ethernet240 40,41,42,43 Ethernet31/1 31 Ext 100000 Eth96-ASIC1 0 13 8
Ethernet248 32,33,34,35 Ethernet32/1 32 Ext 100000 Eth104-ASIC1 0 14 8
Ethernet256 24,25,26,27 Ethernet33/1 33 Ext 100000 Eth112-ASIC1 0 15 8
Ethernet264 16,17,18,19 Ethernet34/1 34 Ext 100000 Eth120-ASIC1 0 16 8
Ethernet272 8,9,10,11 Ethernet35/1 35 Ext 100000 Eth128-ASIC1 0 17 8
Ethernet280 0,1,2,3 Ethernet36/1 36 Ext 100000 Eth136-ASIC1 0 18 8
Ethernet-Rec0 221 Recirc0/0 37 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 38 Inb 400000 Rcy1-ASIC0 1 222 8
Ethernet-Rec1 221 Recirc0/0 39 Rec 400000 Rcy0-ASIC1 0 221 8
Ethernet-IB1 222 Recirc0/1 40 Inb 400000 Rcy1-ASIC1 1 222 8
Ethernet-IB1 222 Recirc0/1 40 Inb 400000 Rcy1-ASIC1 1 222 8
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ Ethernet128 8,9,10,11 Ethernet17/1 17 Ext 100000 Eth1
Ethernet132 12,13,14,15 Ethernet17/5 17 Ext 100000 Eth132-ASIC0 0 34 8
Ethernet136 0,1,2,3 Ethernet18/1 18 Ext 100000 Eth136-ASIC0 0 35 8
Ethernet140 4,5,6,7 Ethernet18/5 18 Ext 100000 Eth140-ASIC0 0 36 8
Ethernet-Rec0 221 Recirc0/0 19 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 20 Inb 400000 Rcy1-ASIC0 1 222 8
Ethernet-Rec0 221 Recirc0/0 37 Rec 400000 Rcy0-ASIC0 0 221 8
Ethernet-IB0 222 Recirc0/1 38 Inb 400000 Rcy1-ASIC0 1 222 8
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/j2p-a7800r3a-36d-36x400G.config.bcm

SAI_SWITCH_NON_ECMP_MAX_SIZE=3072

0 comments on commit 99f11ee

Please sign in to comment.