Skip to content

Commit

Permalink
Merge branch 'sonic-net:master' into saksarav-nokia-tsa-tsb
Browse files Browse the repository at this point in the history
  • Loading branch information
saksarav-nokia authored Apr 18, 2024
2 parents 3727e9c + 6ce4a69 commit 8f35ba6
Show file tree
Hide file tree
Showing 715 changed files with 21,768 additions and 9,670 deletions.
2 changes: 2 additions & 0 deletions .azure-pipelines/azure-pipelines-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@ jobs:
pool: sonicbld-armhf
timeoutInMinutes: 2880
variables:
PLATFORM_NAME: marvell
PLATFORM_ARCH: armhf

- name: marvell-arm64
${{ if not(parameters.qemuOrCrossBuild) }}:
pool: sonicbld-arm64
timeoutInMinutes: 2880
variables:
PLATFORM_NAME: marvell
PLATFORM_ARCH: arm64

- name: marvell
Expand Down
3 changes: 2 additions & 1 deletion .azure-pipelines/azure-pipelines-image-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ jobs:
sudo modprobe overlay
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
[ -z "$PLATFORM_NAME" ] && PLATFORM_NAME=$(PLATFORM_AZP)
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$PLATFORM_NAME PLATFORM_ARCH=$(PLATFORM_ARCH) $(BUILD_OPTIONS) configure
displayName: 'Make configure'
postSteps:
- script: |
Expand Down
1 change: 1 addition & 0 deletions .azure-pipelines/official-build-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ stages:
pool: sonicbld-armhf
timeoutInMinutes: 1200
variables:
PLATFORM_NAME: marvell
PLATFORM_ARCH: armhf
6 changes: 5 additions & 1 deletion .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ jobs:
- uses: actions/checkout@v3
- run: semgrep ci
env:
SEMGREP_RULES: p/default
SEMGREP_RULES: |
p/default
r/python.lang.security.audit.dangerous-system-call-audit.dangerous-system-call-audit
r/c.lang.security.insecure-use-strcat-fn.insecure-use-strcat-fn
r/c.lang.security.insecure-use-string-copy-fn.insecure-use-string-copy-fn
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ fsroot/
fs.*
target/
*.deb
*.udeb
*.changes
*.buildinfo
*.tar
Expand All @@ -28,8 +29,13 @@ sonic-slave*/*.log
# Autogenerated Dockerfiles
sonic-slave*/Dockerfile
sonic-slave*/Dockerfile.user
sonic-slave*/Dockerfile.cleanup
dockers/*/Dockerfile
dockers/*/Dockerfile.cleanup
dockers/*/Dockerfile-dbg.cleanup
platform/*/docker-*/Dockerfile
platform/*/docker-*/Dockerfile.cleanup
platform/*/docker-*/Dockerfile-dbg.cleanup

# Autogenerated manifest files
dockers/*/*manifest*
Expand Down
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@
[submodule "src/sonic-dash-api"]
path = src/sonic-dash-api
url = https://github.com/sonic-net/sonic-dash-api.git
[submodule "platform/marvell-arm64/mrvl-prestera"]
path = platform/marvell-arm64/mrvl-prestera
[submodule "platform/marvell/mrvl-prestera"]
path = platform/marvell/mrvl-prestera
url = https://github.com/Marvell-switching/mrvl-prestera.git
[submodule "platform/marvell-arm64/sonic-platform-marvell"]
path = platform/marvell-arm64/sonic-platform-marvell
[submodule "platform/marvell/sonic-platform-marvell"]
path = platform/marvell/sonic-platform-marvell
url = https://github.com/Marvell-switching/sonic-platform-arm64.git
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ make target/sonic-[ASIC_VENDER]-armhf.bin
_example:_

```shell
make configure PLATFORM=marvell-armhf PLATFORM_ARCH=armhf
make configure PLATFORM=marvell PLATFORM_ARCH=armhf
make target/sonic-marvell-armhf.bin
```

Expand All @@ -215,7 +215,7 @@ using cross-compilation, run the following commands:
# Execute make configure once to configure ASIC and ARCH for cross-compilation build

NOJESSIE=1 NOSTRETCH=1 BLDENV=buster CROSS_BLDENV=1 \
make configure PLATFORM=marvell-armhf PLATFORM_ARCH=armhf
make configure PLATFORM=marvell PLATFORM_ARCH=armhf

# Execute Arm32 build using cross-compilation environment

Expand All @@ -234,7 +234,7 @@ make configure PLATFORM=[ASIC_VENDOR] PLATFORM_ARCH=arm64

# example:

make configure PLATFORM=marvell-arm64 PLATFORM_ARCH=arm64
make configure PLATFORM=marvell PLATFORM_ARCH=arm64
```

**NOTE**:
Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,13 @@ stages:
- name: marvell-arm64
pool: sonicbld-arm64
variables:
PLATFORM_NAME: marvell
PLATFORM_ARCH: arm64
- name: marvell-armhf
pool: sonicbld-armhf
timeoutInMinutes: 1200
variables:
PLATFORM_NAME: marvell
PLATFORM_ARCH: armhf
INCLUDE_RESTAPI: y

Expand Down
2 changes: 1 addition & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ if [[ $TARGET_BOOTLOADER == uboot ]]; then
## Overwriting the initrd image with uInitrd
sudo LANG=C chroot $FILESYSTEM_ROOT mv /boot/u${INITRD_FILE} /boot/$INITRD_FILE
else
sudo cp -v $PLATFORM_DIR/${sonic_asic_platform}-${CONFIGURED_ARCH}/sonic_fit.its $FILESYSTEM_ROOT/boot/
sudo cp -v $PLATFORM_DIR/$CONFIGURED_PLATFORM/sonic_fit.its $FILESYSTEM_ROOT/boot/
sudo LANG=C chroot $FILESYSTEM_ROOT mkimage -f /boot/sonic_fit.its /boot/sonic_${CONFIGURED_ARCH}.fit
fi
fi
Expand Down
12 changes: 10 additions & 2 deletions build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ set -x -e
CONFIGURED_ARCH=$([ -f .arch ] && cat .arch || echo amd64)

if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then
. ./onie-image-${CONFIGURED_ARCH}.conf
if [ -r ./platform/${CONFIGURED_PLATFORM}/onie-image-${CONFIGURED_ARCH}.conf ]; then
. ./platform/${CONFIGURED_PLATFORM}/onie-image-${CONFIGURED_ARCH}.conf
else
. ./onie-image-${CONFIGURED_ARCH}.conf
fi
else
. ./onie-image.conf
fi
Expand Down Expand Up @@ -82,10 +86,14 @@ generate_onie_installer_image()
done
done

platform_conf_file="platform/$TARGET_MACHINE/platform_${CONFIGURED_ARCH}.conf"
if [ ! -f $platform_conf_file ]; then
platform_conf_file="platform/$TARGET_MACHINE/platform.conf"
fi
## Generate an ONIE installer image
## Note: Don't leave blank between lines. It is single line command.
./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 \
installer $platform_conf_file $output_file OS $IMAGE_VERSION $ONIE_IMAGE_PART_SIZE \
$INSTALLER_PAYLOAD $SECURE_UPGRADE_SIGNING_CERT $SECURE_UPGRADE_DEV_SIGNING_KEY
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0,12) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4 + 2)) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(12,20) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(20,44) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4 + 2)) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(44,52) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(52,64) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4 + 2)) %}{%- endif %}
{%- endfor %}
{%- endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{%- set default_topo = 't0' %}
{%- include 'buffers_config.j2' %}

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{% if DEVICE_METADATA is defined and 'type' in DEVICE_METADATA['localhost'] and
(DEVICE_METADATA['localhost']['type'] == 'LeafRouter' or DEVICE_METADATA['localhost']['subtype'] == 'DualToR') %}
{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
{% if port in port_names_require_extra_buffer.split(',') %}
"{{ port }}|0-1": {
"profile" : "egress_lossy_profile"
},
"{{ port }}|2-4": {
"profile" : "egress_lossless_profile"
},
"{{ port }}|5": {
"profile" : "egress_lossy_profile"
},
"{{ port }}|6": {
"profile" : "egress_lossless_profile"
},
"{{ port }}|7": {
"profile" : "egress_lossy_profile"
}{% if not loop.last %},{% endif %}

{% else %}
"{{ port }}|0-2": {
"profile" : "egress_lossy_profile"
},
"{{ port }}|3-4": {
"profile" : "egress_lossless_profile"
},
"{{ port }}|5-7": {
"profile" : "egress_lossy_profile"
}{% if not loop.last %},{% endif %}

{% endif %}
{% endfor %}
}
{% endmacro %}
{% endif %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{%- set ingress_lossless_pool_size = '33329088' %}
{%- set egress_lossy_pool_size = '26663272' %}

{%- if ((SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled')) and
((DEVICE_METADATA is defined) and ('localhost' in DEVICE_METADATA) and ('subtype' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['subtype'] == 'DualToR')) %}
{%- set ingress_lossless_pool_size = '33169344' %}
{%- set egress_lossy_pool_size = '26535808' %}
{%- endif %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# name lanes alias index speed
Ethernet0 77,78 Ethernet1/1 1 50000
Ethernet2 79,80 Ethernet1/3 1 50000
Ethernet4 65,66 Ethernet2/1 2 50000
Ethernet6 67,68 Ethernet2/3 2 50000
Ethernet8 85,86 Ethernet3/1 3 50000
Ethernet10 87,88 Ethernet3/3 3 50000
Ethernet12 89,90 Ethernet4/1 4 50000
Ethernet14 91,92 Ethernet4/3 4 50000
Ethernet16 109,110 Ethernet5/1 5 50000
Ethernet18 111,112 Ethernet5/3 5 50000
Ethernet20 97,98 Ethernet6/1 6 50000
Ethernet22 99,100 Ethernet6/3 6 50000
Ethernet24 5,6 Ethernet7/1 7 50000
Ethernet26 7,8 Ethernet7/3 7 50000
Ethernet28 13,14 Ethernet8/1 8 50000
Ethernet30 15,16 Ethernet8/3 8 50000
Ethernet32 25,26 Ethernet9/1 9 50000
Ethernet34 27,28 Ethernet9/3 9 50000
Ethernet36 21,22 Ethernet10/1 10 50000
Ethernet38 23,24 Ethernet10/3 10 50000
Ethernet40 37,38 Ethernet11/1 11 50000
Ethernet42 39,40 Ethernet11/3 11 50000
Ethernet44 45,46 Ethernet12/1 12 50000
Ethernet46 47,48 Ethernet12/3 12 50000
Ethernet48 57,58,59,60 Ethernet13/1 13 100000
Ethernet52 53,54,55,56 Ethernet14/1 14 100000
Ethernet56 117,118,119,120 Ethernet15/1 15 100000
Ethernet60 121,122,123,124 Ethernet16/1 16 100000
Ethernet64 141,142,143,144 Ethernet17/1 17 100000
Ethernet68 133,134,135,136 Ethernet18/1 18 100000
Ethernet72 197,198,199,200 Ethernet19/1 19 100000
Ethernet76 205,206,207,208 Ethernet20/1 20 100000
Ethernet80 217,218 Ethernet21/1 21 50000
Ethernet82 219,220 Ethernet21/3 21 50000
Ethernet84 213,214 Ethernet22/1 22 50000
Ethernet86 215,216 Ethernet22/3 22 50000
Ethernet88 229,230 Ethernet23/1 23 50000
Ethernet90 231,232 Ethernet23/3 23 50000
Ethernet92 237,238 Ethernet24/1 24 50000
Ethernet94 239,240 Ethernet24/3 24 50000
Ethernet96 249,250 Ethernet25/1 25 50000
Ethernet98 251,252 Ethernet25/3 25 50000
Ethernet100 245,246 Ethernet26/1 26 50000
Ethernet102 247,248 Ethernet26/3 26 50000
Ethernet104 149,150 Ethernet27/1 27 50000
Ethernet106 151,152 Ethernet27/3 27 50000
Ethernet108 153,154 Ethernet28/1 28 50000
Ethernet110 155,156 Ethernet28/3 28 50000
Ethernet112 173,174 Ethernet29/1 29 50000
Ethernet114 175,176 Ethernet29/3 29 50000
Ethernet116 161,162 Ethernet30/1 30 50000
Ethernet118 163,164 Ethernet30/3 30 50000
Ethernet120 181,182 Ethernet31/1 31 50000
Ethernet122 183,184 Ethernet31/3 31 50000
Ethernet124 185,186 Ethernet32/1 32 50000
Ethernet126 187,188 Ethernet32/3 32 50000
Ethernet128 69,70 Ethernet33/1 33 50000
Ethernet130 71,72 Ethernet33/3 33 50000
Ethernet132 73,74 Ethernet34/1 34 50000
Ethernet134 75,76 Ethernet34/3 34 50000
Ethernet136 93,94 Ethernet35/1 35 50000
Ethernet138 95,96 Ethernet35/3 35 50000
Ethernet140 81,82 Ethernet36/1 36 50000
Ethernet142 83,84 Ethernet36/3 36 50000
Ethernet144 101,102 Ethernet37/1 37 50000
Ethernet146 103,104 Ethernet37/3 37 50000
Ethernet148 105,106 Ethernet38/1 38 50000
Ethernet150 107,108 Ethernet38/3 38 50000
Ethernet152 9,10 Ethernet39/1 39 50000
Ethernet154 11,12 Ethernet39/3 39 50000
Ethernet156 1,2 Ethernet40/1 40 50000
Ethernet158 3,4 Ethernet40/3 40 50000
Ethernet160 17,18 Ethernet41/1 41 50000
Ethernet162 19,20 Ethernet41/3 41 50000
Ethernet164 29,30 Ethernet42/1 42 50000
Ethernet166 31,32 Ethernet42/3 42 50000
Ethernet168 41,42 Ethernet43/1 43 50000
Ethernet170 43,44 Ethernet43/3 43 50000
Ethernet172 33,34 Ethernet44/1 44 50000
Ethernet174 35,36 Ethernet44/3 44 50000
Ethernet176 49,50,51,52 Ethernet45/1 45 100000
Ethernet180 61,62,63,64 Ethernet46/1 46 100000
Ethernet184 125,126,127,128 Ethernet47/1 47 100000
Ethernet188 113,114,115,116 Ethernet48/1 48 100000
Ethernet192 129,130,131,132 Ethernet49/1 49 100000
Ethernet196 137,138,139,140 Ethernet50/1 50 100000
Ethernet200 201,202,203,204 Ethernet51/1 51 100000
Ethernet204 193,194,195,196 Ethernet52/1 52 100000
Ethernet208 209,210 Ethernet53/1 53 50000
Ethernet210 211,212 Ethernet53/3 53 50000
Ethernet212 221,222 Ethernet54/1 54 50000
Ethernet214 223,224 Ethernet54/3 54 50000
Ethernet216 233,234 Ethernet55/1 55 50000
Ethernet218 235,236 Ethernet55/3 55 50000
Ethernet220 225,226 Ethernet56/1 56 50000
Ethernet222 227,228 Ethernet56/3 56 50000
Ethernet224 241,242 Ethernet57/1 57 50000
Ethernet226 243,244 Ethernet57/3 57 50000
Ethernet228 253,254 Ethernet58/1 58 50000
Ethernet230 255,256 Ethernet58/3 58 50000
Ethernet232 157,158 Ethernet59/1 59 50000
Ethernet234 159,160 Ethernet59/3 59 50000
Ethernet236 145,146 Ethernet60/1 60 50000
Ethernet238 147,148 Ethernet60/3 60 50000
Ethernet240 165,166 Ethernet61/1 61 50000
Ethernet242 167,168 Ethernet61/3 61 50000
Ethernet244 169,170 Ethernet62/1 62 50000
Ethernet246 171,172 Ethernet62/3 62 50000
Ethernet248 189,190 Ethernet63/1 63 50000
Ethernet250 191,192 Ethernet63/3 63 50000
Ethernet252 177,178 Ethernet64/1 64 50000
Ethernet254 179,180 Ethernet64/3 64 50000
Ethernet256 257 Ethernet65 65 10000
Ethernet260 259 Ethernet66 66 10000
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th2-a7260cx3-64-96x50G+16x100G.config.bcm
Loading

0 comments on commit 8f35ba6

Please sign in to comment.