Skip to contentSkip to conversation

ipsecmgr: Add recipes for ipsec manager module and libraries

PATCH In review Sam Nelson 2 participants 2 messages Feb 4, 2015 – Feb 10, 2015

lore
Share & tools
lore

Sam Nelson

author
#0 lore raw

PATCH v2 1/1 ipsecmgr: Add recipes for ipsec manager module and libraries

- Provides module and libraries to offload IPSec security policy & associated security association to NETCP for crypto operations

---
 recipes-bsp/ipsecmgr/ipsecmgr-mod_git.bb |   26 ++++++++++++++++++++++++++
 recipes-bsp/ipsecmgr/ipsecmgr.inc        |   10 ++++++++++
 recipes-bsp/ipsecmgr/ipsecmgr_git.bb     |   30 ++++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+)
 create mode 100644 recipes-bsp/ipsecmgr/ipsecmgr-mod_git.bb
 create mode 100644 recipes-bsp/ipsecmgr/ipsecmgr.inc
 create mode 100644 recipes-bsp/ipsecmgr/ipsecmgr_git.bb
recipes-bsp/ipsecmgr/ipsecmgr-mod_git.bb new file +26 -0
new file mode 100644
index 0000000..bbaa271
@@ -0,0 +1,26 @@
+SUMMARY = "IPSec Manager kernel module"
+DESCRIPTION = "Provides Module to offload IPSec security policy & associated security association to NETCP for crypto operations"
+
+include ipsecmgr.inc
+
+MACHINE_KERNEL_PR_append = "a+gitr${SRCPV}"
+PR = "${MACHINE_KERNEL_PR}"
+
+MODULE_BUILD_DIR = "${S}/src/module"
+
+EXTRA_OEMAKE += "KDIR="${STAGING_KERNEL_DIR}""
+
+inherit module
+
+do_compile() {
+# Compile kernel module
+	cd ${MODULE_BUILD_DIR}
+	oe_runmake clean
+	oe_runmake
+}
+
+do_install() {
+# Install kernel module
+	cd ${MODULE_BUILD_DIR}
+	oe_runmake INSTALL_MOD_PATH="${D}" install
+}
recipes-bsp/ipsecmgr/ipsecmgr.inc new file +10 -0
new file mode 100644
index 0000000..cbc63c0
@@ -0,0 +1,10 @@
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://ipsecmgr_snoop.h;beginline=1;endline=33;md5=f7eadca4fb5599f508dc11fa1e752919"
+
+BRANCH="master"
+SRC_URI = "git://arago-project.org/git/projects/ipsecmgr.git;protocol=git;branch=${BRANCH}"
+#Commit ID corresponding to DEV.IPSECMGR.01.01.00.03
+SRCREV = "1ea8355ae9142311901c842c97a58d2846b308e6"
+PV     = "01.01.00.03"
+
+S = "${WORKDIR}/git"
recipes-bsp/ipsecmgr/ipsecmgr_git.bb new file +30 -0
new file mode 100644
index 0000000..a4739ce
@@ -0,0 +1,30 @@
+SUMMARY = "IPSec Manager libraries"
+DESCRIPTION = "Provides library to offload IPSec security policy & associated security association to NETCP for crypto operations"
+
+include ipsecmgr.inc
+
+DEPENDS = "libnl-xfrm"
+
+LIB_BUILD_DIR = "${S}/build"
+LIB_INC_DIR = "${S}/"
+UTILS_LIB_INC_DIR = "${S}/utils/iface/"
+
+CFLAGS += "-I${STAGING_INCDIR}/libnl3"
+
+do_compile() {
+# Compile the library
+	cd ${LIB_BUILD_DIR}
+	make clean
+	make all
+}
+
+do_install() {
+# Install libraries
+	install -d ${D}${libdir}/
+	install -c -m 666 ${LIB_BUILD_DIR}/libipsecmgr_snoop.a ${D}${libdir}/
+	install -c -m 666 ${LIB_BUILD_DIR}/libipsecmgr_ipc.a ${D}${libdir}/
+	install -c -m 666 ${LIB_BUILD_DIR}/libipsecmgr_syslog.a ${D}${libdir}/
+	install -d ${D}${includedir}/
+	install -c -m 666 ${LIB_INC_DIR}/*.h ${D}${includedir}/
+	install -c -m 666 ${UTILS_LIB_INC_DIR}/*.h ${D}${includedir}/
+}
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 20 lines · Sam Nelson

- Provides module and libraries to offload IPSec security policy & associated security association to NETCP for crypto operations

---
 recipes-bsp/ipsecmgr/ipsecmgr-mod_git.bb |   26 ++++++++++++++++++++++++++
 recipes-bsp/ipsecmgr/ipsecmgr.inc        |   10 ++++++++++
 recipes-bsp/ipsecmgr/ipsecmgr_git.bb     |   30 ++++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+)
 create mode 100644 recipes-bsp/ipsecmgr/ipsecmgr-mod_git.bb
 create mode 100644 recipes-bsp/ipsecmgr/ipsecmgr.inc
 create mode 100644 recipes-bsp/ipsecmgr/ipsecmgr_git.bb
recipes-bsp/ipsecmgr/ipsecmgr-mod_git.bb new file +0 -0
new file mode 100644
index 0000000..bbaa271

recipes-bsp/ipsecmgr/ipsecmgr-mod_git.bb line 9

Quoted 9 lines
recipes-bsp/ipsecmgr/ipsecmgr-mod_git.bb new file +9 -0
@@ -0,0 +1,26 @@
+SUMMARY = "IPSec Manager kernel module"
+DESCRIPTION = "Provides Module to offload IPSec security policy & associated security association to NETCP for crypto operations"
+
+include ipsecmgr.inc
+
+MACHINE_KERNEL_PR_append = "a+gitr${SRCPV}"
+PR = "${MACHINE_KERNEL_PR}"
+
+MODULE_BUILD_DIR = "${S}/src/module"

Set S to point there to avoid cd-ing to that directory in do_compile and do_install steps.

recipes-bsp/ipsecmgr/ipsecmgr-mod_git.bb line 19

Quoted 9 lines
recipes-bsp/ipsecmgr/ipsecmgr-mod_git.bb new file +9 -0
+EXTRA_OEMAKE += "KDIR="${STAGING_KERNEL_DIR}""
+
+inherit module
+
+do_compile() {
+# Compile kernel module
+	cd ${MODULE_BUILD_DIR}
+	oe_runmake clean
+	oe_runmake

Set MAKE_TARGETS to "all" or empty (depending on your Makefile) and drop do_compile completely.

recipes-bsp/ipsecmgr/ipsecmgr-mod_git.bb line 26

Quoted 7 lines
recipes-bsp/ipsecmgr/ipsecmgr-mod_git.bb new file +7 -0
+}
+
+do_install() {
+# Install kernel module
+	cd ${MODULE_BUILD_DIR}
+	oe_runmake INSTALL_MOD_PATH="${D}" install
+}

This one expects modules_install target, so you'd need just last line, but drop "cd"...

Quoted 22 lines
recipes-bsp/ipsecmgr/ipsecmgr.inc new file +10 -0
new file mode 100644
index 0000000..cbc63c0
@@ -0,0 +1,10 @@
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://ipsecmgr_snoop.h;beginline=1;endline=33;md5=f7eadca4fb5599f508dc11fa1e752919"
+
+BRANCH="master"
+SRC_URI = "git://arago-project.org/git/projects/ipsecmgr.git;protocol=git;branch=${BRANCH}"
+#Commit ID corresponding to DEV.IPSECMGR.01.01.00.03
+SRCREV = "1ea8355ae9142311901c842c97a58d2846b308e6"
+PV     = "01.01.00.03"
+
+S = "${WORKDIR}/git"
recipes-bsp/ipsecmgr/ipsecmgr_git.bb new file +0 -0
new file mode 100644
index 0000000..a4739ce

recipes-bsp/ipsecmgr/ipsecmgr_git.bb line 6

Quoted 6 lines
recipes-bsp/ipsecmgr/ipsecmgr_git.bb new file +6 -0
@@ -0,0 +1,30 @@
+SUMMARY = "IPSec Manager libraries"
+DESCRIPTION = "Provides library to offload IPSec security policy & associated security association to NETCP for crypto operations"
+
+include ipsecmgr.inc
+
+DEPENDS = "libnl-xfrm"

Since you submitted this libnl-xfrm dependency to meta-arago, you have to either move ipsecmgr to meta-arago as well, or move libnl-xfrm to meta-ti... In other words, meta-ti layer doesn't have dependency on meta-arago, so you can't depend on anything in meta-arago from meta-ti. The other way around is allowed.

Quoted 32 lines
recipes-bsp/ipsecmgr/ipsecmgr_git.bb new file +24 -0
+
+LIB_BUILD_DIR = "${S}/build"
+LIB_INC_DIR = "${S}/"
+UTILS_LIB_INC_DIR = "${S}/utils/iface/"
+
+CFLAGS += "-I${STAGING_INCDIR}/libnl3"
+
+do_compile() {
+# Compile the library
+	cd ${LIB_BUILD_DIR}
+	make clean
+	make all
+}
+
+do_install() {
+# Install libraries
+	install -d ${D}${libdir}/
+	install -c -m 666 ${LIB_BUILD_DIR}/libipsecmgr_snoop.a ${D}${libdir}/
+	install -c -m 666 ${LIB_BUILD_DIR}/libipsecmgr_ipc.a ${D}${libdir}/
+	install -c -m 666 ${LIB_BUILD_DIR}/libipsecmgr_syslog.a ${D}${libdir}/
+	install -d ${D}${includedir}/
+	install -c -m 666 ${LIB_INC_DIR}/*.h ${D}${includedir}/
+	install -c -m 666 ${UTILS_LIB_INC_DIR}/*.h ${D}${includedir}/
+}
Signature · 7 lines
1.7.9.5

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti