Patchwork [meta-fsl-arm,2/3] libmcc: Add package

login
register
mail settings
Submitter Andy Voltz
Date Aug. 24, 2013, 7:37 p.m.
Message ID <1377373026-15377-3-git-send-email-andy.voltz@timesys.com>
Download mbox | patch
Permalink /patch/56553/
State Accepted
Delegated to: Otavio Salvador
Headers show

Comments

Andy Voltz - Aug. 24, 2013, 7:37 p.m.
libmcc is a userspace library which can be used in Linux applications on
Freescale Vybrid Platforms. This library interfaces with the kernel-module-mcc
to pass information to MQX running on the M4.

Signed-off-by: Andy Voltz <andy.voltz@timesys.com>
---
 recipes-bsp/libmcc/libmcc/libmcc-cflags.patch  |   18 +++++++++++++
 recipes-bsp/libmcc/libmcc/libmcc-symlink.patch |   32 ++++++++++++++++++++++++
 recipes-bsp/libmcc/libmcc_1.03.bb              |   20 +++++++++++++++
 3 files changed, 70 insertions(+)
 create mode 100644 recipes-bsp/libmcc/libmcc/libmcc-cflags.patch
 create mode 100644 recipes-bsp/libmcc/libmcc/libmcc-symlink.patch
 create mode 100644 recipes-bsp/libmcc/libmcc_1.03.bb

Patch

diff --git a/recipes-bsp/libmcc/libmcc/libmcc-cflags.patch b/recipes-bsp/libmcc/libmcc/libmcc-cflags.patch
new file mode 100644
index 0000000..01f4c41
--- /dev/null
+++ b/recipes-bsp/libmcc/libmcc/libmcc-cflags.patch
@@ -0,0 +1,18 @@ 
+This patch is required with the Yocto toolchain.
+
+Upstream-status: Pending
+
+diff -Nuar libmcc-1.03-orig/Makefile libmcc-1.03/Makefile
+--- libmcc-1.03-orig/Makefile	2013-08-12 14:43:50.063656300 -0400
++++ libmcc-1.03/Makefile	2013-08-12 14:44:10.007427139 -0400
+@@ -1,9 +1,8 @@
+-CFLAGS+=-Iinclude/
+ all: build/libmcc.a build/libmcc.so
+ 
+ build/libmcc.o: src/libmcc.c
+ 	mkdir -p build/
+-	$(CC) -c -fPIC $< -o $@ $(CFLAGS)
++	$(CC) -c -fPIC $< -o $@ -Iinclude/ $(CFLAGS)
+ 
+ build/libmcc.a: build/libmcc.o
+ 	$(AR) rcs $@ $<
diff --git a/recipes-bsp/libmcc/libmcc/libmcc-symlink.patch b/recipes-bsp/libmcc/libmcc/libmcc-symlink.patch
new file mode 100644
index 0000000..f21a93e
--- /dev/null
+++ b/recipes-bsp/libmcc/libmcc/libmcc-symlink.patch
@@ -0,0 +1,32 @@ 
+This patch adds the proper version suffix to the libmcc shared libs.
+
+Upstream-status: Pending
+
+diff -Nuar libmcc-1.03-orig/Makefile libmcc-1.03/Makefile
+--- libmcc-1.03-orig/Makefile	2013-08-13 10:05:46.187200835 -0400
++++ libmcc-1.03/Makefile	2013-08-13 12:23:45.167119943 -0400
+@@ -1,4 +1,4 @@
+-all: build/libmcc.a build/libmcc.so
++all: build/libmcc.a build/libmcc.so.1.0
+ 
+ build/libmcc.o: src/libmcc.c
+ 	mkdir -p build/
+@@ -7,13 +7,16 @@
+ build/libmcc.a: build/libmcc.o
+ 	$(AR) rcs $@ $<
+ 
+-build/libmcc.so: build/libmcc.o
++build/libmcc.so.1.0: build/libmcc.o
+ 	$(CC) -shared -o $@  $<
+ 
+ install:
+ 	mkdir -p $(DESTDIR)/usr/{lib,include}
+-	cp -f build/libmcc.{so,a} $(DESTDIR)/usr/lib
++	cp -f build/libmcc.{so.*,a} $(DESTDIR)/usr/lib
+ 	cp -f include/*.h $(DESTDIR)/usr/include
++	cd $(DESTDIR)/usr/lib/
++	ln -sf libmcc.so.1.0 libmcc.so.1
++	ln -sf libmcc.so.1 libmcc.so
+ 
+ clean:
+ 	rm -rf build
diff --git a/recipes-bsp/libmcc/libmcc_1.03.bb b/recipes-bsp/libmcc/libmcc_1.03.bb
new file mode 100644
index 0000000..18fc84e
--- /dev/null
+++ b/recipes-bsp/libmcc/libmcc_1.03.bb
@@ -0,0 +1,20 @@ 
+# Copyright (C) 2013 Timesys Corporation
+SUMMARY = "MCC Userspace Library"
+DESCRIPTION = "Timesys Multicore communication Library"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c49712341497d0b5f2e40c30dff2af9d"
+
+RDEPENDS_${PN} = "kernel-module-mcc"
+
+inherit autotools
+
+SRC_URI = "http://repository.timesys.com/buildsources/l/libmcc/libmcc-${PV}/libmcc-${PV}.tar.bz2 \
+           file://libmcc-cflags.patch \
+           file://libmcc-symlink.patch"
+
+SRC_URI[md5sum] = "adac15d52206be21a4589b2b923af4cc"
+SRC_URI[sha256sum] = "8b4d88f260d4d3a67ee2c16e20112e0584403f350182087daa1cfafeceb16a7f"
+
+S = "${WORKDIR}/libmcc-${PV}"
+
+COMPATIBLE_MACHINE = "(vf60)"