From b4357af03bea51b01b7f8f9c9df5a2c1a91d764c Mon Sep 17 00:00:00 2001 From: Trevor Woerner Date: Thu, 24 Sep 2015 23:43:58 -0400 Subject: [PATCH] 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 --- .../sunxi-mali/0001-fix-test-build.patch | 28 +++++++++++++++++++ recipes-graphics/libgles/sunxi-mali_git.bb | 7 +++++ 2 files changed, 35 insertions(+) create mode 100644 recipes-graphics/libgles/sunxi-mali/0001-fix-test-build.patch diff --git a/recipes-graphics/libgles/sunxi-mali/0001-fix-test-build.patch b/recipes-graphics/libgles/sunxi-mali/0001-fix-test-build.patch new file mode 100644 index 0000000..b43b4c6 --- /dev/null +++ b/recipes-graphics/libgles/sunxi-mali/0001-fix-test-build.patch @@ -0,0 +1,28 @@ +From 054886253f4f559b351a94e1e6ebfd5eb504461f Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +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 +--- + 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 + diff --git a/recipes-graphics/libgles/sunxi-mali_git.bb b/recipes-graphics/libgles/sunxi-mali_git.bb index 0179fa7..511e5d0 100644 --- a/recipes-graphics/libgles/sunxi-mali_git.bb +++ b/recipes-graphics/libgles/sunxi-mali_git.bb @@ -16,6 +16,7 @@ SRC_URI = "gitsm://github.com/linux-sunxi/sunxi-mali.git \ file://0001-Add-EGLSyncKHR-EGLTimeKHR-and-GLChar-definition.patch \ file://0002-Add-missing-GLchar-definition.patch \ file://0003-Fix-sed-to-replace-by-the-correct-var.patch \ + file://0001-fix-test-build.patch \ " S = "${WORKDIR}/git" @@ -70,10 +71,16 @@ do_install() { rm ${D}${libdir}/$flib ln -sf libMali.so.3 ${D}${libdir}/$flib 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 =+ "${PN}-test" FILES_${PN} += "${libdir}/lib*.so" 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 INSANE_SKIP_${PN} = "dev-so ldflags textrel"