[Concept,08/18] ulib: Add an option to build U-Boot as a library
Commit Message
From: Simon Glass <sjg@chromium.org>
It is sometimes useful to create a different main program for U-Boot,
or even to use some parts of U-Boot in an entirely different project.
Add a new option to allow building a .so from parts of U-Boot. For now
this does nothing.
Enable it by default for sandbox, excluding the tools-only build, where
it has no meaning.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
Kconfig | 9 +++++++++
configs/tools-only_defconfig | 1 +
2 files changed, 10 insertions(+)
@@ -98,6 +98,15 @@ config CC_OPTIMIZE_FOR_DEBUG
endchoice
+config ULIB
+ bool "Build U-Boot as a library"
+ default y if SANDBOX
+ help
+ Enable this to build a library which can be linked to other programs,
+ to extend U-Boot's functionality.
+
+ The library is called libu-boot.so
+
config OPTIMIZE_INLINING
bool "Allow compiler to uninline functions marked 'inline' in full U-Boot"
help
@@ -5,6 +5,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sandbox"
CONFIG_SYS_LOAD_ADDR=0x0
CONFIG_PCI=y
# CONFIG_SANDBOX_SDL is not set
+# CONFIG_ULIB is not set
# CONFIG_EFI_LOADER is not set
CONFIG_ANDROID_BOOT_IMAGE=y
CONFIG_TIMESTAMP=y