userland: add knob for ALL_APPS

The userland sources include a bunch of sample applications. Add an "allapps"
PACKAGECONFIG to allow the user to build the additional optional applications.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
This commit is contained in:
Trevor Woerner 2020-11-27 05:16:37 -05:00 committed by Andrei Gherzan
parent 1da8814f8a
commit 3a1fec22c0
No known key found for this signature in database
GPG Key ID: 73BBE86B7E7AB7CF
3 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,30 @@
From 451e8458e45926e4e1c0433864ac4cf8b05d792b Mon Sep 17 00:00:00 2001
From: Trevor Woerner <twoerner@gmail.com>
Date: Fri, 27 Nov 2020 03:12:26 -0500
Subject: [PATCH] all host_applications: remove non-existent projects
The ALL_APPS symbol will optionally build an additional set of projects,
however, several of them don't exist anymore. Remove them from the list of
ALL_APPS.
Upstream-status: submitted [https://github.com/raspberrypi/userland/pull/661]
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
host_applications/linux/CMakeLists.txt | 4 ----
1 file changed, 4 deletions(-)
diff --git a/host_applications/linux/CMakeLists.txt b/host_applications/linux/CMakeLists.txt
index 928b637..554ae46 100644
--- a/host_applications/linux/CMakeLists.txt
+++ b/host_applications/linux/CMakeLists.txt
@@ -14,10 +14,6 @@ add_subdirectory(apps/dtoverlay)
add_subdirectory(apps/dtmerge)
if(ALL_APPS)
- add_subdirectory(apps/vcdbg)
- add_subdirectory(libs/elftoolchain)
- # add_subdirectory(apps/smct)
- add_subdirectory(apps/edid_parser)
add_subdirectory(apps/hello_pi)
endif()

View File

@ -0,0 +1,28 @@
From 5f4324a0008c2e8e1f511432f98bf85c9fffd35c Mon Sep 17 00:00:00 2001
From: Trevor Woerner <twoerner@gmail.com>
Date: Fri, 27 Nov 2020 03:18:50 -0500
Subject: [PATCH] hello_pi: optionally build wayland-specific app
Only build the wayland-specific hello_pi app when building for wayland.
Upstream-status: inappropriate [the wayland example is not part of upstream]
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
host_applications/linux/apps/hello_pi/CMakeLists.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/host_applications/linux/apps/hello_pi/CMakeLists.txt b/host_applications/linux/apps/hello_pi/CMakeLists.txt
index 2849fad..7de3265 100644
--- a/host_applications/linux/apps/hello_pi/CMakeLists.txt
+++ b/host_applications/linux/apps/hello_pi/CMakeLists.txt
@@ -25,7 +25,9 @@ add_subdirectory(hello_encode)
add_subdirectory(hello_jpeg)
add_subdirectory(hello_videocube)
add_subdirectory(hello_teapot)
-add_subdirectory(hello_wayland)
+if (BUILD_WAYLAND)
+ add_subdirectory(hello_wayland)
+endif()
if(BUILD_FONT)
set(VGFONT_SRCS libs/vgfont/font.c libs/vgfont/vgft.c libs/vgfont/graphics.c)

View File

@ -42,6 +42,8 @@ SRC_URI = "\
file://0019-libfdt-Undefine-__wordsize-if-already-defined.patch \
file://0020-openmaxil-add-pkg-config-file.patch \
file://0021-cmake-Disable-format-overflow-warning-as-error.patch \
file://0022-all-host_applications-remove-non-existent-projects.patch \
file://0023-hello_pi-optionally-build-wayland-specific-app.patch \
"
SRC_URI_remove_toolchain-clang = "file://0021-cmake-Disable-format-overflow-warning-as-error.patch"
@ -52,8 +54,10 @@ inherit cmake pkgconfig
ASNEEDED = ""
ALLAPPS = "${@bb.utils.contains('PACKAGECONFIG', 'allapps', '-DALL_APPS=true', '', d)}"
EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed' \
-DVMCS_INSTALL_PREFIX=${exec_prefix} \
${ALLAPPS} \
"
EXTRA_OECMAKE_append_aarch64 = " -DARM64=ON "