summaryrefslogtreecommitdiffstats
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 @@
1Obey CFLAGS, LDFLAGS
2
3Signed-off-by: Christopher Larson <chris_larson@mentor.com>
4Upstream-status: Pending
5
6--- imx-lib-11.09.02.orig/hdmi-cec/Makefile 2014-09-02 13:04:37.114250749 -0700
7+++ imx-lib-11.09.02/hdmi-cec/Makefile 2014-09-02 13:04:37.086250568 -0700
8@@ -1,5 +1,6 @@
9 CC ?=$(CROSS_COMPILE)gcc
10 AR ?=$(CROSS_COMPILE)ar
11+CFLAGS ?=-O2
12
13 # list of platforms which want this test case
14 INCLUDE_LIST:= IMX6Q
15@@ -32,10 +33,10 @@
16 endif
17
18 %.o: %.c
19- $(CC) -D$(PLATFORM) -Wall -O2 -fPIC -c $^ -o $@
20+ $(CC) -D$(PLATFORM) -Wall -fPIC $(CFLAGS) -c $^ -o $@
21
22 $(LIBNAME).so.$(SONAMEVERSION): $(OBJ)
23- $(CC) -shared -nostartfiles -Wl,-soname,$@ $^ -o $@
24+ $(CC) -shared -nostartfiles -Wl,-soname,$@ $^ -o $@ $(LDFLAGS)
25
26 $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
27 ln -s $< $@
28--- imx-lib-11.09.02.orig/ipu/Makefile 2014-09-02 13:04:37.114250749 -0700
29+++ imx-lib-11.09.02/ipu/Makefile 2014-09-02 13:05:11.062458117 -0700
30@@ -1,5 +1,6 @@
31 CC ?=$(CROSS_COMPILE)gcc
32 AR ?=$(CROSS_COMPILE)ar
33+CFLAGS ?=-O2
34
35 ifeq ($(PLATFORM), IMX6Q)
36 OBJS = mxc_ipu_hl_lib_dummy.o
37@@ -28,7 +29,7 @@
38 endif
39
40 $(LIBNAME).so.$(SONAMEVERSION): $(OBJS)
41- $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ -lpthread
42+ $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ -lpthread $(LDFLAGS)
43
44 $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
45 ln -s $< $@
46@@ -37,7 +38,7 @@
47 ifeq "$(PLATFORM)" ""
48 $(error "Unspecified PLATFORM variable")
49 endif
50- $(CC) -D$(PLATFORM) $(INCLUDE) -Wall -O2 -fPIC -c $^ -o $@
51+ $(CC) -D$(PLATFORM) $(INCLUDE) -Wall -fPIC $(CFLAGS) -c $^ -o $@
52
53 .PHONY: clean
54 clean:
55--- imx-lib-11.09.02.orig/pxp/Makefile 2014-09-02 13:04:37.114250749 -0700
56+++ imx-lib-11.09.02/pxp/Makefile 2014-09-02 13:05:53.354716651 -0700
57@@ -1,5 +1,6 @@
58 CC ?=$(CROSS_COMPILE)gcc
59 AR ?=$(CROSS_COMPILE)ar
60+CFLAGS ?=-O2
61
62 # list of platforms which want this test case
63 INCLUDE_LIST:=IMX50 IMX51 IMX5 IMX6Q IMX6S
64@@ -25,10 +26,10 @@
65 endif
66
67 %.o: %.c
68- $(CC) -D$(PLATFORM) $(INCLUDE) -Wall -O2 -fPIC -c $^ -o $@
69+ $(CC) -D$(PLATFORM) $(INCLUDE) -Wall -fPIC $(CFLAGS) -c $^ -o $@
70
71 $(LIBNAME).so.$(SONAMEVERSION): $(OBJ)
72- $(CC) -shared -nostartfiles -Wl,-soname,$@ $^ -o $@
73+ $(CC) -shared -nostartfiles -Wl,-soname,$@ $^ -o $@ $(LDFLAGS)
74
75 $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
76 ln -s $< $@
77--- imx-lib-11.09.02.orig/rng/Makefile 2014-09-02 13:04:37.114250749 -0700
78+++ imx-lib-11.09.02/rng/Makefile 2014-09-02 13:04:37.086250568 -0700
79@@ -4,16 +4,17 @@
80 AR = ar -crv
81 RM = rm -f
82 CC ?=$(CROSS_COMPILE)gcc
83-LD=$(CROSS_COMPILE)ld
84+LD ?=$(CROSS_COMPILE)ld
85+CFLAGS ?=-g
86
87 INC := $(INCLUDE)
88
89 # Add compilation checks
90-CFLAGS += -g -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -fPIC
91+override CFLAGS += -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -fPIC
92
93 # In absence of kernel CONFIG flags, set API library to build on
94 # 'unknown' platform.
95-CFLAGS += -DFSL_PLATFORM_OTHER -DFSL_HAVE_RNGC $(INC)
96+override CFLAGS += -DFSL_PLATFORM_OTHER -DFSL_HAVE_RNGC $(INC)
97
98 OBJS= fsl_shw_rand.o fsl_shw_hash.o fsl_shw_sym.o fsl_shw_user.o \
99 fsl_shw_keystore.o fsl_shw_auth.o fsl_shw_hmac.o fsl_shw_wrap.o
100@@ -34,7 +35,7 @@
101 $(AR) $@ $^
102
103 $(LIBNAME).so.$(SONAMEVERSION): $(OBJS)
104- $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^
105+ $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ $(LDFLAGS)
106
107 $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
108 ln -s $< $@
109--- imx-lib-11.09.02.orig/sahara2/Makefile 2014-09-02 13:04:37.114250749 -0700
110+++ imx-lib-11.09.02/sahara2/Makefile 2014-09-02 13:04:37.086250568 -0700
111@@ -4,7 +4,8 @@
112 AR = ar -crv
113 RM = rm -f
114 CC ?=$(CROSS_COMPILE)gcc
115-LD=$(CROSS_COMPILE)ld
116+LD ?=$(CROSS_COMPILE)ld
117+CFLAGS ?=-g
118
119 INC := $(INCLUDE)
120
121@@ -18,19 +19,19 @@
122 endif
123
124 # Add compilation checks
125-CFLAGS += -g -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -fPIC
126+override CFLAGS += -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -fPIC
127
128 OBJS= fsl_shw_rand.o fsl_shw_hash.o fsl_shw_sym.o fsl_shw_user.o \
129 fsl_shw_auth.o fsl_shw_hmac.o fsl_shw_wrap.o fsl_shw_keystore.o um_adaptor.o sf_util.o
130
131
132 #CFLAGS += -DSAHARA -DLINUX -I$(APIINCDIR)
133-CFLAGS += -DSAHARA -DLINUX $(INC)
134-CFLAGS += $(TARGET_ARCH)
135+override CFLAGS += -DSAHARA -DLINUX $(INC)
136+override CFLAGS += $(TARGET_ARCH)
137 # Uncomment to debug Library's creation of structures for driver
138-#CFLAGS += -DDIAG_SECURITY_FUNC
139+#override CFLAGS += -DDIAG_SECURITY_FUNC
140 # Uncomment to simulate memory allocation errors
141-#CFLAGS += -DDIAG_MEM_ERRORS -DDIAG_MEM_CONST=5
142+#override CFLAGS += -DDIAG_MEM_ERRORS -DDIAG_MEM_CONST=5
143
144 LIBNAME=libsahara
145 SONAMEVERSION=0
146@@ -53,7 +54,7 @@
147 $(AR) $@ $^
148
149 $(LIBNAME).so.$(SONAMEVERSION): $(OBJS)
150- $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^
151+ $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ $(LDFLAGS)
152
153 $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
154 ln -s $< $@
155--- imx-lib-11.09.02.orig/screenlayer/Makefile 2014-09-02 13:04:37.114250749 -0700
156+++ imx-lib-11.09.02/screenlayer/Makefile 2014-09-02 13:04:37.086250568 -0700
157@@ -1,5 +1,6 @@
158 CC ?=$(CROSS_COMPILE)gcc
159 AR ?=$(CROSS_COMPILE)ar
160+CFLAGS ?=-O2
161 INC = $(INCLUDE) -I../ipu
162
163 OBJS = ScreenLayer.o
164@@ -24,13 +25,13 @@
165 endif
166
167 $(LIBNAME).so.$(SONAMEVERSION): $(OBJS)
168- $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ -L../ipu -lipu
169+ $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ -L../ipu -lipu $(LDFLAGS)
170
171 $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
172 ln -s $< $@
173
174 %.o: %.c
175- $(CC) $(INC) -Wall -O2 -fPIC -c $^ -o $@
176+ $(CC) $(INC) -Wall -fPIC $(CFLAGS) -c $^ -o $@
177
178 .PHONY: clean
179 clean:
180--- imx-lib-11.09.02.orig/sim/Makefile 2014-09-02 13:04:37.114250749 -0700
181+++ imx-lib-11.09.02/sim/Makefile 2014-09-02 13:04:37.086250568 -0700
182@@ -1,9 +1,10 @@
183 CC ?=$(CROSS_COMPILE)gcc
184 AR ?=$(CROSS_COMPILE)ar
185+CFLAGS ?=-O2
186
187 OBJS = iso7816-3.o
188
189-CFLAGS += $(INCLUDE)
190+override CFLAGS += $(INCLUDE)
191
192 LIBNAME=libsim
193 SONAMEVERSION=0
194@@ -21,13 +22,13 @@
195 cp iso7816-3.h $(DEST_DIR)/usr/include
196
197 $(LIBNAME).so.$(SONAMEVERSION): $(OBJS)
198- $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ -lpthread
199+ $(CC) -shared -nostartfiles -Wl,-soname,$@ -o $@ $^ -lpthread $(LDFLAGS)
200
201 $(LIBNAME).so: $(LIBNAME).so.$(SONAMEVERSION)
202 ln -s $< $@
203
204 %.o: %.c
205- $(CC) -D$(PLATFORM) $(INCLUDE) -Wall -O2 -fPIC -c $^ -o $@
206+ $(CC) -D$(PLATFORM) $(INCLUDE) -Wall -fPIC $(CFLAGS) -c $^ -o $@
207
208 else
209 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 @@
1# Copyright (C) 2012-2013 Freescale Semiconductor
2
3DESCRIPTION = "Platform specific libraries for imx platform"
4LICENSE = "LGPLv2.1"
5SECTION = "multimedia"
6DEPENDS = "virtual/kernel"
7
8LIC_FILES_CHKSUM = "file://ipu/mxc_ipu_hl_lib.h;endline=13;md5=6c7486b21a8524b1879fa159578da31e"
9
10PLATFORM_mx6 = "IMX6Q"
11PLATFORM_mx5 = "IMX51"
12PLATFORM_mx6sl = "IMX6S"
13PLATFORM_mx6sx = "IMX6S"
14
15PARALLEL_MAKE="-j 1"
16EXTRA_OEMAKE = ""
17
18SRC_URI = "${FSL_MIRROR}/imx-lib-${PV}.tar.gz"
19
20do_compile () {
21 INCLUDE_DIR="-I${STAGING_KERNEL_DIR}/include/uapi -I${STAGING_KERNEL_DIR}/include \
22 -I${STAGING_KERNEL_DIR}/drivers/mxc/security/rng/include \
23 -I${STAGING_KERNEL_DIR}/drivers/mxc/security/sahara2/include"
24
25 oe_runmake CROSS_COMPILE="${HOST_PREFIX}" PLATFORM="${PLATFORM}" INCLUDE="${INCLUDE_DIR}" all
26}
27
28do_install () {
29 oe_runmake PLATFORM="${PLATFORM}" DEST_DIR="${D}" install
30}
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 @@
1# Copyright (C) 2013 Freescale Semiconductor
2require imx-lib.inc
3
4SRC_URI = "${FSL_MIRROR}/imx-lib-${PV}.tar.gz \
5 file://obey-variables.patch"
6SRC_URI[md5sum] = "a4e7447e35cfac0b966a51f001390d6e"
7SRC_URI[sha256sum] = "3ed082005789db0c9c41e14073417319f4e23f5646a7d21f34840470f4328bd5"
8
9COMPATIBLE_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 @@
1# Copyright (C) 2013-2015 Freescale Semiconductor
2
3include imx-lib.inc
4
5PE = "1"
6
7SRC_URI[md5sum] = "c510512ebd2bae5a7e57079b9788960e"
8SRC_URI[sha256sum] = "4db2c1f286f2478b8236e62de4df9d2a2c26ff727c752dc4f21e2910f4a5e5d7"
9
10COMPATIBLE_MACHINE = "(mx6)"