ulib: Add an option to build U-Boot as a library

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>
This commit is contained in:
Simon Glass
2025-09-03 09:24:40 -06:00
parent 0725962096
commit 39579c5caf
2 changed files with 10 additions and 0 deletions

View File

@@ -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