forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[marvell]: Marvell prestera kernel driver (sonic-net#7066)
Build Marvell kernel driver for prestera sai sdk Builds interrupt and dma kernel driver Removed the older method pre-compiled kernel module debian package and its makefile
- Loading branch information
1 parent
a5ee2b1
commit c8828f7
Showing
10 changed files
with
90 additions
and
18 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
3 changes: 3 additions & 0 deletions
3
platform/marvell-armhf/prestera/debian/mrvlprestera.install.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/* / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters