Skip to content

Commit

Permalink
Merged PR 7797859: Merge the commits from sonic-net/sonic-buildimage …
Browse files Browse the repository at this point in the history
  • Loading branch information
xumia committed Mar 17, 2023
2 parents ba818f6 + 4269e77 commit b0fd3fc
Show file tree
Hide file tree
Showing 28 changed files with 74 additions and 55 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@
[submodule "src/sonic-telemetry"]
path = src/sonic-telemetry
url = https://github.com/sonic-net/sonic-gnmi
[submodule "Switch-SDK-drivers"]
path = platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers
url = https://github.com/Mellanox/Switch-SDK-drivers
[submodule "src/sonic-ztp"]
path = src/sonic-ztp
url = https://github.com/sonic-net/sonic-ztp
Expand Down
7 changes: 6 additions & 1 deletion dockers/docker-platform-monitor/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ RUN apt-get update && \
i2c-tools \
psmisc \
python3-jsonschema \
libpci3
libpci3 \
pciutils

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

# We install the libpci module in order to be able to do PCI transactions
RUN pip2 install libpci
RUN pip3 install libpci

{% if docker_platform_monitor_debs.strip() -%}
# Copy locally-built Debian package dependencies
{{ copy_files("debs/", docker_platform_monitor_debs.split(' '), "/debs/") }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564
https://github.com/jeroennijhof/pam_tacplus.git==7908a7faa0205beda9ea198bdd3aa37868be6da2
https://github.com/jpirko/libteam.git==61e27812c1074a865d7e1a778c0ce442837c28d7
https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774
https://github.com/sflow/host-sflow==b7d12c7fe18f2c4b2377f1b34c1e848d1a5ea16c
https://github.com/sflow/host-sflow==f1ffaa93b5ef2221ca7299e6db953917fba03b40
https://github.com/sflow/sflowtool==8c914e79ecb7930adcba2e5296041c3f9eb8e450
https://github.com/thom311/libnl==cbafad9ddf24caef5230fef715d34f0539603be0
https://salsa.debian.org/debian/libteam.git==48142125234a665ad5367b724af36a58fb484d3d
https://salsa.debian.org/dhcp-team/isc-dhcp.git==7a6f5a9d178439a56a8eb0cd4446329a8d5631ce
https://salsa.debian.org/kernel-team/ethtool/==b24474c5f4cad2bb690ced33a3c7df397170a699
https://salsa.debian.org/kernel-team/ethtool/==68409b09a969b49a07fbf3930409f155b953434b
https://salsa.debian.org/kernel-team/initramfs-tools.git==40e544e13611c1b2690eb99a8096fc16c1b9c74e
https://salsa.debian.org/sk-guest/monit.git==c9da7ebb1f35dfba17b50b5969a6e75e29cbec0d
https://salsa.debian.org/ssh-team/openssh.git==48770216530d8a0a57f5f1d7cc60addd67d1b549
https://salsa.debian.org/ssh-team/openssh.git==48770216530d8a0a57f5f1d7cc60addd67d1b549
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ipaddress==1.0.23
lxml==4.6.3
lxml==4.9.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
charset-normalizer==3.0.1
charset-normalizer==3.1.0
click==7.0
docker==6.0.1
ijson==2.6.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bitarray==1.5.3
lxml==4.6.3
lxml==4.9.1
requests==2.28.2
urllib3==1.26.14
2 changes: 1 addition & 1 deletion files/build/versions/default/versions-docker
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ arm64:debian:buster==sha256:2d356e1e22c0902f88ef65cb7159ecd5a96feb62345747edfd43
arm64:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be
armhf:arm32v7/debian:buster==sha256:43b845d5864322e89773a602535f5db85debe3356e50488c63dd99bf2cc16899
armhf:debian:buster==sha256:2d356e1e22c0902f88ef65cb7159ecd5a96feb62345747edfd4324b0d83a2923
armhf:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be
armhf:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be
8 changes: 4 additions & 4 deletions files/build/versions/default/versions-git
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
https://chromium.googlesource.com/chromium/tools/depot_tools.git==c962e86f7bafddfc582922dec44cf7a843228abb
https://chromium.googlesource.com/chromium/tools/depot_tools.git==a9a7eecf37db6f89d4e5793826898e171b014e08
https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f
https://github.com/CESNET/libyang.git==d57c8888922d1663508ad0f0a5b66f8ad600276d
https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b
Expand All @@ -9,12 +9,12 @@ https://github.com/lguohan/gnxi.git==f2b11e45b16ab13485ae14933f30c18ee6336499
https://github.com/Marvell-switching/mrvl-prestera.git==21a100e01b2ab00229da35dd178d9b294c66303f
https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774
https://github.com/p4lang/scapy-vxlan.git==85ffe83da156568ee47a0750f638227e6e1d7479
https://github.com/sflow/host-sflow==b7d12c7fe18f2c4b2377f1b34c1e848d1a5ea16c
https://github.com/sflow/host-sflow==f1ffaa93b5ef2221ca7299e6db953917fba03b40
https://github.com/sflow/sflowtool==8c914e79ecb7930adcba2e5296041c3f9eb8e450
https://github.com/thom311/libnl==cbafad9ddf24caef5230fef715d34f0539603be0
https://salsa.debian.org/debian/libteam.git==48142125234a665ad5367b724af36a58fb484d3d
https://salsa.debian.org/dhcp-team/isc-dhcp.git==7a6f5a9d178439a56a8eb0cd4446329a8d5631ce
https://salsa.debian.org/kernel-team/ethtool/==b24474c5f4cad2bb690ced33a3c7df397170a699
https://salsa.debian.org/kernel-team/ethtool/==68409b09a969b49a07fbf3930409f155b953434b
https://salsa.debian.org/kernel-team/initramfs-tools.git==40e544e13611c1b2690eb99a8096fc16c1b9c74e
https://salsa.debian.org/sk-guest/monit.git==c9da7ebb1f35dfba17b50b5969a6e75e29cbec0d
https://salsa.debian.org/ssh-team/openssh.git==48770216530d8a0a57f5f1d7cc60addd67d1b549
https://salsa.debian.org/ssh-team/openssh.git==48770216530d8a0a57f5f1d7cc60addd67d1b549
3 changes: 2 additions & 1 deletion files/build/versions/default/versions-web
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ https://sonicstorage.blob.core.windows.net/debian/pool/main/liby/libyang/libyang
https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg-5.debian.tar.xz==ad957e90207d0669beb2109e4e325def
https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg-5.dsc==2443e4dffbdb020e7ab4f947a7904912
https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg.orig.tar.xz==6391ae27eb1ae34ff5530712bb1c4209
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
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
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
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
Expand All @@ -71,4 +72,4 @@ https://sonicstorage.blob.core.windows.net/packages/redis/redis-tools_6.0.6-1_bp
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
https://storage.googleapis.com/golang/go1.14.2.linux-amd64.tar.gz==856d248e3ea8a287d13e5f6afd086282
https://storage.googleapis.com/golang/go1.14.2.linux-arm64.tar.gz==e5f79b403701e00f20d13f0ea561b064
https://storage.googleapis.com/golang/go1.14.2.linux-armv6l.tar.gz==04467414e783b18de4278e9f24baf4be
https://storage.googleapis.com/golang/go1.14.2.linux-armv6l.tar.gz==04467414e783b18de4278e9f24baf4be
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bitarray==1.5.3
ipaddress==1.0.23
lxml==4.6.3
lxml==4.9.1
natsort==6.2.1
netaddr==0.8.0
pyang==2.5.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ contextlib2==0.6.0.post1
future==0.18.3
importlib-resources==3.3.1
ipaddress==1.0.23
lxml==4.6.3
lxml==4.9.1
natsort==6.2.1
netaddr==0.8.0
pathlib2==2.3.7.post1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ lm-sensors-dbgsym==1:3.5.0-3
make==4.2.1-1.2
openssh-client==1:7.9p1-10+deb10u2
patch==2.7.6-3+deb10u1
pciutils==1:3.5.2-1
psmisc==23.2-1+deb10u1
python==2.7.16-1
python-dev==2.7.16-1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ contextlib2==0.6.0.post1
enum34==1.1.10
functools32==3.2.3.post2
future==0.18.3
guacamole==0.9.2
importlib-resources==3.3.1
ipaddress==1.0.23
jinja2==2.11.3
jsonschema==2.6.0
lxml==4.6.3
libpci==0.2
lxml==4.9.1
markupsafe==1.1.1
natsort==6.2.1
netaddr==0.8.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
guacamole==0.9.2
jsonschema==2.6.0
libpci==0.2
python_sdk_api==4.5.3196
thrift==0.13.0
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
attrs==22.2.0
certifi==2017.4.17
charset-normalizer==3.0.1
charset-normalizer==3.1.0
click==8.1.3
clickclick==20.10.2
connexion==2.7.0
Expand All @@ -19,7 +19,7 @@ openapi-schema-validator==0.4.3
openapi-spec-validator==0.5.5
pathable==0.4.3
pkgutil_resolve_name==1.3.10
protobuf==4.22.0
protobuf==4.22.1
pyrsistent==0.19.3
python-dateutil==2.6.0
requests==2.28.2
Expand Down
2 changes: 1 addition & 1 deletion files/build/versions/dockers/docker-sonic-vs/versions-py3
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
certifi==2022.12.7
charset-normalizer==3.0.1
charset-normalizer==3.1.0
click==7.0
idna==3.4
ijson==2.6.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ libdbi1==0.9.0-5
libdbus-1-3==1.12.24-0+deb10u1
libdbus-1-dev==1.12.24-0+deb10u1
libdconf1==0.30.1-2
libde265-0==1.0.3-1+deb10u3
libde265-0==1.0.11-0+deb10u4
libdevel-callchecker-perl==0.008-1
libdevel-caller-perl==2.06-2+b1
libdevel-globaldestruction-perl==0.14-1
Expand Down
4 changes: 2 additions & 2 deletions files/build/versions/dockers/sonic-slave-buster/versions-git
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
https://chromium.googlesource.com/chromium/tools/depot_tools.git==c962e86f7bafddfc582922dec44cf7a843228abb
https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f
https://chromium.googlesource.com/chromium/tools/depot_tools.git==a9a7eecf37db6f89d4e5793826898e171b014e08
https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f
4 changes: 2 additions & 2 deletions files/build/versions/dockers/sonic-slave-stretch/versions-git
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
https://chromium.googlesource.com/chromium/tools/depot_tools.git==c962e86f7bafddfc582922dec44cf7a843228abb
https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f
https://chromium.googlesource.com/chromium/tools/depot_tools.git==a9a7eecf37db6f89d4e5793826898e171b014e08
https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f
2 changes: 1 addition & 1 deletion files/build/versions/host-image/versions-py2
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ipaddr==2.2.0
ipaddress==1.0.23
jinja2==2.11.3
jsonschema==2.6.0
lxml==4.6.3
lxml==4.9.1
markupsafe==1.1.1
natsort==6.2.1
netaddr==0.8.0
Expand Down
4 changes: 2 additions & 2 deletions files/build/versions/host-image/versions-py3
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ azure-storage==0.36.0
bitarray==1.5.3
certifi==2022.12.7
cffi==1.15.1
charset-normalizer==3.0.1
charset-normalizer==3.1.0
click==7.0
cryptography==39.0.2
docker==4.3.1
Expand All @@ -15,7 +15,7 @@ j2cli==0.3.10
jinja2==3.1.2
jsondiff==2.0.0
jsonschema==2.6.0
lxml==4.6.3
lxml==4.9.1
m2crypto==0.38.0
markupsafe==2.1.2
natsort==6.2.1
Expand Down
8 changes: 4 additions & 4 deletions platform/marvell-armhf/platform.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ echo "Preparing for installation ... "

# global defines
kernel_addr=0x1100000
fdt_addr=0x1000000
fdt_high=0x10fffff
initrd_addr=0x2000000
fdt_addr=0x2800000
fdt_high=0x28fffff
initrd_addr=0x2900000

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

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
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
Expand Down
9 changes: 6 additions & 3 deletions platform/mellanox/fw.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ MLNX_FW_BASE_PATH = $(MLNX_SDK_BASE_PATH)
# Place an URL here to FW if you want to download FW instead
MLNX_FW_BASE_URL =

ifneq ($(MLNX_FW_BASE_URL), )
FW_FROM_URL = y
else
FW_FROM_URL = n

MLNX_FW_ASSETS_RELEASE_TAG = fw-2010.3196
MLNX_FW_ASSETS_URL = $(MLNX_ASSETS_GITHUB_URL)/releases/download/$(MLNX_FW_ASSETS_RELEASE_TAG)

ifeq ($(MLNX_FW_BASE_URL), )
MLNX_FW_BASE_URL = $(MLNX_FW_ASSETS_URL)
endif

MLNX_SPC_FW_VERSION = 13.2010.3196
Expand Down
10 changes: 6 additions & 4 deletions platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@
REGISTER_NUM = 1
DEVICE_ID = 1
SWITCH_ID = 0
SX_PORT_ATTR_ARR_SIZE = 64

PMAOS_ASE = 1
PMAOS_EE = 1
Expand Down Expand Up @@ -1978,14 +1977,17 @@ def set_port_admin_status_by_log_port(self, log_port, admin_status):

def get_logical_ports(self):
# Get all the ports related to the sfp, if port admin status is up, put it to list
port_attributes_list = new_sx_port_attributes_t_arr(SX_PORT_ATTR_ARR_SIZE)
port_cnt_p = new_uint32_t_p()
uint32_t_p_assign(port_cnt_p, SX_PORT_ATTR_ARR_SIZE)
uint32_t_p_assign(port_cnt_p, 0)
rc = sx_api_port_device_get(self.sdk_handle, DEVICE_ID, SWITCH_ID, None, port_cnt_p)
assert rc == SX_STATUS_SUCCESS, "sx_api_port_device_get failed, rc = %d" % rc
port_cnt = uint32_t_p_value(port_cnt_p)
port_attributes_list = new_sx_port_attributes_t_arr(port_cnt)


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

port_cnt = uint32_t_p_value(port_cnt_p)
log_port_list = []
for i in range(0, port_cnt):
port_attributes = sx_port_attributes_t_arr_getitem(port_attributes_list, i)
Expand Down
14 changes: 11 additions & 3 deletions platform/mellanox/sdk-src/sx-kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ MAIN_TARGET = sx-kernel_1.mlnx.$(MLNX_SDK_DEB_VERSION)_amd64.deb
DERIVED_TARGETS = sx-kernel-dev_1.mlnx.$(MLNX_SDK_DEB_VERSION)_amd64.deb
PACKAGE_NAME = sx_kernel

MLNX_SX_KERNEL_GITHUB_URL_BASE = https://github.com/Mellanox/Spectrum-SDK-Drivers/archive/refs/heads

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# get sources

Expand All @@ -13,9 +15,15 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
wget -c $(MLNX_SDK_SOURCE_BASE_URL)/$(PACKAGE_NAME)-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION).tar.gz -O - | tar -xz
pushd sx_kernel-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION)
else
pushd Switch-SDK-drivers
git reset --hard
git clean -xfd
rm -rf Spectrum-SDK-Drivers-$(MLNX_SDK_VERSION)
wget -c $(MLNX_SX_KERNEL_GITHUB_URL_BASE)/$(MLNX_SDK_VERSION).zip
unzip $(MLNX_SDK_VERSION).zip
rm -rf $(MLNX_SDK_VERSION).zip

pushd Spectrum-SDK-Drivers-$(MLNX_SDK_VERSION)
ln -s ./sx_scripts/Makefile ./Makefile
ln -s ./sx_scripts/makefile ./makefile
ln -s ./sx_scripts/configure ./configure
fi

# build
Expand Down
1 change: 0 additions & 1 deletion platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers
Submodule Switch-SDK-drivers deleted from a12968
17 changes: 8 additions & 9 deletions platform/mellanox/sdk.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
MLNX_SDK_BASE_PATH = $(PLATFORM_PATH)/sdk-src/sx-kernel/Switch-SDK-drivers/bin/
MLNX_SDK_PKG_BASE_PATH = $(MLNX_SDK_BASE_PATH)/$(BLDENV)/$(CONFIGURED_ARCH)/
MLNX_SDK_VERSION = 4.5.3196
MLNX_SDK_ISSU_VERSION = 101

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

# Place here URL where SDK sources exist
Expand All @@ -14,7 +15,7 @@ else
SDK_FROM_SRC = n
endif

export MLNX_SDK_SOURCE_BASE_URL MLNX_SDK_VERSION MLNX_SDK_ISSU_VERSION MLNX_SDK_DEB_VERSION
export MLNX_SDK_SOURCE_BASE_URL MLNX_SDK_VERSION MLNX_SDK_ISSU_VERSION MLNX_SDK_DEB_VERSION MLNX_ASSETS_GITHUB_URL

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

define make_path
$(1)_PATH = $(MLNX_SDK_PKG_BASE_PATH)
define make_url
$(1)_URL = $(MLNX_SDK_ASSETS_URL)/$(1)

endef

$(eval $(foreach deb,$(MLNX_SDK_DEBS),$(call make_path,$(deb))))
$(eval $(foreach deb,$(MLNX_SDK_RDEBS),$(call make_path,$(deb))))
$(eval $(foreach deb,$(PYTHON_SDK_API) $(SX_KERNEL) $(SX_KERNEL_DEV),$(call make_path,$(deb))))
$(eval $(foreach deb,$(MLNX_SDK_DEBS) $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API),$(call make_url,$(deb))))

SONIC_MAKE_DEBS += $(SX_KERNEL)

ifeq ($(SDK_FROM_SRC), y)
SONIC_MAKE_DEBS += $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API)
else
SONIC_COPY_DEBS += $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API)
SONIC_ONLINE_DEBS += $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API)
endif

mlnx-sdk-packages: $(addprefix $(DEBS_PATH)/, $(MLNX_SDK_RDEBS) $(PYTHON_SDK_API) $(SX_KERNEL))
Expand Down
2 changes: 1 addition & 1 deletion src/sonic-restapi

0 comments on commit b0fd3fc

Please sign in to comment.