mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	barebox@lists.infradead.org
Subject: Re: [PATCH v3 0/4] mvebu: Add network support for Armada 370/XP
Date: Tue, 11 Nov 2014 11:25:40 -0300	[thread overview]
Message-ID: <54621C64.5070004@free-electrons.com> (raw)
In-Reply-To: <20141111090649.GE27002@pengutronix.de>

Uwe,

On 11/11/2014 06:06 AM, Uwe Kleine-König wrote:
>>>
>>> Do you have a command line for me? I used
>>>
>>> 	scripts/kwboot -b images/barebox-netgear-rn104-uart.img /dev/ttyUSB0
>>>
>>> which took much longer than I expected (didn't time it, but I'd say in
>>> the several minutes range). And I didn't know what to do then. Ctrl-C
>>> and then connecting microcom was wrong. Adding -t to the command line
>>> above, too.
> Any hints on how kwboot is used? It loads the binary into RAM and runs
> it from there, right? I timed my above command and it took 38m28.225s
> for my image (341304 bytes).
> 

This is how I use kwboot:

1. Boot your board (with stock U-Boot and Linux) and extract the bootloader.
   According to my notes, I just grabbed a couple megabytes:

   $ dd if=/dev/mtd0 of=/mtd0.dump bs=1M count=2

   I guess you can grab the entire bootloader partition (if you have one).

2. Run kwbimage tool and dump the output to the appropriate board directory:

  $ ./scripts/kwbimage -x -i /srv/nfs/mtd0.dump -o arch/arm/boards/plathome-openblocks-ax3/

  Fix the produced kwbimage.cfg to boot from UART (actually, I think it's not needed):

  diff --git a/arch/arm/boards/plathome-openblocks-ax3/kwbimage.cfg b/arch/arm/boards/plathome-openblocks-ax3/kwbimage.cfg
  index 219c2ec..fd6c0df 100644
  --- a/arch/arm/boards/plathome-openblocks-ax3/kwbimage.cfg
  +++ b/arch/arm/boards/plathome-openblocks-ax3/kwbimage.cfg
  @@ -1,5 +1,5 @@
   VERSION 1
  -BOOT_FROM spi
  +BOOT_FROM uart
   DESTADDR 00600000
   EXECADDR 006b0000
   NAND_BLKSZ 00000000

3. Make your barebox

  $ make

4. Run kwboot and have fun!

  $ ./scripts/kwboot -b images/barebox-plathome-openblocks-ax3.img -t -B 115200 /dev/ttyUSB0

After kwboot transfers the image, it starts a terminal. You don't need to open another one,
and close everything listening on ttyUSB0 or kwboot won't work fine. It should take less
than a minute to transfer the image.

This works for me on every mvebu board I have, but it was a major pain at first :/
-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-11-11 14:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-09 14:56 Ezequiel Garcia
2014-11-09 14:56 ` [PATCH v3 1/4] ARM: mvebu: Enable PUP register Ezequiel Garcia
2014-11-09 14:56 ` [PATCH v3 2/4] net: phy: Support Marvell 88EE1545 PHY Ezequiel Garcia
2014-11-09 14:56 ` [PATCH v3 3/4] net: phy: Support Marvell 88EE1543 PHY Ezequiel Garcia
2014-11-10  6:57   ` Sascha Hauer
2014-11-09 14:56 ` [PATCH v3 4/4] net: Add driver for Armada 370/XP 10/100/1000 Mbps network controller Ezequiel Garcia
2014-11-10  8:06 ` [PATCH v3 0/4] mvebu: Add network support for Armada 370/XP Uwe Kleine-König
2014-11-10 18:10   ` Ezequiel Garcia
2014-11-10 18:43     ` Uwe Kleine-König
2014-11-10 19:36       ` Sebastian Hesselbarth
2014-11-11  9:06         ` Uwe Kleine-König
2014-11-11 14:25           ` Ezequiel Garcia [this message]
2014-11-11 14:31             ` Thomas Petazzoni
2014-11-11 14:34               ` Ezequiel Garcia
2014-11-12  7:03                 ` Sascha Hauer
2014-11-11 20:35             ` Uwe Kleine-König
2014-11-12 10:56           ` Uwe Kleine-König
2014-11-12 11:22             ` Sebastian Hesselbarth
2014-11-13  9:09               ` Uwe Kleine-König
2014-11-13  9:53                 ` Sebastian Hesselbarth
2014-11-13 10:46                   ` Uwe Kleine-König
2014-11-13 11:31                     ` Sebastian Hesselbarth
2014-11-13 18:44                       ` Uwe Kleine-König
2014-11-14  8:21                         ` Sebastian Hesselbarth
2014-11-14 20:48                           ` Uwe Kleine-König

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=54621C64.5070004@free-electrons.com \
    --to=ezequiel.garcia@free-electrons.com \
    --cc=barebox@lists.infradead.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=u.kleine-koenig@pengutronix.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