From: William Zhang <william.zhang@broadcom.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Standalone application support in SPL
Date: Tue, 6 Aug 2019 15:18:09 -0700 [thread overview]
Message-ID: <9cd5d83bec764e95748db7631994b4da@mail.gmail.com> (raw)
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
reply other threads:[~2019-08-06 22:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9cd5d83bec764e95748db7631994b4da@mail.gmail.com \
--to=william.zhang@broadcom.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox