aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-bsp/imx-lib
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/imx-lib')
-rw-r--r--recipes-bsp/imx-lib/imx-lib-11.09.02/obey-variables.patch209
-rw-r--r--recipes-bsp/imx-lib/imx-lib.inc30
-rw-r--r--recipes-bsp/imx-lib/imx-lib_11.09.02.bb9
-rw-r--r--recipes-bsp/imx-lib/imx-lib_3.10.53-1.1.0.bb10
4 files changed, 258 insertions, 0 deletions
diff --git a/recipes-bsp/imx-lib/imx-lib-11.09.02/obey-variables.patch b/recipes-bsp/imx-lib/imx-lib-11.09.02/obey-variables.patch
new file mode 100644
index 00000000..901345ac
--- /dev/null
+++ b/recipes-bsp/imx-lib/imx-lib-11.09.02/obey-variables.patch
@@ -0,0 +1,209 @@
+Obey CFLAGS, LDFLAGS
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-status: Pending
+
+--- imx-lib-11.09.02.orig/hdmi-cec/Makefile 2014-09-02 13:04:37.114250749 -0700
++++ imx-lib-11.09.02/hdmi-cec/Makefile 2014-09-02 13:04:37.086250568 -0700
+@@ -1,5 +1,6 @@
+ CC ?=$(CROSS_COMPILE)gcc
+ AR ?=$(CROSS_COMPILE)ar
++CFLAGS ?=-O2
+
+ # list of platforms which want this test case
+ INCLUDE_LIST:= IMX6Q
+@@ -32,10 +33,10 @@
+ endif
+
+ %.o: %.c
+- $(CC) -D$(PLATFORM) -Wall -O2 -fPIC -c $^ -o $@
++ $(CC) -D$(PLATFORM) -Wall -fPIC $(CFLAGS) -c $^ -o $@
+
+ $(LIBNAME).so.$(SONAMEVERSION): $(OBJ)
+- $(CC) -shared -nostartfiles -Wl,-soname,$@ $^ -o $@
++ $(CC) -shared -nostartfiles -Wl,-soname,$@ $^ -o $@ $(LDFLAGS)
+
+ $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
+ ln -s $< $@
+--- imx-lib-11.09.02.orig/ipu/Makefile 2014-09-02 13:04:37.114250749 -0700
++++ imx-lib-11.09.02/ipu/Makefile 2014-09-02 13:05:11.062458117 -0700
+@@ -1,5 +1,6 @@
+ CC ?=$(CROSS_COMPILE)gcc
+ AR ?=$(CROSS_COMPILE)ar
++CFLAGS ?=-O2
+
+ ifeq ($(PLATFORM), IMX6Q)
+ OBJS = mxc_ipu_hl_lib_dummy.o
+@@ -28,7 +29,7 @@
+ endif
+
+ $(LIBNAME).so.$(SONAMEVERSION): $(OBJS)
+- $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ -lpthread
++ $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ -lpthread $(LDFLAGS)
+
+ $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
+ ln -s $< $@
+@@ -37,7 +38,7 @@
+ ifeq "$(PLATFORM)" ""
+ $(error "Unspecified PLATFORM variable")
+ endif
+- $(CC) -D$(PLATFORM) $(INCLUDE) -Wall -O2 -fPIC -c $^ -o $@
++ $(CC) -D$(PLATFORM) $(INCLUDE) -Wall -fPIC $(CFLAGS) -c $^ -o $@
+
+ .PHONY: clean
+ clean:
+--- imx-lib-11.09.02.orig/pxp/Makefile 2014-09-02 13:04:37.114250749 -0700
++++ imx-lib-11.09.02/pxp/Makefile 2014-09-02 13:05:53.354716651 -0700
+@@ -1,5 +1,6 @@
+ CC ?=$(CROSS_COMPILE)gcc
+ AR ?=$(CROSS_COMPILE)ar
++CFLAGS ?=-O2
+
+ # list of platforms which want this test case
+ INCLUDE_LIST:=IMX50 IMX51 IMX5 IMX6Q IMX6S
+@@ -25,10 +26,10 @@
+ endif
+
+ %.o: %.c
+- $(CC) -D$(PLATFORM) $(INCLUDE) -Wall -O2 -fPIC -c $^ -o $@
++ $(CC) -D$(PLATFORM) $(INCLUDE) -Wall -fPIC $(CFLAGS) -c $^ -o $@
+
+ $(LIBNAME).so.$(SONAMEVERSION): $(OBJ)
+- $(CC) -shared -nostartfiles -Wl,-soname,$@ $^ -o $@
++ $(CC) -shared -nostartfiles -Wl,-soname,$@ $^ -o $@ $(LDFLAGS)
+
+ $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
+ ln -s $< $@
+--- imx-lib-11.09.02.orig/rng/Makefile 2014-09-02 13:04:37.114250749 -0700
++++ imx-lib-11.09.02/rng/Makefile 2014-09-02 13:04:37.086250568 -0700
+@@ -4,16 +4,17 @@
+ AR = ar -crv
+ RM = rm -f
+ CC ?=$(CROSS_COMPILE)gcc
+-LD=$(CROSS_COMPILE)ld
++LD ?=$(CROSS_COMPILE)ld
++CFLAGS ?=-g
+
+ INC := $(INCLUDE)
+
+ # Add compilation checks
+-CFLAGS += -g -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -fPIC
++override CFLAGS += -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -fPIC
+
+ # In absence of kernel CONFIG flags, set API library to build on
+ # 'unknown' platform.
+-CFLAGS += -DFSL_PLATFORM_OTHER -DFSL_HAVE_RNGC $(INC)
++override CFLAGS += -DFSL_PLATFORM_OTHER -DFSL_HAVE_RNGC $(INC)
+
+ OBJS= fsl_shw_rand.o fsl_shw_hash.o fsl_shw_sym.o fsl_shw_user.o \
+ fsl_shw_keystore.o fsl_shw_auth.o fsl_shw_hmac.o fsl_shw_wrap.o
+@@ -34,7 +35,7 @@
+ $(AR) $@ $^
+
+ $(LIBNAME).so.$(SONAMEVERSION): $(OBJS)
+- $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^
++ $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ $(LDFLAGS)
+
+ $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
+ ln -s $< $@
+--- imx-lib-11.09.02.orig/sahara2/Makefile 2014-09-02 13:04:37.114250749 -0700
++++ imx-lib-11.09.02/sahara2/Makefile 2014-09-02 13:04:37.086250568 -0700
+@@ -4,7 +4,8 @@
+ AR = ar -crv
+ RM = rm -f
+ CC ?=$(CROSS_COMPILE)gcc
+-LD=$(CROSS_COMPILE)ld
++LD ?=$(CROSS_COMPILE)ld
++CFLAGS ?=-g
+
+ INC := $(INCLUDE)
+
+@@ -18,19 +19,19 @@
+ endif
+
+ # Add compilation checks
+-CFLAGS += -g -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -fPIC
++override CFLAGS += -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -fPIC
+
+ OBJS= fsl_shw_rand.o fsl_shw_hash.o fsl_shw_sym.o fsl_shw_user.o \
+ fsl_shw_auth.o fsl_shw_hmac.o fsl_shw_wrap.o fsl_shw_keystore.o um_adaptor.o sf_util.o
+
+
+ #CFLAGS += -DSAHARA -DLINUX -I$(APIINCDIR)
+-CFLAGS += -DSAHARA -DLINUX $(INC)
+-CFLAGS += $(TARGET_ARCH)
++override CFLAGS += -DSAHARA -DLINUX $(INC)
++override CFLAGS += $(TARGET_ARCH)
+ # Uncomment to debug Library's creation of structures for driver
+-#CFLAGS += -DDIAG_SECURITY_FUNC
++#override CFLAGS += -DDIAG_SECURITY_FUNC
+ # Uncomment to simulate memory allocation errors
+-#CFLAGS += -DDIAG_MEM_ERRORS -DDIAG_MEM_CONST=5
++#override CFLAGS += -DDIAG_MEM_ERRORS -DDIAG_MEM_CONST=5
+
+ LIBNAME=libsahara
+ SONAMEVERSION=0
+@@ -53,7 +54,7 @@
+ $(AR) $@ $^
+
+ $(LIBNAME).so.$(SONAMEVERSION): $(OBJS)
+- $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^
++ $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ $(LDFLAGS)
+
+ $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
+ ln -s $< $@
+--- imx-lib-11.09.02.orig/screenlayer/Makefile 2014-09-02 13:04:37.114250749 -0700
++++ imx-lib-11.09.02/screenlayer/Makefile 2014-09-02 13:04:37.086250568 -0700
+@@ -1,5 +1,6 @@
+ CC ?=$(CROSS_COMPILE)gcc
+ AR ?=$(CROSS_COMPILE)ar
++CFLAGS ?=-O2
+ INC = $(INCLUDE) -I../ipu
+
+ OBJS = ScreenLayer.o
+@@ -24,13 +25,13 @@
+ endif
+
+ $(LIBNAME).so.$(SONAMEVERSION): $(OBJS)
+- $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ -L../ipu -lipu
++ $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ -L../ipu -lipu $(LDFLAGS)
+
+ $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
+ ln -s $< $@
+
+ %.o: %.c
+- $(CC) $(INC) -Wall -O2 -fPIC -c $^ -o $@
++ $(CC) $(INC) -Wall -fPIC $(CFLAGS) -c $^ -o $@
+
+ .PHONY: clean
+ clean:
+--- imx-lib-11.09.02.orig/sim/Makefile 2014-09-02 13:04:37.114250749 -0700
++++ imx-lib-11.09.02/sim/Makefile 2014-09-02 13:04:37.086250568 -0700
+@@ -1,9 +1,10 @@
+ CC ?=$(CROSS_COMPILE)gcc
+ AR ?=$(CROSS_COMPILE)ar
++CFLAGS ?=-O2
+
+ OBJS = iso7816-3.o
+
+-CFLAGS += $(INCLUDE)
++override CFLAGS += $(INCLUDE)
+
+ LIBNAME=libsim
+ SONAMEVERSION=0
+@@ -21,13 +22,13 @@
+ cp iso7816-3.h $(DEST_DIR)/usr/include
+
+ $(LIBNAME).so.$(SONAMEVERSION): $(OBJS)
+- $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ -lpthread
++ $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ -lpthread $(LDFLAGS)
+
+ $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
+ ln -s $< $@
+
+ %.o: %.c
+- $(CC) -D$(PLATFORM) $(INCLUDE) -Wall -O2 -fPIC -c $^ -o $@
++ $(CC) -D$(PLATFORM) $(INCLUDE) -Wall -fPIC $(CFLAGS) -c $^ -o $@
+
+ else
+ all install :
diff --git a/recipes-bsp/imx-lib/imx-lib.inc b/recipes-bsp/imx-lib/imx-lib.inc
new file mode 100644
index 00000000..314e153b
--- /dev/null
+++ b/recipes-bsp/imx-lib/imx-lib.inc
@@ -0,0 +1,30 @@
+# Copyright (C) 2012-2013 Freescale Semiconductor
+
+DESCRIPTION = "Platform specific libraries for imx platform"
+LICENSE = "LGPLv2.1"
+SECTION = "multimedia"
+DEPENDS = "virtual/kernel"
+
+LIC_FILES_CHKSUM = "file://ipu/mxc_ipu_hl_lib.h;endline=13;md5=6c7486b21a8524b1879fa159578da31e"
+
+PLATFORM_mx6 = "IMX6Q"
+PLATFORM_mx5 = "IMX51"
+PLATFORM_mx6sl = "IMX6S"
+PLATFORM_mx6sx = "IMX6S"
+
+PARALLEL_MAKE="-j 1"
+EXTRA_OEMAKE = ""
+
+SRC_URI = "${FSL_MIRROR}/imx-lib-${PV}.tar.gz"
+
+do_compile () {
+ INCLUDE_DIR="-I${STAGING_KERNEL_DIR}/include/uapi -I${STAGING_KERNEL_DIR}/include \
+ -I${STAGING_KERNEL_DIR}/drivers/mxc/security/rng/include \
+ -I${STAGING_KERNEL_DIR}/drivers/mxc/security/sahara2/include"
+
+ oe_runmake CROSS_COMPILE="${HOST_PREFIX}" PLATFORM="${PLATFORM}" INCLUDE="${INCLUDE_DIR}" all
+}
+
+do_install () {
+ oe_runmake PLATFORM="${PLATFORM}" DEST_DIR="${D}" install
+}
diff --git a/recipes-bsp/imx-lib/imx-lib_11.09.02.bb b/recipes-bsp/imx-lib/imx-lib_11.09.02.bb
new file mode 100644
index 00000000..16ca1df5
--- /dev/null
+++ b/recipes-bsp/imx-lib/imx-lib_11.09.02.bb
@@ -0,0 +1,9 @@
+# Copyright (C) 2013 Freescale Semiconductor
+require imx-lib.inc
+
+SRC_URI = "${FSL_MIRROR}/imx-lib-${PV}.tar.gz \
+ file://obey-variables.patch"
+SRC_URI[md5sum] = "a4e7447e35cfac0b966a51f001390d6e"
+SRC_URI[sha256sum] = "3ed082005789db0c9c41e14073417319f4e23f5646a7d21f34840470f4328bd5"
+
+COMPATIBLE_MACHINE = "(mx5)"
diff --git a/recipes-bsp/imx-lib/imx-lib_3.10.53-1.1.0.bb b/recipes-bsp/imx-lib/imx-lib_3.10.53-1.1.0.bb
new file mode 100644
index 00000000..4768ce9d
--- /dev/null
+++ b/recipes-bsp/imx-lib/imx-lib_3.10.53-1.1.0.bb
@@ -0,0 +1,10 @@
+# Copyright (C) 2013-2015 Freescale Semiconductor
+
+include imx-lib.inc
+
+PE = "1"
+
+SRC_URI[md5sum] = "c510512ebd2bae5a7e57079b9788960e"
+SRC_URI[sha256sum] = "4db2c1f286f2478b8236e62de4df9d2a2c26ff727c752dc4f21e2910f4a5e5d7"
+
+COMPATIBLE_MACHINE = "(mx6)"