Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 425 changed files with 13,096 additions and 14,466 deletions.
6 changes: 4 additions & 2 deletions .azure-pipelines/azure-pipelines-repd-build-variables.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
variables:
${{ if and(ge(variables['Build.SourceBranchName'], '202012'), le(variables['Build.SourceBranchName'], '299999')) }}:
${{ if eq(variables['Build.Reason'],'PullRequest') }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=$([ "$(System.PullRequest.TargetBranch)" != "master" ] && echo deb,py2,py3,web,git,docker)'
${{ elseif ne(variables['Build.SourceBranchName'],'master') }}:
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')) }}:
${{ else }}:
VERSION_CONTROL_OPTIONS: ''
1 change: 1 addition & 0 deletions .azure-pipelines/vstest-exclude
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
^platform
^.azure-pipelines
^files/build/versions
^sonic-slave-
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@
[submodule "src/ptf-py3"]
path = src/ptf-py3
url = https://github.com/p4lang/ptf.git
[submodule "src/dhcprelay"]
path = src/dhcprelay
url = https://github.com/sonic-net/sonic-dhcp-relay.git
[submodule "src/security-DsmsLinux"]
path = src/security-DsmsLinux
url = https://msazure.visualstudio.com/One/_git/security-DsmsLinux
[submodule "src/sonic-host-services"]
path = src/sonic-host-services
url = https://github.com/sonic-net/sonic-host-services
14 changes: 14 additions & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
# * ENABLE_AUTO_TECH_SUPPORT: Enable the configuration for event-driven techsupport & coredump mgmt feature
# * Default: y
# * Values: y,n
# * INCLUDE_BOOTCHART: Install SONiC bootchart
# * Default: y
# * Values: y,n
# * ENABLE_BOOTCHART: Enable SONiC bootchart
# * Default: n
# * Values: y,n
#
###############################################################################

Expand Down Expand Up @@ -98,6 +104,12 @@ ifeq ($(PLATFORM_ARCH),)
override PLATFORM_ARCH = $(CONFIGURED_ARCH)
endif

ifeq ($(CONFIGURED_ARCH),amd64)
TARGET_BOOTLOADER = grub
else
TARGET_BOOTLOADER = uboot
endif

ifeq ($(BLDENV), bullseye)
SLAVE_DIR = sonic-slave-bullseye
else ifeq ($(BLDENV), buster)
Expand Down Expand Up @@ -383,6 +395,8 @@ SONIC_BUILD_INSTRUCTION := make \
ENABLE_AUTO_TECH_SUPPORT=$(ENABLE_AUTO_TECH_SUPPORT) \
BUILD_MULTIASIC_KVM=$(BUILD_MULTIASIC_KVM) \
ENABLE_ASAN=$(ENABLE_ASAN) \
SONIC_INCLUDE_BOOTCHART=$(INCLUDE_BOOTCHART) \
SONIC_ENABLE_BOOTCHART=$(ENABLE_BOOTCHART) \
ENABLE_FIPS_FEATURE=$(ENABLE_FIPS_FEATURE) \
ENABLE_FIPS=$(ENABLE_FIPS) \
SONIC_SLAVE_DOCKER_DRIVER=$(SONIC_SLAVE_DOCKER_DRIVER) \
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ resources:
ref: master

variables:
- template: .azure-pipelines/azure-pipelines-repd-build-variables.yml
- template: .azure-pipelines/azure-pipelines-repd-build-variables.yml@buildimage
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- template: .azure-pipelines/template-variables.yml
- ${{ else }}:
Expand All @@ -53,7 +53,7 @@ stages:
jobs:
- template: .azure-pipelines/azure-pipelines-build.yml
parameters:
buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) ${{ variables.VERSION_CONTROL_OPTIONS }}'
buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) BUILD_MULTIASIC_KVM=y ${{ variables.VERSION_CONTROL_OPTIONS }}'
jobGroups:
- name: vs

Expand All @@ -77,7 +77,7 @@ stages:

- stage: Test
dependsOn: BuildVS
condition: and(ne(stageDependencies.BuildVS.outputs['vs.SetVar.SKIP_VSTEST'], 'YES'), succeeded())
condition: and(ne(stageDependencies.BuildVS.outputs['vs.SetVar.SKIP_VSTEST'], 'YES'), in(dependencies.BuildVS.result, 'Succeeded', 'SucceededWithIssues'))
variables:
- name: inventory
value: veos_vtb
Expand Down
18 changes: 12 additions & 6 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if [[ -d $FILESYSTEM_ROOT ]]; then
fi
mkdir -p $FILESYSTEM_ROOT
mkdir -p $FILESYSTEM_ROOT/$PLATFORM_DIR
mkdir -p $FILESYSTEM_ROOT/$PLATFORM_DIR/x86_64-grub
mkdir -p $FILESYSTEM_ROOT/$PLATFORM_DIR/grub
touch $FILESYSTEM_ROOT/$PLATFORM_DIR/firsttime

## ensure proc is mounted
Expand Down Expand Up @@ -162,7 +162,7 @@ if [ "$SONIC_ENABLE_SECUREBOOT_SIGNATURE" = "y" ]; then
fi

echo '[INFO] Signing SONiC linux kernel image'
K=$FILESYSTEM_ROOT/boot/vmlinuz-${LINUX_KERNEL_VERSION}-amd64
K=$FILESYSTEM_ROOT/boot/vmlinuz-${LINUX_KERNEL_VERSION}-${CONFIGURED_ARCH}
sbsign --key $SIGNING_KEY --cert $SIGNING_CERT --output /tmp/${K##*/} ${K}
sudo cp -f /tmp/${K##*/} ${K}
fi
Expand Down Expand Up @@ -392,11 +392,17 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
systemd-sysv \
ntp

if [[ $CONFIGURED_ARCH == amd64 ]]; then
if [[ $TARGET_BOOTLOADER == grub ]]; then
if [[ $CONFIGURED_ARCH == amd64 ]]; then
GRUB_PKG=grub-pc-bin
elif [[ $CONFIGURED_ARCH == arm64 ]]; then
GRUB_PKG=grub-efi-arm64-bin
fi

sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y download \
grub-pc-bin
$GRUB_PKG

sudo mv $FILESYSTEM_ROOT/grub-pc-bin*.deb $FILESYSTEM_ROOT/$PLATFORM_DIR/x86_64-grub
sudo mv $FILESYSTEM_ROOT/grub*.deb $FILESYSTEM_ROOT/$PLATFORM_DIR/grub
fi

## Disable kexec supported reboot which was installed by default
Expand Down Expand Up @@ -589,7 +595,7 @@ fi
## Update initramfs
sudo chroot $FILESYSTEM_ROOT update-initramfs -u
## Convert initrd image to u-boot format
if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then
if [[ $TARGET_BOOTLOADER == uboot ]]; then
INITRD_FILE=initrd.img-${LINUX_KERNEL_VERSION}-${CONFIGURED_ARCH}
if [[ $CONFIGURED_ARCH == armhf ]]; then
INITRD_FILE=initrd.img-${LINUX_KERNEL_VERSION}-armmp
Expand Down
8 changes: 4 additions & 4 deletions build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ generate_onie_installer_image()

## Generate an ONIE installer image
## Note: Don't leave blank between lines. It is single line command.
./onie-mk-demo.sh $TARGET_PLATFORM $TARGET_MACHINE $TARGET_PLATFORM-$TARGET_MACHINE-$ONIEIMAGE_VERSION \
./onie-mk-demo.sh $CONFIGURED_ARCH $TARGET_MACHINE $TARGET_PLATFORM-$TARGET_MACHINE-$ONIEIMAGE_VERSION \
installer platform/$TARGET_MACHINE/platform.conf $output_file OS $IMAGE_VERSION $ONIE_IMAGE_PART_SIZE \
$ONIE_INSTALLER_PAYLOAD
}
Expand All @@ -111,7 +111,7 @@ if [ "$IMAGE_TYPE" = "onie" ]; then
mkdir -p `dirname $OUTPUT_ONIE_IMAGE`
sudo rm -f $OUTPUT_ONIE_IMAGE

generate_device_list "./installer/$TARGET_PLATFORM/platforms_asic"
generate_device_list "./installer/platforms_asic"

generate_onie_installer_image

Expand All @@ -125,7 +125,7 @@ elif [ "$IMAGE_TYPE" = "raw" ]; then
mkdir -p `dirname $OUTPUT_RAW_IMAGE`
sudo rm -f $OUTPUT_RAW_IMAGE

generate_device_list "./installer/$TARGET_PLATFORM/platforms_asic"
generate_device_list "./installer/platforms_asic"

generate_onie_installer_image "$tmp_output_onie_image"

Expand Down Expand Up @@ -159,7 +159,7 @@ elif [ "$IMAGE_TYPE" = "raw" ]; then

elif [ "$IMAGE_TYPE" = "kvm" ]; then

generate_device_list "./installer/$TARGET_PLATFORM/platforms_asic"
generate_device_list "./installer/platforms_asic"

generate_onie_installer_image
# Generate single asic KVM image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
sai_load_hw_config=/etc/bcm/flex/bcm56870_a0_premium_issu/b870.6.4.1/
l3_alpm_hit_skip=1
sai_adjust_acl_drop_in_rx_drop=1
sai_verify_incoming_chksum=0
{{ map_prio }}
host_as_route_disable=1
sai_trap_group_priority=1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
sai_load_hw_config=/etc/bcm/flex/bcm56870_a0_premium_issu/b870.6.4.1/
l3_alpm_hit_skip=1
sai_adjust_acl_drop_in_rx_drop=1
sai_verify_incoming_chksum=0
{{ map_prio }}
host_as_route_disable=1
sai_trap_group_priority=1000
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0,128,4) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
{%- endfor %}
{%- endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0,128,4) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
{%- endfor %}
{%- endmacro %}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 002411d

Please sign in to comment.