[meta-ti] Sam Nelson : netapi: Add recipe for NETAPI module
Arago Project git
git at arago-project.org
Thu Feb 26 11:04:56 PST 2015
Module: meta-ti
Branch: master
Commit: 6356441620e29db519a0e4d41af4c9ea8b1a9056
URL: http://arago-project.org/git/meta-ti.git?a=commit;h=6356441620e29db519a0e4d41af4c9ea8b1a9056
Author: Sam Nelson <sam.nelson at ti.com>
Date: Fri Feb 27 00:08:25 2015 +0000
netapi: Add recipe for NETAPI module
- Provide TI user space network library and test code
- Supports k2h, k2k, k2l & k2e devices
Signed-off-by: Sam Nelson <sam.nelson at ti.com>
Signed-off-by: Denys Dmytriyenko <denys at ti.com>
---
recipes-ti/netapi/netapi-test_git.bb | 49 ++++++++++++++++++++++++++++++++++
recipes-ti/netapi/netapi.inc | 16 +++++++++++
recipes-ti/netapi/netapi_git.bb | 32 ++++++++++++++++++++++
3 files changed, 97 insertions(+), 0 deletions(-)
diff --git a/recipes-ti/netapi/netapi-test_git.bb b/recipes-ti/netapi/netapi-test_git.bb
new file mode 100644
index 0000000..9d49c29
--- /dev/null
+++ b/recipes-ti/netapi/netapi-test_git.bb
@@ -0,0 +1,49 @@
+DESCRIPTION = "Provides test and application binaries using NETAPI module"
+COMPATIBLE_MACHINE = "keystone"
+DEPENDS = "netapi ipsecmgr"
+
+include netapi.inc
+
+EXTRA_OEMAKE = "PDK_INSTALL_PATH=${STAGING_INCDIR}"
+
+do_compile () {
+# Build the netapi binaries
+ for device in ${DEVICELIST}
+ do
+ for choice in ${CHOICELIST}
+ do
+ oe_runmake -f makefile_armv7 tests NETAPI_SRC_DIR=${S} NETAPI_INC_DIR=${BASEDIR} \
+ USEDYNAMIC_LIB="$choice" DEVICE="$device"
+ done
+
+# Now build the netapi appplications
+ cd ${S}/applications/ipsec_offload/ipsecmgr/build
+ oe_runmake clean NETAPI_SRC_DIR=${S} DEVICE="$device"
+ oe_runmake app NETAPI_SRC_DIR=${S} DEVICE="$device"
+
+ cd ${S}/applications/ipsec_offload/config-app/build
+ oe_runmake clean DEVICE="$device"
+ oe_runmake app DEVICE="$device"
+ cd ${S}
+ done
+}
+
+do_install () {
+ for device in ${DEVICELIST}
+ do
+ oe_runmake -f makefile_armv7 installbin INSTALL_INC_BASE_DIR=${D}/${includedir} \
+ INSTALL_LIB_BASE_DIR=${D}${libdir} INSTALL_BIN_BASE_DIR=${D}${bindir} \
+ SYSCONFDIR=${D}${sysconfdir} DEVICE="$device"
+
+ cd ${S}/applications/ipsec_offload/ipsecmgr/build
+ oe_runmake install \
+ INSTALL_BIN_BASE_DIR=${D}${bindir} SYSCONFDIR=${D}${sysconfdir} \
+ DEVICE="$device"
+
+ cd ${S}/applications/ipsec_offload/config-app/build
+ oe_runmake install \
+ INSTALL_BIN_BASE_DIR=${D}${bindir} SYSCONFDIR=${D}${sysconfdir} \
+ DEVICE="$device"
+ cd ${S}
+ done
+}
diff --git a/recipes-ti/netapi/netapi.inc b/recipes-ti/netapi/netapi.inc
new file mode 100644
index 0000000..b8d481a
--- /dev/null
+++ b/recipes-ti/netapi/netapi.inc
@@ -0,0 +1,16 @@
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/git/COPYING.txt;md5=f2b4f162358b1ffaf3f2307287ca2074"
+
+BRANCH = "master"
+SRC_URI = "git://git.ti.com/keystone-rtos/netapi.git;protocol=git;branch=${BRANCH}"
+
+# Below Commit ID corresponds to "DEV.NETAPI.01.01.00.04"
+SRCREV= "dc08af268200908d3d8a456ac852c65c53d2fd12"
+PV = "01.01.00.04"
+
+DEVICELIST = "k2h k2k k2l k2e"
+
+CHOICELIST = "yes no"
+
+BASEDIR = "${WORKDIR}/git"
+S = "${BASEDIR}/ti/runtime/netapi"
diff --git a/recipes-ti/netapi/netapi_git.bb b/recipes-ti/netapi/netapi_git.bb
new file mode 100644
index 0000000..d88e95a
--- /dev/null
+++ b/recipes-ti/netapi/netapi_git.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "Provides NETAPI module: TI user space network library"
+
+COMPATIBLE_MACHINE = "keystone"
+
+DEPENDS = "common-csl-ip rm-lld qmss-lld cppi-lld sa-lld hplib pktlib nwal-lld"
+
+include netapi.inc
+
+EXTRA_OEMAKE = "-f makefile_armv7 PDK_INSTALL_PATH=${STAGING_INCDIR}"
+
+do_compile () {
+# Now build the netapi
+ for device in ${DEVICELIST}
+ do
+ for choice in ${CHOICELIST}
+ do
+ oe_runmake clean NETAPI_SRC_DIR=${S} NETAPI_INC_DIR=${BASEDIR} \
+ USEDYNAMIC_LIB="$choice" DEVICE="$device"
+ oe_runmake lib NETAPI_SRC_DIR=${S} NETAPI_INC_DIR=${BASEDIR} \
+ USEDYNAMIC_LIB="$choice" DEVICE="$device"
+ done
+ done
+}
+
+do_install () {
+ for device in ${DEVICELIST}
+ do
+ oe_runmake install INSTALL_INC_BASE_DIR=${D}${includedir} \
+ INSTALL_LIB_BASE_DIR=${D}${libdir} INSTALL_BIN_BASE_DIR=${D}${bindir} \
+ SYSCONFDIR=${D}${sysconfdir} DEVICE="$device"
+ done
+}
More information about the meta-ti
mailing list