[U-Boot] [PATCH 1/2] cmd: go: Make do_go available to outside boot.c
Simon Glass
sjg at chromium.org
Mon Jan 8 22:11:09 UTC 2018
Hi Emmanuel,
On 8 January 2018 at 03:00, Emmanuel Vadot <manu at bidouilliste.com> wrote:
>
>
> Hello Simon,
>
> On Sun, 7 Jan 2018 21:38:29 -0700
> Simon Glass <sjg at chromium.org> wrote:
>
> > Hi Emmanuel,
> >
> > On 2 January 2018 at 14:27, Emmanuel Vadot <manu at freebsd.org> wrote:
> > > Some commands (like sysboot) might want to call go as they can encounter
> > > a raw binary.
> > > Make do_go callable for everyone.
> > >
> > > Signed-off-by: Emmanuel Vadot <manu at freebsd.org>
> > > ---
> > > cmd/boot.c | 2 +-
> > > include/command.h | 4 ++++
> > > 2 files changed, 5 insertions(+), 1 deletion(-)
> >
> > Can we instead move the code out of do_go() into another function
> > which accepts C arguments, and then call that from do_go()?
>
> Sorry I do not understand what you mean.
int go_exec(ulong addr)
{
existing code to jump to addr
}
do_go()
{
existing code to parse args....
go_exec(addr)l
}
Then you can call go_eec() from cmd/boot.c
Regards,
Simon
More information about the U-Boot
mailing list