summaryrefslogtreecommitdiffstats
path: root/extras/deb
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2023-10-23 18:36:18 +0200
committerDamjan Marion <damarion@cisco.com>2024-01-17 20:44:10 +0100
commit01fe7ab88efe1771618358ee5e90f56996ba909e (patch)
treebe82513c2c07c6febe8e305d8c2e9f19af1a3508 /extras/deb
parentdc26d50426792954e372cb7949b94fd3eb573942 (diff)
octeon: native driver for Marvell Octeon SoC
Type: feature Change-Id: I6898625c4e8854f777407dac3159e4c639a54860 Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'extras/deb')
-rwxr-xr-xextras/deb/mkdeb-octeon-roc46
1 files changed, 46 insertions, 0 deletions
diff --git a/extras/deb/mkdeb-octeon-roc b/extras/deb/mkdeb-octeon-roc
new file mode 100755
index 00000000000..08e57f4bd1e
--- /dev/null
+++ b/extras/deb/mkdeb-octeon-roc
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+PKG=vpp-dep-octeon-roc
+URL=https://github.com/MarvellEmbeddedProcessors/marvell-vpp.git
+ARCH=$(dpkg --print-architecture)
+TMP_DIR=$(mktemp -d -p $PWD)
+
+set -eEuo pipefail
+
+err_handler()
+{
+ trap '' INT TERM EXIT ERR
+ echo "Cleaning up ${TMP_DIR}"
+ rm -rf ${TMP_DIR}
+ exit
+}
+trap "err_handler" INT TERM EXIT ERR
+
+SRC=${TMP_DIR}/src
+BUILD=${TMP_DIR}/build
+STAGE=${TMP_DIR}/pkg
+INSTALL_PREFIX=/opt/vpp/external/$(uname -m)
+
+git clone ${URL} ${SRC}
+VER=0.0.$(git -C ${SRC} rev-list --count HEAD)
+
+cmake -S ${SRC} -B ${BUILD}
+cmake --build ${BUILD} --parallel
+cmake --install ${BUILD} --prefix ${STAGE}${INSTALL_PREFIX}
+
+mkdir -p ${STAGE}/DEBIAN
+
+cat > ${STAGE}/DEBIAN/control << __EOF__
+Package: ${PKG}
+Version: ${VER}
+Architecture: ${ARCH}
+Maintainer: vpp-dev <vpp-dev@fd.io>
+Installed-Size: $(du -ks ${STAGE}|cut -f 1)
+Section: system
+Priority: extra
+Description: Marvell Octeon ROC library for VPP
+ See https://github.com/MarvellEmbeddedProcessors/marvell-vpp
+__EOF__
+
+DEB=${PKG}_${VER}_${ARCH}.deb
+dpkg-deb -b ${STAGE} ${DEB}