diff options
-rw-r--r-- | recipes-bsp/imx-test/imx-test/0001-imx-test-Fix-Makefiles-to-handle-library-dependencie.patch | 170 | ||||
-rw-r--r-- | recipes-bsp/imx-test/imx-test_5.4.1.bb | 2 |
2 files changed, 172 insertions, 0 deletions
diff --git a/recipes-bsp/imx-test/imx-test/0001-imx-test-Fix-Makefiles-to-handle-library-dependencie.patch b/recipes-bsp/imx-test/imx-test/0001-imx-test-Fix-Makefiles-to-handle-library-dependencie.patch new file mode 100644 index 0000000..417e29c --- /dev/null +++ b/recipes-bsp/imx-test/imx-test/0001-imx-test-Fix-Makefiles-to-handle-library-dependencie.patch | |||
@@ -0,0 +1,170 @@ | |||
1 | From 251612f51136568331d3cf3826bf08c3f70d7eee Mon Sep 17 00:00:00 2001 | ||
2 | From: Lauren Post <lauren.post@nxp.com> | ||
3 | Date: Wed, 24 Aug 2016 14:54:33 -0500 | ||
4 | Subject: [PATCH] imx-test: Fix Makefiles to handle library dependencies | ||
5 | |||
6 | Applications with library dependencies need different handling to pull in both | ||
7 | CFLAGS and LDFLAGS. Without these changes the library dependencies are not | ||
8 | linked in correctly causing build breaks. | ||
9 | |||
10 | Signed-off-by: Lauren Post <lauren.post@nxp.com> | ||
11 | --- | ||
12 | test/mxc_cec_test/Makefile | 13 ++++++++++--- | ||
13 | test/mxc_i2c_slave_test/Makefile | 12 ++++++++++-- | ||
14 | test/mxc_mpeg4_enc_test/Makefile | 18 ++++++------------ | ||
15 | test/pxp_lib_test/Makefile | 16 ++++++++++------ | ||
16 | test/pxp_v4l2_test/Makefile | 19 ++++++++++++++++--- | ||
17 | 5 files changed, 52 insertions(+), 26 deletions(-) | ||
18 | |||
19 | diff --git a/test/mxc_cec_test/Makefile b/test/mxc_cec_test/Makefile | ||
20 | index 8327784..9d7ee9e 100755 | ||
21 | --- a/test/mxc_cec_test/Makefile | ||
22 | +++ b/test/mxc_cec_test/Makefile | ||
23 | @@ -2,11 +2,18 @@ | ||
24 | # Makefile for MediaLB driver test app. | ||
25 | # | ||
26 | INC += -I$(LINUXPATH)/include | ||
27 | -CFLAGS += -lpthread -lcec -lrt | ||
28 | |||
29 | -OBJS = $(OBJDIR)/mxc_cec_test.out | ||
30 | +TARGET = $(OBJDIR)/mxc_cec_test.out | ||
31 | +OBJ = mxc_cec_test.o | ||
32 | + | ||
33 | +all : $(TARGET) | ||
34 | + | ||
35 | +LDFLAGS += -lpthread -lcec -lrt -lstdc++ -pthread | ||
36 | + | ||
37 | +$(TARGET):$(OBJ) | ||
38 | + $(CC) -o $(TARGET) $(OBJ) $(LDFLAGS) -Os | ||
39 | + $(STRIP) $(TARGET) | ||
40 | |||
41 | -all : $(OBJS) | ||
42 | |||
43 | .PHONY: clean | ||
44 | clean : | ||
45 | diff --git a/test/mxc_i2c_slave_test/Makefile b/test/mxc_i2c_slave_test/Makefile | ||
46 | index 07d0ff1..2b6b8ef 100644 | ||
47 | --- a/test/mxc_i2c_slave_test/Makefile | ||
48 | +++ b/test/mxc_i2c_slave_test/Makefile | ||
49 | @@ -2,9 +2,17 @@ | ||
50 | |||
51 | CFLAGS += -lpthread | ||
52 | |||
53 | -OBJS = $(OBJDIR)/mxc_i2c_slave_test.out | ||
54 | +TARGET = $(OBJDIR)/mxc_i2c_slave_test.out | ||
55 | |||
56 | -all : $(OBJS) | ||
57 | +all : $(TARGET) | ||
58 | + | ||
59 | +LDFLAGS += -lpthread -lstdc++ -pthread | ||
60 | + | ||
61 | +OBJ = mxc_i2c_slave_test.o | ||
62 | + | ||
63 | +$(TARGET):$(OBJ) | ||
64 | + $(CC) -o $(TARGET) $(OBJ) $(LDFLAGS) -Os | ||
65 | + $(STRIP) $(TARGET) | ||
66 | |||
67 | .PHONY: clean | ||
68 | clean : | ||
69 | diff --git a/test/mxc_mpeg4_enc_test/Makefile b/test/mxc_mpeg4_enc_test/Makefile | ||
70 | index 842ab58..1de4115 100644 | ||
71 | --- a/test/mxc_mpeg4_enc_test/Makefile | ||
72 | +++ b/test/mxc_mpeg4_enc_test/Makefile | ||
73 | @@ -6,27 +6,21 @@ CFLAGS += -I . -lpthread | ||
74 | |||
75 | EXES = $(OBJDIR)/cam2mpeg4.out | ||
76 | SCRIPTS = $(OBJDIR)/autorun-hantro.sh | ||
77 | -ifeq "$(PLATFORM)" "MXC30030EVB" | ||
78 | -LIBS = libmpeg4enc_cif.a | ||
79 | -TEMP_EXE = $(OBJDIR)/cam2mpeg4_cif.out | ||
80 | -OBJS = $(OBJDIR)/cam2mpeg4_cif.o | ||
81 | -else | ||
82 | LIBS = libmpeg4enc_vga.a | ||
83 | -TEMP_EXE = $(OBJDIR)/cam2mpeg4_vga.out | ||
84 | -OBJS = $(OBJDIR)/cam2mpeg4_vga.o | ||
85 | -endif | ||
86 | +OBJS = cam2mpeg4_vga.o | ||
87 | |||
88 | all: $(EXES) $(SCRIPTS) | ||
89 | |||
90 | -$(EXES): $(TEMP_EXE) | ||
91 | - @mv $< $@ | ||
92 | +LDFLAGS += -lpthread | ||
93 | + | ||
94 | +$(EXES): $(OBJS) | ||
95 | + $(CC) -o $(EXES) $(OBJS) libmpeg4enc_vga.a $(LDFLAGS) -Os | ||
96 | + $(STRIP) $(EXES) | ||
97 | |||
98 | .PHONY: clean | ||
99 | clean: | ||
100 | rm -f $(EXES) $(OBJS) $(SCRIPTS) | ||
101 | |||
102 | -$(TEMP_EXE): $(LIBS) | ||
103 | - | ||
104 | # | ||
105 | # include the Rules | ||
106 | # | ||
107 | diff --git a/test/pxp_lib_test/Makefile b/test/pxp_lib_test/Makefile | ||
108 | index 978bea5..c73e4c2 100644 | ||
109 | --- a/test/pxp_lib_test/Makefile | ||
110 | +++ b/test/pxp_lib_test/Makefile | ||
111 | @@ -1,13 +1,16 @@ | ||
112 | SRCS = pxp_test.c utils.c | ||
113 | -CFLAGS += -lpxp -lpthread | ||
114 | |||
115 | -OBJS = $(OBJDIR)/pxp_test.out \ | ||
116 | - $(OBJDIR)/autorun-pxp.sh | ||
117 | -$(OBJS): $(SRCS) | ||
118 | - mkdir -p $(OBJDIR) | ||
119 | - $(VERBOSE) $(CC) -g $(INC) $(CFLAGS) $^ $(LIBS) -o $@ | ||
120 | +TARGET = $(OBJDIR)/pxp_test.out | ||
121 | |||
122 | -all: $(OBJS) | ||
123 | +all: $(TARGET) | ||
124 | + | ||
125 | +OBJ = pxp_test.o utils.o | ||
126 | + | ||
127 | +LDFLAGS += -pthread -lpxp -lstdc++ -pthread | ||
128 | + | ||
129 | +$(OBJDIR)/pxp_test.out: $(OBJ) | ||
130 | + $(CC) -o $(OBJDIR)/pxp_test.out $(OBJ) $(LDFLAGS) -Os | ||
131 | + $(STRIP) $(OBJDIR)/pxp_test.out | ||
132 | |||
133 | .PHONY: clean | ||
134 | clean: | ||
135 | diff --git a/test/pxp_v4l2_test/Makefile b/test/pxp_v4l2_test/Makefile | ||
136 | index 8f72e63..da83f8a 100644 | ||
137 | --- a/test/pxp_v4l2_test/Makefile | ||
138 | +++ b/test/pxp_v4l2_test/Makefile | ||
139 | @@ -1,12 +1,25 @@ | ||
140 | # Just use the pxp library to get contiguous physical memory for USERPTR testing | ||
141 | # However, be aware that this is not the only way. | ||
142 | -CFLAGS += -lpthread -lpxp -DGET_CONTI_PHY_MEM_VIA_PXP_LIB | ||
143 | +CFLAGS += -DGET_CONTI_PHY_MEM_VIA_PXP_LIB | ||
144 | |||
145 | -OBJS = $(OBJDIR)/pxp_v4l2_test.out \ | ||
146 | +TARGET = $(OBJDIR)/pxp_v4l2_test.out \ | ||
147 | $(OBJDIR)/pxp_v4l2_out_test.sh \ | ||
148 | $(OBJDIR)/mx6s_v4l2_capture.out | ||
149 | |||
150 | -all : $(OBJS) | ||
151 | +all : $(TARGET) | ||
152 | + | ||
153 | +LDFLAGS += -lpthread -lpxp -lstdc++ -pthread | ||
154 | + | ||
155 | +$(OBJDIR)/pxp_v4l2_test.out : pxp_v4l2_test.o | ||
156 | + $(CC) -o $(OBJDIR)/pxp_v4l2_test.out pxp_v4l2_test.o $(LDFLAGS) -Os | ||
157 | + $(STRIP) $(OBJDIR)/pxp_v4l2_test.out | ||
158 | + | ||
159 | +$(OBJDIR)/mx6s_v4l2_capture.out : mx6s_v4l2_capture.o | ||
160 | + $(CC) -o $(OBJDIR)/mx6s_v4l2_capture.out mx6s_v4l2_capture.o $(LDFLAGS) -Os | ||
161 | + $(STRIP) $(OBJDIR)/mx6s_v4l2_capture.out | ||
162 | + | ||
163 | +$(OBJDIR)/pxp_v4l2_out_test.sh: pxp_v4l2_out_test.sh | ||
164 | + cp pxp_v4l2_out_test.sh $(OBJDIR) | ||
165 | |||
166 | .PHONY: clean | ||
167 | clean : | ||
168 | -- | ||
169 | 1.9.1 | ||
170 | |||
diff --git a/recipes-bsp/imx-test/imx-test_5.4.1.bb b/recipes-bsp/imx-test/imx-test_5.4.1.bb index e33cc8d..b3bad70 100644 --- a/recipes-bsp/imx-test/imx-test_5.4.1.bb +++ b/recipes-bsp/imx-test/imx-test_5.4.1.bb | |||
@@ -5,6 +5,8 @@ include imx-test.inc | |||
5 | SRC_URI[md5sum] = "fa1a5cdcfbdd6a3fed0ab4a5fd1f97bc" | 5 | SRC_URI[md5sum] = "fa1a5cdcfbdd6a3fed0ab4a5fd1f97bc" |
6 | SRC_URI[sha256sum] = "997ec10bdc6991e9687a2c2fa5816bb50b08d73bcfe4093f988a7cac4bf0b06a" | 6 | SRC_URI[sha256sum] = "997ec10bdc6991e9687a2c2fa5816bb50b08d73bcfe4093f988a7cac4bf0b06a" |
7 | 7 | ||
8 | SRC_URI += "file://0001-imx-test-Fix-Makefiles-to-handle-library-dependencie.patch" | ||
9 | |||
8 | PR = "r1" | 10 | PR = "r1" |
9 | 11 | ||
10 | COMPATIBLE_MACHINE = "(mx6|mx6ul|mx7)" | 12 | COMPATIBLE_MACHINE = "(mx6|mx6ul|mx7)" |