U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] examples: make examples customizable
@ 2020-09-22 18:03 Heinrich Schuchardt
  2020-09-22 18:03 ` Heinrich Schuchardt
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Heinrich Schuchardt @ 2020-09-22 18:03 UTC (permalink / raw)
  To: u-boot

Most users don't need the standalone API examples. Distributions like Suse
do not supply libgcc for cross-compiling and we cannot do without on ARMv8
for building examples/.

Make examples customizable via symbol CONFIG_EXAMPLES. It only defaults to
yes to ensure that we compile it on Gitlab CI.

Cc: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
I wonder if we should not completely drop the standalone API. The UEFI API
has enough to run a standalone application.
---
 Kconfig           | 8 ++++++++
 examples/Makefile | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/Kconfig b/Kconfig
index 883e3f71d0..d0eae2ceba 100644
--- a/Kconfig
+++ b/Kconfig
@@ -422,6 +422,14 @@ config SYS_SRAM_SIZE
 	default 0x10000 if TARGET_TRICORDER
 	default 0x0

+config EXAMPLES
+	bool "Compile API examples"
+	depends on !SANDBOX
+	default y
+	help
+	  U-Boot provides an API for standalone applications. Examples are
+	  provided in directory examples/.
+
 endmenu		# General setup

 menu "Boot images"
diff --git a/examples/Makefile b/examples/Makefile
index d440bc5655..bf518bd221 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0+

-ifndef CONFIG_SANDBOX
+ifdef CONFIG_EXAMPLES

 ifdef FTRACE
 subdir-ccflags-y += -finstrument-functions -DFTRACE
--
2.28.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-23 11:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-22 18:03 [PATCH 1/1] examples: make examples customizable Heinrich Schuchardt
2020-09-22 18:03 ` Heinrich Schuchardt
2020-09-23 11:37   ` Matthias Brugger
2020-09-22 18:42 ` Tom Rini
2020-09-22 18:49   ` Heinrich Schuchardt
2020-09-22 20:18     ` Tom Rini
2020-09-22 18:47 ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox