package/rpi-userland: add option to install hello-pi examples
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 25 Jul 2015 09:15:13 +0000 (11:15 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 26 Jul 2015 16:31:59 +0000 (18:31 +0200)
rpi-userland comes with a set of demo programs that can be useful to
understand how to program HW-accelerated video/3D/fft/... on the RPi.

They can also be used to validate that the hardware is working properly.

[Thomas: explicitly pass ALL_APPS=OFF when
BR2_PACKAGE_RPI_USERLAND_HELLO is disabled.]

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/rpi-userland/0005-disable-missing-all-apps.patch [new file with mode: 0644]
package/rpi-userland/Config.in
package/rpi-userland/rpi-userland.mk

diff --git a/package/rpi-userland/0005-disable-missing-all-apps.patch b/package/rpi-userland/0005-disable-missing-all-apps.patch
new file mode 100644 (file)
index 0000000..520c7be
--- /dev/null
@@ -0,0 +1,30 @@
+From 249f6c8b44581083dfb16ebf66bfe94f7c9fb163 Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Date: Fri, 24 Jul 2015 20:20:33 +0200
+Subject: [PATCH] host-applications: disable missing applications
+
+Those applications are missing from the public rpi-firmware package, so
+do not even try to build them.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+---
+ host_applications/linux/CMakeLists.txt | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/host_applications/linux/CMakeLists.txt b/host_applications/linux/CMakeLists.txt
+index ea4e016..4a87862 100644
+--- a/host_applications/linux/CMakeLists.txt
++++ b/host_applications/linux/CMakeLists.txt
+@@ -10,9 +10,7 @@ add_subdirectory(apps/smem)
+ add_subdirectory(libs/debug_sym)
+ if(ALL_APPS)
+- add_subdirectory(apps/vcdbg)
+  # add_subdirectory(apps/smct)
+- add_subdirectory(apps/edid_parser)
+  add_subdirectory(apps/hello_pi)
+ endif()
+-- 
+1.9.1
+
index 0e88908d6d6b423377d725c6a8dbedadb1dd4657..9bb2bfc57079690089af4111e229f2365a801be3 100644 (file)
@@ -38,6 +38,11 @@ config BR2_PACKAGE_RPI_USERLAND_START_VCFILED
          vcfiled is a daemon serving files to VideoCore from the host file
          system.
 
+config BR2_PACKAGE_RPI_USERLAND_HELLO
+       bool "hello_pi examples"
+       help
+         Install the hello-pi examples to test the HW (GPU, camera...)
+
 endif
 
 comment "rpi-userland needs a toolchain w/ C++, threads, dynamic library"
index e2eadb2850f38583eddda918e984d87fc1bf210e..3a317338ed177e2831d5667c38d384f1cfb7ea26 100644 (file)
@@ -28,6 +28,26 @@ define RPI_USERLAND_INSTALL_INIT_SYSTEMD
 endef
 endif
 
+ifeq ($(BR2_PACKAGE_RPI_USERLAND_HELLO),y)
+
+RPI_USERLAND_CONF_OPTS += -DALL_APPS=ON
+
+define RPI_USERLAND_EXTRA_LIBS_TARGET
+       $(INSTALL) -m 0644 -D \
+               $(@D)/build/lib/libilclient.so \
+               $(TARGET_DIR)/usr/lib/libilcient.so
+endef
+RPI_USERLAND_POST_INSTALL_TARGET_HOOKS += RPI_USERLAND_EXTRA_LIBS_TARGET
+
+define RPI_USERLAND_EXTRA_LIBS_STAGING
+       $(INSTALL) -m 0644 -D \
+               $(@D)/build/lib/libilclient.so \
+               $(STAGING_DIR)/usr/lib/libilcient.so
+endef
+RPI_USERLAND_POST_INSTALL_STAGING_HOOKS += RPI_USERLAND_EXTRA_LIBS_STAGING
+
+endif # BR2_PACKAGE_RPI_USERLAND_HELLO
+
 define RPI_USERLAND_POST_TARGET_CLEANUP
        rm -f $(TARGET_DIR)/etc/init.d/vcfiled
        rm -f $(TARGET_DIR)/usr/share/install/vcfiled