Skip to content

Commit b0fd3fc

Browse files
committed
2 parents ba818f6 + 4269e77 commit b0fd3fc

File tree

28 files changed

+74
-55
lines changed

28 files changed

+74
-55
lines changed

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@
7373
[submodule "src/sonic-telemetry"]
7474
path = src/sonic-telemetry
7575
url = https://github.com/sonic-net/sonic-gnmi
76-
[submodule "Switch-SDK-drivers"]
77-
path = platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers
78-
url = https://github.com/Mellanox/Switch-SDK-drivers
7976
[submodule "src/sonic-ztp"]
8077
path = src/sonic-ztp
8178
url = https://github.com/sonic-net/sonic-ztp

dockers/docker-platform-monitor/Dockerfile.j2

+6-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ RUN apt-get update && \
2727
i2c-tools \
2828
psmisc \
2929
python3-jsonschema \
30-
libpci3
30+
libpci3 \
31+
pciutils
3132

3233
# On Arista devices, the sonic_platform wheel is not installed in the container.
3334
# Instead, the installation directory is mounted from the host OS. However, this method
@@ -43,6 +44,10 @@ RUN pip2 install enum34
4344
RUN pip2 install thrift==0.13.0
4445
RUN pip3 install thrift==0.13.0
4546

47+
# We install the libpci module in order to be able to do PCI transactions
48+
RUN pip2 install libpci
49+
RUN pip3 install libpci
50+
4651
{% if docker_platform_monitor_debs.strip() -%}
4752
# Copy locally-built Debian package dependencies
4853
{{ copy_files("debs/", docker_platform_monitor_debs.split(' '), "/debs/") }}

files/build/versions/build/build-sonic-slave-buster/versions-git

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564
33
https://github.com/jeroennijhof/pam_tacplus.git==7908a7faa0205beda9ea198bdd3aa37868be6da2
44
https://github.com/jpirko/libteam.git==61e27812c1074a865d7e1a778c0ce442837c28d7
55
https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774
6-
https://github.com/sflow/host-sflow==b7d12c7fe18f2c4b2377f1b34c1e848d1a5ea16c
6+
https://github.com/sflow/host-sflow==f1ffaa93b5ef2221ca7299e6db953917fba03b40
77
https://github.com/sflow/sflowtool==8c914e79ecb7930adcba2e5296041c3f9eb8e450
88
https://github.com/thom311/libnl==cbafad9ddf24caef5230fef715d34f0539603be0
99
https://salsa.debian.org/debian/libteam.git==48142125234a665ad5367b724af36a58fb484d3d
1010
https://salsa.debian.org/dhcp-team/isc-dhcp.git==7a6f5a9d178439a56a8eb0cd4446329a8d5631ce
11-
https://salsa.debian.org/kernel-team/ethtool/==b24474c5f4cad2bb690ced33a3c7df397170a699
11+
https://salsa.debian.org/kernel-team/ethtool/==68409b09a969b49a07fbf3930409f155b953434b
1212
https://salsa.debian.org/kernel-team/initramfs-tools.git==40e544e13611c1b2690eb99a8096fc16c1b9c74e
1313
https://salsa.debian.org/sk-guest/monit.git==c9da7ebb1f35dfba17b50b5969a6e75e29cbec0d
14-
https://salsa.debian.org/ssh-team/openssh.git==48770216530d8a0a57f5f1d7cc60addd67d1b549
14+
https://salsa.debian.org/ssh-team/openssh.git==48770216530d8a0a57f5f1d7cc60addd67d1b549
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
ipaddress==1.0.23
2-
lxml==4.6.3
2+
lxml==4.9.1

files/build/versions/build/build-sonic-slave-buster/versions-py3

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
charset-normalizer==3.0.1
1+
charset-normalizer==3.1.0
22
click==7.0
33
docker==6.0.1
44
ijson==2.6.1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
bitarray==1.5.3
2-
lxml==4.6.3
2+
lxml==4.9.1
33
requests==2.28.2
44
urllib3==1.26.14

files/build/versions/default/versions-docker

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ arm64:debian:buster==sha256:2d356e1e22c0902f88ef65cb7159ecd5a96feb62345747edfd43
77
arm64:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be
88
armhf:arm32v7/debian:buster==sha256:43b845d5864322e89773a602535f5db85debe3356e50488c63dd99bf2cc16899
99
armhf:debian:buster==sha256:2d356e1e22c0902f88ef65cb7159ecd5a96feb62345747edfd4324b0d83a2923
10-
armhf:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be
10+
armhf:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
https://chromium.googlesource.com/chromium/tools/depot_tools.git==c962e86f7bafddfc582922dec44cf7a843228abb
1+
https://chromium.googlesource.com/chromium/tools/depot_tools.git==a9a7eecf37db6f89d4e5793826898e171b014e08
22
https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f
33
https://github.com/CESNET/libyang.git==d57c8888922d1663508ad0f0a5b66f8ad600276d
44
https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b
@@ -9,12 +9,12 @@ https://github.com/lguohan/gnxi.git==f2b11e45b16ab13485ae14933f30c18ee6336499
99
https://github.com/Marvell-switching/mrvl-prestera.git==21a100e01b2ab00229da35dd178d9b294c66303f
1010
https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774
1111
https://github.com/p4lang/scapy-vxlan.git==85ffe83da156568ee47a0750f638227e6e1d7479
12-
https://github.com/sflow/host-sflow==b7d12c7fe18f2c4b2377f1b34c1e848d1a5ea16c
12+
https://github.com/sflow/host-sflow==f1ffaa93b5ef2221ca7299e6db953917fba03b40
1313
https://github.com/sflow/sflowtool==8c914e79ecb7930adcba2e5296041c3f9eb8e450
1414
https://github.com/thom311/libnl==cbafad9ddf24caef5230fef715d34f0539603be0
1515
https://salsa.debian.org/debian/libteam.git==48142125234a665ad5367b724af36a58fb484d3d
1616
https://salsa.debian.org/dhcp-team/isc-dhcp.git==7a6f5a9d178439a56a8eb0cd4446329a8d5631ce
17-
https://salsa.debian.org/kernel-team/ethtool/==b24474c5f4cad2bb690ced33a3c7df397170a699
17+
https://salsa.debian.org/kernel-team/ethtool/==68409b09a969b49a07fbf3930409f155b953434b
1818
https://salsa.debian.org/kernel-team/initramfs-tools.git==40e544e13611c1b2690eb99a8096fc16c1b9c74e
1919
https://salsa.debian.org/sk-guest/monit.git==c9da7ebb1f35dfba17b50b5969a6e75e29cbec0d
20-
https://salsa.debian.org/ssh-team/openssh.git==48770216530d8a0a57f5f1d7cc60addd67d1b549
20+
https://salsa.debian.org/ssh-team/openssh.git==48770216530d8a0a57f5f1d7cc60addd67d1b549

files/build/versions/default/versions-web

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ https://sonicstorage.blob.core.windows.net/debian/pool/main/liby/libyang/libyang
4949
https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg-5.debian.tar.xz==ad957e90207d0669beb2109e4e325def
5050
https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg-5.dsc==2443e4dffbdb020e7ab4f947a7904912
5151
https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg.orig.tar.xz==6391ae27eb1ae34ff5530712bb1c4209
52+
https://sonicstorage.blob.core.windows.net/packages/20190307/dsserve?sv=2015-04-05&sr=b&sig=lk7BH3DtW%2F5ehc0Rkqfga%2BUCABI0UzQmDamBsZH9K6w%3D&se=2038-05-06T22%3A34%3A45Z&sp=r==f9d4b815ebb9be9f755dedca8a51170d
5253
https://sonicstorage.blob.core.windows.net/packages/cmake/cmake-data_3.13.2-1_bpo9%2B1_all.deb?st=2020-03-27T02%3A22%3A24Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=Xby%2Bm3OZOjPB%2FSlDbHD65yDcPzAgoys%2FA3vK8RB4BzA%3D==147cf42f3a68f6d6f1e53d95a599a1af
5354
https://sonicstorage.blob.core.windows.net/packages/cmake/cmake_3.13.2-1_bpo9%2B1_amd64.deb?st=2020-03-27T02%3A27%3A21Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=4MvmmDBQuicFEJYakLm7xCNU19yJ8GIP4ankFSnITKY%3D==e75c741e8b6918b8f03625e456fa0275
5455
https://sonicstorage.blob.core.windows.net/packages/cmake/cmake_3.13.2-1_bpo9%2B1_arm64.deb?st=2020-03-27T02%3A28%3A38Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=rrHMkLi29aI8yH6s52ILCY8VcEbNFrzYT2DmC5RwOgs%3D==9bcc989e6ed168717f67c07e79177d4a
@@ -71,4 +72,4 @@ https://sonicstorage.blob.core.windows.net/packages/redis/redis-tools_6.0.6-1_bp
7172
https://sonicstorage.blob.core.windows.net/packages/redis/redis-tools_6.0.6-1~bpo10+1_amd64.deb?sv=2015-04-05&sr=b&sig=73zbmjkf3pi%2Bn0R8Hy7CWT2EUvOAyzM5aLYJWCLySGM%3D&se=2030-09-06T19%3A44%3A59Z&sp=r==2d58c3c3358290c04d5e0ba70f297f18
7273
https://storage.googleapis.com/golang/go1.14.2.linux-amd64.tar.gz==856d248e3ea8a287d13e5f6afd086282
7374
https://storage.googleapis.com/golang/go1.14.2.linux-arm64.tar.gz==e5f79b403701e00f20d13f0ea561b064
74-
https://storage.googleapis.com/golang/go1.14.2.linux-armv6l.tar.gz==04467414e783b18de4278e9f24baf4be
75+
https://storage.googleapis.com/golang/go1.14.2.linux-armv6l.tar.gz==04467414e783b18de4278e9f24baf4be

files/build/versions/dockers/docker-config-engine-buster/versions-py3

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
bitarray==1.5.3
22
ipaddress==1.0.23
3-
lxml==4.6.3
3+
lxml==4.9.1
44
natsort==6.2.1
55
netaddr==0.8.0
66
pyang==2.5.3

files/build/versions/dockers/docker-config-engine-stretch/versions-py2

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ contextlib2==0.6.0.post1
33
future==0.18.3
44
importlib-resources==3.3.1
55
ipaddress==1.0.23
6-
lxml==4.6.3
6+
lxml==4.9.1
77
natsort==6.2.1
88
netaddr==0.8.0
99
pathlib2==2.3.7.post1

files/build/versions/dockers/docker-platform-monitor/versions-deb-buster

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ lm-sensors-dbgsym==1:3.5.0-3
102102
make==4.2.1-1.2
103103
openssh-client==1:7.9p1-10+deb10u2
104104
patch==2.7.6-3+deb10u1
105+
pciutils==1:3.5.2-1
105106
psmisc==23.2-1+deb10u1
106107
python==2.7.16-1
107108
python-dev==2.7.16-1

files/build/versions/dockers/docker-platform-monitor/versions-py2

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ contextlib2==0.6.0.post1
33
enum34==1.1.10
44
functools32==3.2.3.post2
55
future==0.18.3
6+
guacamole==0.9.2
67
importlib-resources==3.3.1
78
ipaddress==1.0.23
89
jinja2==2.11.3
910
jsonschema==2.6.0
10-
lxml==4.6.3
11+
libpci==0.2
12+
lxml==4.9.1
1113
markupsafe==1.1.1
1214
natsort==6.2.1
1315
netaddr==0.8.0
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
guacamole==0.9.2
12
jsonschema==2.6.0
3+
libpci==0.2
24
python_sdk_api==4.5.3196
35
thrift==0.13.0

files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
attrs==22.2.0
22
certifi==2017.4.17
3-
charset-normalizer==3.0.1
3+
charset-normalizer==3.1.0
44
click==8.1.3
55
clickclick==20.10.2
66
connexion==2.7.0
@@ -19,7 +19,7 @@ openapi-schema-validator==0.4.3
1919
openapi-spec-validator==0.5.5
2020
pathable==0.4.3
2121
pkgutil_resolve_name==1.3.10
22-
protobuf==4.22.0
22+
protobuf==4.22.1
2323
pyrsistent==0.19.3
2424
python-dateutil==2.6.0
2525
requests==2.28.2

files/build/versions/dockers/docker-sonic-vs/versions-py3

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
certifi==2022.12.7
2-
charset-normalizer==3.0.1
2+
charset-normalizer==3.1.0
33
click==7.0
44
idna==3.4
55
ijson==2.6.1

files/build/versions/dockers/sonic-slave-buster/versions-deb-buster

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ libdbi1==0.9.0-5
413413
libdbus-1-3==1.12.24-0+deb10u1
414414
libdbus-1-dev==1.12.24-0+deb10u1
415415
libdconf1==0.30.1-2
416-
libde265-0==1.0.3-1+deb10u3
416+
libde265-0==1.0.11-0+deb10u4
417417
libdevel-callchecker-perl==0.008-1
418418
libdevel-caller-perl==2.06-2+b1
419419
libdevel-globaldestruction-perl==0.14-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
https://chromium.googlesource.com/chromium/tools/depot_tools.git==c962e86f7bafddfc582922dec44cf7a843228abb
2-
https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f
1+
https://chromium.googlesource.com/chromium/tools/depot_tools.git==a9a7eecf37db6f89d4e5793826898e171b014e08
2+
https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
https://chromium.googlesource.com/chromium/tools/depot_tools.git==c962e86f7bafddfc582922dec44cf7a843228abb
2-
https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f
1+
https://chromium.googlesource.com/chromium/tools/depot_tools.git==a9a7eecf37db6f89d4e5793826898e171b014e08
2+
https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f

files/build/versions/host-image/versions-py2

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ipaddr==2.2.0
88
ipaddress==1.0.23
99
jinja2==2.11.3
1010
jsonschema==2.6.0
11-
lxml==4.6.3
11+
lxml==4.9.1
1212
markupsafe==1.1.1
1313
natsort==6.2.1
1414
netaddr==0.8.0

files/build/versions/host-image/versions-py3

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ azure-storage==0.36.0
44
bitarray==1.5.3
55
certifi==2022.12.7
66
cffi==1.15.1
7-
charset-normalizer==3.0.1
7+
charset-normalizer==3.1.0
88
click==7.0
99
cryptography==39.0.2
1010
docker==4.3.1
@@ -15,7 +15,7 @@ j2cli==0.3.10
1515
jinja2==3.1.2
1616
jsondiff==2.0.0
1717
jsonschema==2.6.0
18-
lxml==4.6.3
18+
lxml==4.9.1
1919
m2crypto==0.38.0
2020
markupsafe==2.1.2
2121
natsort==6.2.1

platform/marvell-armhf/platform.conf

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ echo "Preparing for installation ... "
66

77
# global defines
88
kernel_addr=0x1100000
9-
fdt_addr=0x1000000
10-
fdt_high=0x10fffff
11-
initrd_addr=0x2000000
9+
fdt_addr=0x2800000
10+
fdt_high=0x28fffff
11+
initrd_addr=0x2900000
1212

1313
kernel_fname="/boot/vmlinuz-4.19.0-12-2-armmp"
1414
initrd_fname="/boot/initrd.img-4.19.0-12-2-armmp"
@@ -175,7 +175,7 @@ prepare_boot_menu() {
175175
BOOT3='echo " > Boot3: ONIE - run onie_nand_boot";echo;'
176176
fi
177177
BORDER='echo "---------------------------------------------------";echo;'
178-
fw_setenv ${FW_ARG} print_menu $BORDER $BOOT1 $BOOT2 $BOOT3 $BORDER > /dev/null
178+
fw_setenv ${FW_ARG} print_menu "$BORDER $BOOT1 $BOOT2 $BOOT3 $BORDER" > /dev/null
179179

180180
fw_setenv ${FW_ARG} linuxargs "net.ifnames=0 loopfstype=squashfs loop=$image_dir/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG_SIZE loglevel=4" > /dev/null
181181
fw_setenv ${FW_ARG} linuxargs_old "net.ifnames=0 loopfstype=squashfs loop=$image_dir_old/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG_SIZE loglevel=4" > /dev/null

platform/mellanox/fw.mk

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ MLNX_FW_BASE_PATH = $(MLNX_SDK_BASE_PATH)
55
# Place an URL here to FW if you want to download FW instead
66
MLNX_FW_BASE_URL =
77

8-
ifneq ($(MLNX_FW_BASE_URL), )
98
FW_FROM_URL = y
10-
else
11-
FW_FROM_URL = n
9+
10+
MLNX_FW_ASSETS_RELEASE_TAG = fw-2010.3196
11+
MLNX_FW_ASSETS_URL = $(MLNX_ASSETS_GITHUB_URL)/releases/download/$(MLNX_FW_ASSETS_RELEASE_TAG)
12+
13+
ifeq ($(MLNX_FW_BASE_URL), )
14+
MLNX_FW_BASE_URL = $(MLNX_FW_ASSETS_URL)
1215
endif
1316

1417
MLNX_SPC_FW_VERSION = 13.2010.3196

platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@
263263
REGISTER_NUM = 1
264264
DEVICE_ID = 1
265265
SWITCH_ID = 0
266-
SX_PORT_ATTR_ARR_SIZE = 64
267266

268267
PMAOS_ASE = 1
269268
PMAOS_EE = 1
@@ -1978,14 +1977,17 @@ def set_port_admin_status_by_log_port(self, log_port, admin_status):
19781977

19791978
def get_logical_ports(self):
19801979
# Get all the ports related to the sfp, if port admin status is up, put it to list
1981-
port_attributes_list = new_sx_port_attributes_t_arr(SX_PORT_ATTR_ARR_SIZE)
19821980
port_cnt_p = new_uint32_t_p()
1983-
uint32_t_p_assign(port_cnt_p, SX_PORT_ATTR_ARR_SIZE)
1981+
uint32_t_p_assign(port_cnt_p, 0)
1982+
rc = sx_api_port_device_get(self.sdk_handle, DEVICE_ID, SWITCH_ID, None, port_cnt_p)
1983+
assert rc == SX_STATUS_SUCCESS, "sx_api_port_device_get failed, rc = %d" % rc
1984+
port_cnt = uint32_t_p_value(port_cnt_p)
1985+
port_attributes_list = new_sx_port_attributes_t_arr(port_cnt)
1986+
19841987

19851988
rc = sx_api_port_device_get(self.sdk_handle, DEVICE_ID , SWITCH_ID, port_attributes_list, port_cnt_p)
19861989
assert rc == SX_STATUS_SUCCESS, "sx_api_port_device_get failed, rc = %d" % rc
19871990

1988-
port_cnt = uint32_t_p_value(port_cnt_p)
19891991
log_port_list = []
19901992
for i in range(0, port_cnt):
19911993
port_attributes = sx_port_attributes_t_arr_getitem(port_attributes_list, i)

platform/mellanox/sdk-src/sx-kernel/Makefile

+11-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ MAIN_TARGET = sx-kernel_1.mlnx.$(MLNX_SDK_DEB_VERSION)_amd64.deb
55
DERIVED_TARGETS = sx-kernel-dev_1.mlnx.$(MLNX_SDK_DEB_VERSION)_amd64.deb
66
PACKAGE_NAME = sx_kernel
77

8+
MLNX_SX_KERNEL_GITHUB_URL_BASE = https://github.com/Mellanox/Spectrum-SDK-Drivers/archive/refs/heads
9+
810
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
911
# get sources
1012

@@ -13,9 +15,15 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
1315
wget -c $(MLNX_SDK_SOURCE_BASE_URL)/$(PACKAGE_NAME)-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION).tar.gz -O - | tar -xz
1416
pushd sx_kernel-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION)
1517
else
16-
pushd Switch-SDK-drivers
17-
git reset --hard
18-
git clean -xfd
18+
rm -rf Spectrum-SDK-Drivers-$(MLNX_SDK_VERSION)
19+
wget -c $(MLNX_SX_KERNEL_GITHUB_URL_BASE)/$(MLNX_SDK_VERSION).zip
20+
unzip $(MLNX_SDK_VERSION).zip
21+
rm -rf $(MLNX_SDK_VERSION).zip
22+
23+
pushd Spectrum-SDK-Drivers-$(MLNX_SDK_VERSION)
24+
ln -s ./sx_scripts/Makefile ./Makefile
25+
ln -s ./sx_scripts/makefile ./makefile
26+
ln -s ./sx_scripts/configure ./configure
1927
fi
2028

2129
# build
This file was deleted.

platform/mellanox/sdk.mk

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
MLNX_SDK_BASE_PATH = $(PLATFORM_PATH)/sdk-src/sx-kernel/Switch-SDK-drivers/bin/
2-
MLNX_SDK_PKG_BASE_PATH = $(MLNX_SDK_BASE_PATH)/$(BLDENV)/$(CONFIGURED_ARCH)/
31
MLNX_SDK_VERSION = 4.5.3196
42
MLNX_SDK_ISSU_VERSION = 101
53

4+
MLNX_ASSETS_GITHUB_URL = https://github.com/Mellanox/Spectrum-SDK-Drivers-SONiC-Bins
5+
MLNX_SDK_ASSETS_RELEASE_TAG = sdk-$(MLNX_SDK_VERSION)-$(BLDENV)-$(CONFIGURED_ARCH)
6+
MLNX_SDK_ASSETS_URL = $(MLNX_ASSETS_GITHUB_URL)/releases/download/$(MLNX_SDK_ASSETS_RELEASE_TAG)
67
MLNX_SDK_DEB_VERSION = $(subst -,.,$(subst _,.,$(MLNX_SDK_VERSION)))
78

89
# Place here URL where SDK sources exist
@@ -14,7 +15,7 @@ else
1415
SDK_FROM_SRC = n
1516
endif
1617

17-
export MLNX_SDK_SOURCE_BASE_URL MLNX_SDK_VERSION MLNX_SDK_ISSU_VERSION MLNX_SDK_DEB_VERSION
18+
export MLNX_SDK_SOURCE_BASE_URL MLNX_SDK_VERSION MLNX_SDK_ISSU_VERSION MLNX_SDK_DEB_VERSION MLNX_ASSETS_GITHUB_URL
1819

1920
MLNX_SDK_RDEBS += $(APPLIBS) $(IPROUTE2_MLNX) $(SX_COMPLIB) $(SX_EXAMPLES) \
2021
$(SX_GEN_UTILS) $(SX_SCEW) $(SXD_LIBS) $(WJH_LIBS) $(SX_ACL_HELPER)
@@ -136,21 +137,19 @@ $(SX_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/sdk-src/sx-kernel
136137
SX_KERNEL_DEV = sx-kernel-dev_1.mlnx.$(MLNX_SDK_DEB_VERSION)_amd64.deb
137138
$(eval $(call add_derived_package,$(SX_KERNEL),$(SX_KERNEL_DEV)))
138139

139-
define make_path
140-
$(1)_PATH = $(MLNX_SDK_PKG_BASE_PATH)
140+
define make_url
141+
$(1)_URL = $(MLNX_SDK_ASSETS_URL)/$(1)
141142

142143
endef
143144

144-
$(eval $(foreach deb,$(MLNX_SDK_DEBS),$(call make_path,$(deb))))
145-
$(eval $(foreach deb,$(MLNX_SDK_RDEBS),$(call make_path,$(deb))))
146-
$(eval $(foreach deb,$(PYTHON_SDK_API) $(SX_KERNEL) $(SX_KERNEL_DEV),$(call make_path,$(deb))))
145+
$(eval $(foreach deb,$(MLNX_SDK_DEBS) $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API),$(call make_url,$(deb))))
147146

148147
SONIC_MAKE_DEBS += $(SX_KERNEL)
149148

150149
ifeq ($(SDK_FROM_SRC), y)
151150
SONIC_MAKE_DEBS += $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API)
152151
else
153-
SONIC_COPY_DEBS += $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API)
152+
SONIC_ONLINE_DEBS += $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API)
154153
endif
155154

156155
mlnx-sdk-packages: $(addprefix $(DEBS_PATH)/, $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API) $(SX_KERNEL))

0 commit comments

Comments
 (0)