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

Marvell prestera kernel driver #7066

Merged
merged 3 commits into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions platform/marvell-armhf/one-image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ $(SONIC_ONE_IMAGE)_MACHINE = marvell-armhf
$(SONIC_ONE_IMAGE)_IMAGE_TYPE = onie
$(SONIC_ONE_IMAGE)_INSTALLS += $(SYSTEMD_SONIC_GENERATOR)
$(SONIC_ONE_IMAGE)_INSTALLS += $(LINUX_KERNEL_DTB)
$(SONIC_ONE_IMAGE)_INSTALLS += $(MRVL_PRESTERA_DEB)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(ET6448M_PLATFORM) \
$(NOKIA_7215_PLATFORM)
ifeq ($(INSTALL_DEBUG_TOOLS),y)
Expand Down
9 changes: 9 additions & 0 deletions platform/marvell-armhf/prestera.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Marvell Prestera

export MRVL_PRESTERA_VER = 1.0
export MRVL_PRESTERA = mrvlprestera_$(MRVL_PRESTERA_VER)_$(PLATFORM_ARCH)
export MRVL_PRESTERA_DEB = $(MRVL_PRESTERA).deb

$(MRVL_PRESTERA_DEB)_SRC_PATH = $(PLATFORM_PATH)/prestera
$(MRVL_PRESTERA_DEB)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
SONIC_DPKG_DEBS += $(MRVL_PRESTERA_DEB)
5 changes: 5 additions & 0 deletions platform/marvell-armhf/prestera/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mrvlprestera (1.0) unstable; urgency=low

* Prestera switch driver

-- Marvell <arheneus@marvell.com> Fri, 19 Feb 2021 10:39:18 +0800
1 change: 1 addition & 0 deletions platform/marvell-armhf/prestera/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
15 changes: 15 additions & 0 deletions platform/marvell-armhf/prestera/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Source: mrvlprestera
Section: unknown
Priority: optional
Maintainer: Marvell <arheneus@marvell.com>
Build-Depends: debhelper (>=9)
Standards-Version: 3.9.6
Homepage: <insert the upstream URL, if relevant>
#Vcs-Git: git://anonscm.debian.org/collab-maint/mrvlprestera.git
#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/mrvlprestera.git

Package: mrvlprestera
Architecture: armhf
Homepage: <insert the upstream URL, if relevant>
Description:
kernel modules for prestera switch driver
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mrvl-prestera/cpssEnabler/linuxNoKernelModule/drivers/mvDmaDrv.ko /lib/modules/KVERSION/kernel/extra
mrvl-prestera/cpssEnabler/linuxNoKernelModule/drivers/mvIntDrv.ko /lib/modules/KVERSION/kernel/extra
mrvl-prestera/modules-load.d/marvell.conf /etc/modules-load.d/marvell.conf
53 changes: 53 additions & 0 deletions platform/marvell-armhf/prestera/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

PACKAGE_PRE_NAME := mrvlprestera
KVERSION ?= $(shell uname -r)
KERNEL_SRC := /lib/modules/$(KVERSION)
MOD_SRC_DIR:= $(shell pwd)
MODULE_DIR := mrvl-prestera/cpssEnabler/linuxNoKernelModule/drivers

%:
dh $@ --with systemd,python2,python3 --buildsystem=pybuild

clean:
dh_testdir
dh_testroot
dh_clean

build:
# get sources
rm -rf mrvl-prestera || true
git clone https://github.com/Marvell-switching/mrvl-prestera.git
antony-rheneus marked this conversation as resolved.
Show resolved Hide resolved
sed "s/KVERSION/${KVERSION}/g" /sonic/platform/marvell-armhf/prestera/debian/mrvlprestera.install.template > /sonic/platform/marvell-armhf/prestera/debian/mrvlprestera.install

make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$(MODULE_DIR)/

binary: binary-arch binary-indep
# Nothing to do

binary-arch:
# Nothing to do

binary-indep:
dh_testdir
dh_installdirs

# 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
1 change: 1 addition & 0 deletions platform/marvell-armhf/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ include $(PLATFORM_PATH)/one-image.mk
include $(PLATFORM_PATH)/linux-kernel-armhf.mk
antony-rheneus marked this conversation as resolved.
Show resolved Hide resolved
include $(PLATFORM_PATH)/platform-et6448m.mk
include $(PLATFORM_PATH)/platform-nokia.mk
include $(PLATFORM_PATH)/prestera.mk

ENABLE_SYNCD_RPC = ""
INCLUDE_MGMT_FRAMEWORK = ""
Expand Down