[U-Boot] Standalone application support in SPL
William Zhang
william.zhang at broadcom.com
Tue Aug 6 22:18:09 UTC 2019
Hi All,
Has anyone come across to the need to run the standalone application in
SPL? Due to the onchip SRAM size limitation in our chip, we will need run
the small foot print SPL to initialization DDR before we load the u-boot
proper to the main DDR memory. We will have to run our DDR initialization
in standalone application binary mode due to some restriction of library. I
posted a separate thread here
https://lists.denx.de/pipermail/u-boot/2019-August/379585.html. Understand
SPL does not have a shell to load the application interactively but one can
load the binary from flash and jump to its entry point when it is needed
during the boot of SPL.
I looked through u-boot code and it is fairly straightforward to enable
standalone application in SPL. All it takes are adding configure option in
spl/Kconfig, makefile changes to include export.c and examples folder and
jumptable init in the spl init time.
I do need to ifdef the do_reset as dummy for SPL in the _export.h due to
the fact that do_reset function is not available in SPL without enabling a
lot of supporting code. It looks to me add ifdef is the simplest way to
go and does not break any other build.
#if !defined(CONFIG_SPL_STANDALONE)
EXPORT_FUNC(do_reset, int, do_reset, cmd_tbl_t *,
int , int , char * const [])
#else
EXPORT_FUNC(dummy, void, do_reset, void)
#endif
Any feedback and comments are appreciated! I can post a patch for review
and contribute to u-boot if this sounds a good add-on for SPL.
Thanks,
William
More information about the U-Boot
mailing list