sonic-buildimage/platform/marvell-arm64/sonic-platform-nokia/debian/rules
Pavan Naregundi fdf54a01cc
[Marvell-arm64] Support lazy install of sdk drivers (#17135)
* Support lazy install of sdk drivers

This patch adds support for lazy install of Marvell prestera SDK
drivers for platform-nokia. Lazy install for drivers is added as
updated sdk driver needs to classify the drivers required for platform
during compile time. SDK drivers and platform files are now fetched
from a submodule(mrvl-prestera).

Additionaly, DTB required for sonic_fit creation during compile time
is sourced from sonic-linux-kernel.

Signed-off-by: Pavan Naregundi <pnaregundi@marvell.com>

* Add hugepage cmdline agrument

Updated sdk & driver requries hugepage to be reserved during kernel
boot. These kernel command line agrument are passed from installer.conf
in device folder.

Signed-off-by: Pavan Naregundi <pnaregundi@marvell.com>

* Update SAI deb to 1.12.0-3

Signed-off-by: Pavan Naregundi <pnaregundi@marvell.com>

---------

Signed-off-by: Pavan Naregundi <pnaregundi@marvell.com>
2023-11-16 21:24:53 +08:00

85 lines
2.6 KiB
Makefile
Executable File

#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
include /usr/share/dpkg/pkg-info.mk
#--------------------------------------------------------
PACKAGE_PRE_NAME := sonic-platform-nokia
ifneq ($(CROSS_BUILD_ENVIRON), y)
KVERSION ?= $(shell uname -r)
endif
KERNEL_SRC := /lib/modules/$(KVERSION)
INSTALL_MOD_DIR := kernel/extra/
MOD_SRC_DIR:= $(shell pwd)
MODULE_DIRS:= 7215
UTILS_DIR := utils
MODULE_DIR:= modules
MRVL_MODULE_DIR:= mrvl-modules
PRESTERA_MODULE_SRC := mrvl-prestera/drivers/generic/cpssEnabler/linuxNoKernelModule/drivers
SERVICE_DIR := service
PLATFORM_DIR := sonic_platform
%:
dh $@ --with systemd,python3 --buildsystem=pybuild
clean:
dh_testdir
dh_testroot
dh_clean
build:
(for mod in $(MODULE_DIRS); do \
cd $(MOD_SRC_DIR)/../$(PRESTERA_MODULE_SRC)/; \
make clean; \
make modules -C $(KERNEL_SRC)/build M=`pwd` CONFIG_KM_MVMBUS=y CONFIG_KM_MVINT=y || exit 1; \
mkdir $(MOD_SRC_DIR)/$${mod}/$(MRVL_MODULE_DIR); \
cp *.ko $(MOD_SRC_DIR)/$${mod}/$(MRVL_MODULE_DIR)/; \
cd $(MOD_SRC_DIR); \
make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules || exit 1; \
python3 $${mod}/setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}; \
done)
binary: binary-arch binary-indep
# Nothing to do
binary-arch:
# Nothing to do
binary-indep:
dh_testdir
dh_installdirs
# Custom package commands
(for mod in $(MODULE_DIRS); do \
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} /$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} /usr/local/bin; \
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} /boot; \
dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} /lib/systemd/system; \
cp $(MOD_SRC_DIR)/$${mod}/$(SERVICE_DIR)/*.service debian/$(PACKAGE_PRE_NAME)-$${mod}/lib/systemd/system/; \
cp $(MOD_SRC_DIR)/$${mod}/$(UTILS_DIR)/* debian/$(PACKAGE_PRE_NAME)-$${mod}/usr/local/bin/; \
cp $(MOD_SRC_DIR)/$${mod}/$(MRVL_MODULE_DIR)/mvcpss.ko debian/$(PACKAGE_PRE_NAME)-$${mod}/$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
cp $(MOD_SRC_DIR)/$${mod}/$(MODULE_DIR)/*.ko debian/$(PACKAGE_PRE_NAME)-$${mod}/$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \
python3 $${mod}/setup.py install --root=$(MOD_SRC_DIR)/debian/$(PACKAGE_PRE_NAME)-$${mod} --install-layout=deb; \
done)
# Resuming debhelper scripts
dh_testroot
dh_install
dh_installchangelogs
dh_installdocs
dh_systemd_enable
dh_installinit
dh_systemd_start
dh_link
dh_fixperms
dh_compress
dh_strip
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
.PHONY: build binary binary-arch binary-indep clean