Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mellanox] Change NVIDIA SDK build to cmake method #27

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion platform/mellanox/issu-version.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
ISSU_VERSION_FILE = issu-version
$(ISSU_VERSION_FILE)_SRC_PATH = $(PLATFORM_PATH)/issu-version

$(ISSU_VERSION_FILE)_DEPENDS += $(APPLIBS)
$(ISSU_VERSION_FILE)_DEPENDS += $(SYSSDK)

SONIC_MAKE_FILES += $(ISSU_VERSION_FILE)

Expand Down
30 changes: 0 additions & 30 deletions platform/mellanox/sdk-src/applibs/Makefile

This file was deleted.

29 changes: 0 additions & 29 deletions platform/mellanox/sdk-src/sx-acl-helper/Makefile

This file was deleted.

29 changes: 0 additions & 29 deletions platform/mellanox/sdk-src/sx-complib/Makefile

This file was deleted.

27 changes: 0 additions & 27 deletions platform/mellanox/sdk-src/sx-examples/Makefile

This file was deleted.

27 changes: 0 additions & 27 deletions platform/mellanox/sdk-src/sx-gen-utils/Makefile

This file was deleted.

27 changes: 0 additions & 27 deletions platform/mellanox/sdk-src/sx-hash-calc/Makefile

This file was deleted.

29 changes: 0 additions & 29 deletions platform/mellanox/sdk-src/sx-obj-desc-lib/Makefile

This file was deleted.

29 changes: 0 additions & 29 deletions platform/mellanox/sdk-src/sx-scew/Makefile

This file was deleted.

29 changes: 0 additions & 29 deletions platform/mellanox/sdk-src/sxd-libs/Makefile

This file was deleted.

30 changes: 30 additions & 0 deletions platform/mellanox/sdk-src/sys-sdk/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.ONESHELL:
SHELL = /bin/bash

MAIN_TARGET = sys-sdk_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH).deb
DERIVED_TARGETS = sys-sdk_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH)-dev.deb sys-sdk_1.mlnx.$(MLNX_SDK_DEB_VERSION)_$(CONFIGURED_ARCH)-dbgsym.ddeb

PACKAGE_NAME = sys_sdk

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix comment indent

Copy link
Owner Author

@dprital dprital Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is at the same place as previous SDK make files. Right above the treatment to get the sources so I don't see any issue with it.

rm -rf $(PACKAGE_NAME)-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION)

@echo 'wget -c $(MLNX_SDK_SOURCE_BASE_URL)/$(PACKAGE_NAME)-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION).tar.gz'

wget -c $(MLNX_SDK_SOURCE_BASE_URL)/$(PACKAGE_NAME)-$(MLNX_SDK_VERSION)-$(MLNX_SDK_ISSU_VERSION).tar.gz -O - | tar -xz

# build
rm -rf builds/cmake

cmake -B builds/cmake -DCMAKE_SYSTEM_VERSION=$(KVERSION) -DPYTHON_INTERPRETERS=python3 -DSKIP_UNINSTALL_INSTALL_DEPENDENCY=on -DSKIP_DEPMOD_IN_INSTALL_PHASE=on -DUSE_API_TESTER=OFF -DUSE_KERNEL=OFF -DCMAKE_PROJECT_VERSION=$(MLNX_SDK_DEB_VERSION)

cmake --build builds/cmake -j$(SONIC_CONFIG_MAKE_JOBS)

cd builds/cmake

cpack -G DEB

mv $(DERIVED_TARGETS) $* $(DEST)/

$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)
Loading