Skip to contentSkip to conversation

fmlib: new package

PATCH New Matt Weber 2 participants 4 messages Jun 11, 2014 – Jun 14, 2014

lore
Share & tools
lore

Matt Weber

author
#0 lore raw

PATCH v2 1/3 fmlib: new package

---

Changes v1 -> v2:
- Fixed Config.in to have linux depend and comment when linux is not selected (Thomas P)
- Fixed line wrap in Config.in description. (Thomas P)
- Updated license to be BSD-3c or GPLv2+ (Thomas P)
- Added comment about the pkg just being a static lib (Thomas P)
- Removed extra space in arch conditional (Thomas P)

---
 package/Config.in       |    1 +
 package/fmlib/Config.in |   14 ++++++++++++++
 package/fmlib/fmlib.mk  |   36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+)
 create mode 100644 package/fmlib/Config.in
 create mode 100644 package/fmlib/fmlib.mk
package/Config.in +1 -0
index 1706197..60118ea 100644
@@ -715,6 +715,7 @@ source "package/c-ares/Config.in"
 source "package/cppzmq/Config.in"
 source "package/czmq/Config.in"
 source "package/filemq/Config.in"
+source "package/fmlib/Config.in"
 source "package/glib-networking/Config.in"
 source "package/libcgi/Config.in"
 source "package/libcgicc/Config.in"
package/fmlib/Config.in new file +14 -0
new file mode 100644
index 0000000..f9b09c6
@@ -0,0 +1,14 @@
+comment "fmlib needs a Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_FMLIB
+	bool "fmlib"
+	depends on BR2_powerpc_e500mc
+	depends on BR2_LINUX_KERNEL
+	help
+	  The Frame Manager library provides Freescale PowerPC platforms an
+	  API on top of the Frame Manager driver ioctl calls, that provides
+	  a user space application with a simple way to configure driver
+	  parameters and PCD (parse - classify - distribute) rules.
+
+	  http://git.freescale.com/git/cgit.cgi/ppc/sdk/fmlib.git/tree/README
package/fmlib/fmlib.mk new file +36 -0
new file mode 100644
index 0000000..8fca0cd
@@ -0,0 +1,36 @@
+#############################################################
+#
+# fmlib
+#
+#############################################################
+
+FMLIB_VERSION = fsl-sdk-v1.5-rc3
+FMLIB_SITE = git://git.freescale.com/ppc/sdk/fmlib.git
+FMLIB_LICENSE = BSD-3c GPLv2+
+FMLIB_LICENSE_FILES = COPYING
+FMLIB_DEPENDENCIES = linux
+FMLIB_INSTALL_STAGING = YES
+
+# This package installs a static library only, so there's
+# nothing to install to the target
+FMLIB_INSTALL_TARGET = NO
+
+FMLIB_MAKE_OPTS = \
+	CC="$(TARGET_CC)" \
+	CROSS_COMPILE="$(TARGET_CROSS)" \
+	KERNEL_SRC="$(LINUX_DIR)" \
+	PREFIX="$(STAGING_DIR)/usr"
+
+ifeq ($(BR2_powerpc_e500mc),y)
+	FMLIB_ARCHTYPE = ppce500mc
+endif
+
+define FMLIB_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(FMLIB_MAKE_OPTS) -C $(@D) libfm-$(FMLIB_ARCHTYPE).a
+endef
+
+define FMLIB_INSTALL_STAGING_CMDS
+	$(FMLIB_MAKE_ENV) $(MAKE) $(FMLIB_MAKE_OPTS) -C $(@D) install-libfm-$(FMLIB_ARCHTYPE)
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH v2 2/3 tclap: new package

---

Changes v1 -> v2:
- Added depend on c++ stdlib (Thomas P)
- Fixed description line length and word spelling (Thomas P)
- Removed define of source archive file name as it's default (Thomas P)
- Added description about not installing to target and that this pkg is a set of template headers (Thomas P)

---
 package/Config.in       |    1 +
 package/tclap/Config.in |   17 +++++++++++++++++
 package/tclap/tclap.mk  |   16 ++++++++++++++++
 3 files changed, 34 insertions(+)
 create mode 100644 package/tclap/Config.in
 create mode 100644 package/tclap/tclap.mk
package/Config.in +1 -0
index 60118ea..ac3af6b 100644
@@ -856,6 +856,7 @@ source "package/pcre/Config.in"
 source "package/popt/Config.in"
 source "package/readline/Config.in"
 source "package/slang/Config.in"
+source "package/tclap/Config.in"
 endmenu
 
 endmenu
package/tclap/Config.in new file +17 -0
new file mode 100644
index 0000000..8c6296f
@@ -0,0 +1,17 @@
+comment "tclap needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
+
+config BR2_PACKAGE_TCLAP
+	bool "tclap"
+	depends BR2_INSTALL_LIBSTDCPP
+	help
+	  This is a small, flexible library that provides a simple interface
+	  for defining and accessing command line arguments. It was initially
+	  inspired by the user friendly CLAP libary. The difference is that
+	  this library is templatized, so the argument class is type
+	  independent. Type independence avoids identical-except-for-type
+	  objects, such as IntArg, FloatArg, and StringArg. While the library
+	  is not strictly compliant with the GNU or POSIX standards, it is
+	  close.
+
+	  http://tclap.sourceforge.net/
package/tclap/tclap.mk new file +16 -0
new file mode 100644
index 0000000..807f247
@@ -0,0 +1,16 @@
+################################################################################
+#
+# tclap
+#
+################################################################################
+
+TCLAP_VERSION = 1.2.1
+TCLAP_SITE = http://downloads.sourceforge.net/project/tclap
+TCLAP_LICENSE = MIT
+TCLAP_LICENSE_FILES = COPYING
+TCLAP_INSTALL_STAGING = YES
+
+# This package is a pure C++ template library, only made of headers.
+TCLAP_INSTALL_TARGET = NO
+
+$(eval $(autotools-package))
Signature · 1 line
1.7.9.5
author
#2 lore raw

PATCH v2 3/3 fmc: new package

In reply to Matt Weber

---

Changes v1 -> v2:
- Fixed line wrap and mentioned fsl ppc in the description (Thomas P)
- Added depends on c++ lib (Thomas P)
- Updated cp to use dpfr args instead of noownership (Thomas P)

---
 package/Config.in     |    1 +
 package/fmc/Config.in |   19 +++++++++++++++++++
 package/fmc/fmc.mk    |   31 +++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+)
 create mode 100644 package/fmc/Config.in
 create mode 100644 package/fmc/fmc.mk
package/Config.in +1 -0
index ac3af6b..f874eaf 100644
@@ -918,6 +918,7 @@ source "package/dnsmasq/Config.in"
 source "package/dropbear/Config.in"
 source "package/ebtables/Config.in"
 source "package/ethtool/Config.in"
+source "package/fmc/Config.in
 source "package/foomatic-filters/Config.in"
 source "package/fping/Config.in"
 source "package/gesftpserver/Config.in"
package/fmc/Config.in new file +19 -0
new file mode 100644
index 0000000..35de28e
@@ -0,0 +1,19 @@
+comment "fmc needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
+
+config BR2_PACKAGE_FMC
+	bool "fmc"
+	depends on BR2_powerpc_e500mc
+	depends on BR2_INSTALL_LIBSTDCPP
+	select BR2_PACKAGE_TCLAP
+	select BR2_PACKAGE_LIBXML2
+	select BR2_PACKAGE_FMLIB
+	help
+	  The Frame Manager Configuration tool is Freescale PowerPC platform
+	  software package whose primary purpose is converting
+	  Parse-Classify-Police-Distribute (PCD) descriptions of network
+	  packets flow into hardware configuration. The tool provides an
+	  abstraction layer between the end customer's vision of the PCD task
+	  definition and real hardware implementation.
+
+	  http://cache.freescale.com/files/32bit/doc/app_note/AN4760.pdf
package/fmc/fmc.mk new file +31 -0
new file mode 100644
index 0000000..f9091c0
@@ -0,0 +1,31 @@
+###############################################################################
+#
+# fmc
+#
+###############################################################################
+
+FMC_VERSION = fsl-sdk-v1.5-rc3
+FMC_SITE = git://git.freescale.com/ppc/sdk/fmc.git
+FMC_LICENSE = MIT
+FMC_LICENSE_FILES = COPYING
+FMC_DEPENDENCIES = libxml2 tclap fmlib
+
+FMC_MAKE_OPTS = \
+	CC="$(TARGET_CC)" \
+	CXX="$(TARGET_CXX)" \
+	FMD_USPACE_HEADER_PATH="$(STAGING_DIR)/usr/include/fmd" \
+	FMD_USPACE_LIB_PATH="$(STAGING_DIR)/usr/lib" \
+	LIBXML2_HEADER_PATH="$(STAGING_DIR)/usr/include/libxml2" \
+	TCLAP_HEADER_PATH="$(STAGING_DIR)/usr/include"
+
+define FMC_BUILD_CMDS
+	# The linking step has dependency issues so using MAKE1
+	$(TARGET_MAKE_ENV) $(MAKE1) $(FMC_MAKE_OPTS) -C $(@D)/source
+endef
+
+define FMC_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/source/fmc $(TARGET_DIR)/usr/sbin/fmc
+	cp -dpfr $(@D)/etc/fmc $(TARGET_DIR)/etc/
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH v2 1/3 fmlib: new package

In reply to Matt Weber

Dear Matt Weber,

Quoted 2 lines · Matt Weber

---

Thanks, I've committed your 3 patches for fmlib, tclap and fmc respectively.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com