sunxi-mali test

The sunxi-mali repository includes a test application, enable support for
building and generating a new package (sunxi-mali-test) so it can be included
in an image at the user's discretion.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
This commit is contained in:
Trevor Woerner 2015-09-24 23:43:58 -04:00
parent 888ddfd531
commit b4357af03b
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,28 @@
From 054886253f4f559b351a94e1e6ebfd5eb504461f Mon Sep 17 00:00:00 2001
From: Trevor Woerner <twoerner@gmail.com>
Date: Thu, 24 Sep 2015 23:38:11 -0400
Subject: [PATCH] fix test build
Allow the test application to build and link successfully.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
test/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/Makefile b/test/Makefile
index 700416e..51481c9 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -5,7 +5,7 @@ CFLAGS ?= -Wall
all: test
test: ../config.mk test.c
- $(CC) $(CFLAGS) -o $@ test.c -lEGL -lGLESv2
+ $(CC) $(CFLAGS) -I../include -L../../image/usr/lib -o $@ test.c -lEGL -lGLESv2 -lX11
clean:
rm -f test
--
2.6.0.rc3

View File

@ -16,6 +16,7 @@ SRC_URI = "gitsm://github.com/linux-sunxi/sunxi-mali.git \
file://0001-Add-EGLSyncKHR-EGLTimeKHR-and-GLChar-definition.patch \ file://0001-Add-EGLSyncKHR-EGLTimeKHR-and-GLChar-definition.patch \
file://0002-Add-missing-GLchar-definition.patch \ file://0002-Add-missing-GLchar-definition.patch \
file://0003-Fix-sed-to-replace-by-the-correct-var.patch \ file://0003-Fix-sed-to-replace-by-the-correct-var.patch \
file://0001-fix-test-build.patch \
" "
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
@ -70,10 +71,16 @@ do_install() {
rm ${D}${libdir}/$flib rm ${D}${libdir}/$flib
ln -sf libMali.so.3 ${D}${libdir}/$flib ln -sf libMali.so.3 ${D}${libdir}/$flib
done done
DESTDIR=${D}/ VERSION=r3p0 ABI=armhf ${EXTRA_OECONF} make test
install -d ${D}${bindir}
install -m 0755 ${S}/test/test ${D}${bindir}/sunximali-test
} }
# Packages like xf86-video-fbturbo dlopen() libUMP.so, so we do need to ship the .so files in ${PN} # Packages like xf86-video-fbturbo dlopen() libUMP.so, so we do need to ship the .so files in ${PN}
PACKAGES =+ "${PN}-test"
FILES_${PN} += "${libdir}/lib*.so" FILES_${PN} += "${libdir}/lib*.so"
FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig/*" FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig/*"
FILES_${PN}-test = "${bindir}/sunximali-test"
# These are closed binaries generated elsewhere so don't check ldflags & text relocations # These are closed binaries generated elsewhere so don't check ldflags & text relocations
INSANE_SKIP_${PN} = "dev-so ldflags textrel" INSANE_SKIP_${PN} = "dev-so ldflags textrel"