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 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
6 changes: 0 additions & 6 deletions platform/marvell-armhf/linux-kernel-armhf.mk

This file was deleted.

10 changes: 0 additions & 10 deletions platform/marvell-armhf/linux/Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion platform/marvell-armhf/one-image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SONIC_ONE_IMAGE = sonic-marvell-armhf.bin
$(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
11 changes: 11 additions & 0 deletions platform/marvell-armhf/prestera.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Marvell Prestera

export MRVL_PRESTERA_VER = 1.0
export MRVL_PRESTERA = mrvlprestera_$(MRVL_PRESTERA_VER)_$(PLATFORM_ARCH)
export MRVL_PRESTERA_DEB = $(MRVL_PRESTERA).deb
export MRVL_PRESTERA_SRC_URL = https://github.com/Marvell-switching/mrvl-prestera.git
export MRVL_PRESTERA_SRC_TAG = MRVL_PRESTERA_DRIVER_1.0

$(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/platform/armhf/* /
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 -b ${MRVL_PRESTERA_SRC_TAG} ${MRVL_PRESTERA_SRC_URL}
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
2 changes: 1 addition & 1 deletion platform/marvell-armhf/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ include $(PLATFORM_PATH)/docker-syncd-mrvl-rpc.mk
include $(PLATFORM_PATH)/docker-saiserver-mrvl.mk
include $(PLATFORM_PATH)/libsaithrift-dev.mk
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