* [U-Boot] Standalone application support in SPL
@ 2019-08-06 22:18 William Zhang
0 siblings, 0 replies; only message in thread
From: William Zhang @ 2019-08-06 22:18 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-06 22:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-06 22:18 [U-Boot] Standalone application support in SPL William Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox