public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, RFC, v2] bootm: fix passing argc to standalone apps
Date: Mon, 3 Oct 2016 09:36:49 -0400	[thread overview]
Message-ID: <20161003133649.GC4884@bill-the-cat> (raw)
In-Reply-To: <1473409138-54696-1-git-send-email-Zubair.Kakakhel@imgtec.com>

On Fri, Sep 09, 2016 at 09:18:58AM +0100, Zubair Lutfullah Kakakhel wrote:

> This bug appears in b6396403 which makes u-boot unable to pass
> arguments via bootm to a standalone application without this patch.
> 
> Steps to reproduce.
> 
> Compile a u-boot. Use mkimage to package the standalone hello_world.bin
> file.
> 
> e.g. For the MIPS Boston platform
> 
> mkimage -n "hello" -A mips -O u-boot -C none -T standalone \
>      -a 0xffffffff80200000 -d hello_world.bin \
>      -ep 0xffffffff80200000 hello_out
> 
> Then tftp hello_out and run it using
> 
> boston # dhcp 192.168.154.45:hello_out
> ...
> boston # bootm $loadaddr 123 321
> 
> Without the patch the following output is observed.
> 
> boston # bootm $loadaddr 123 321
>    Image Name:   hello
>    Image Type:   MIPS U-Boot Standalone Program (uncompressed)
>    Data Size:    1240 Bytes = 1.2 KiB
>    Load Address: 80200000
>    Entry Point:  80200000
>    Verifying Checksum ... OK
>    Loading Standalone Program ... OK
> Example expects ABI version 8
> Actual U-Boot ABI version 8
> Hello World
> argc = 0
> argv[0] = "0xffffffff88000000"
> 
> With the patch, you see the following.
> 
> boston # bootm $loadaddr 123 321
>    Image Name:   hello
>    Image Type:   MIPS U-Boot Standalone Program (uncompressed)
>    Data Size:    1240 Bytes = 1.2 KiB
>    Load Address: 80200000
>    Entry Point:  80200000
>    Verifying Checksum ... OK
>    Loading Standalone Program ... OK
> Example expects ABI version 8
> Actual U-Boot ABI version 8
> Hello World
> argc = 3
> argv[0] = "0xffffffff88000000"
> argv[1] = "123"
> argv[2] = "321"
> argv[3] = "<NULL>"
> 
> Without the patch, the go command at the entry point seems to work.
> 
> boston # go 0xffffffff80200000 123 321
> Example expects ABI version 8
> Actual U-Boot ABI version 8
> Hello World
> argc = 3
> argv[0] = "0xffffffff80200000"
> argv[1] = "123"
> argv[2] = "321"
> argv[3] = "<NULL>"
> Hit any key to exit ...
> 
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161003/f165e93d/attachment.sig>

      parent reply	other threads:[~2016-10-03 13:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09  8:18 [U-Boot] [RFC v2] bootm: fix passing argc to standalone apps Zubair Lutfullah Kakakhel
2016-09-19  0:57 ` Simon Glass
2016-09-23 10:17   ` Zubair Lutfullah Kakakhel
2016-09-28 17:51     ` Simon Glass
2016-10-03 13:36 ` Tom Rini [this message]

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=20161003133649.GC4884@bill-the-cat \
    --to=trini@konsulko.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