public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bo Shen <voice.shen@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] u-boot USB question
Date: Fri, 17 May 2013 09:22:26 +0800	[thread overview]
Message-ID: <51958652.7030501@atmel.com> (raw)
In-Reply-To: <E632120D9F6D2B4C992D00A695B685CD0C493CE93F@P3PW5EX1MB09.EX1.SECURESERVER.NET>

Hi Lance,

On 5/17/2013 06:32, Lance Beck wrote:
> We are using u-boot on an AT91SAM9G20 platform with NAND Flash and running Linux.  Is there a means to update the kernel and root fs image by reading them from a USB memory device and writing the new images to flash?  I have built the fw_printenv tool thinking I might be able to use this to somehow trigger that action.

Yes. Please take the following example (using the mainline 
u-boot-2013.04) for updating related image from USB disk.

1. connect usb to board and power up
U-boot> usb start
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
        scanning bus for storage devices... 1 Storage Device(s) found
U-boot> fatls usb 0
...
2396352 uImage
...
U-boot> fatload usb 0 0x20000000 uImage
U-boot> nand erase 0x200000 0x600000
U-boot> nand write 0x20000000 0x200000 <uImage_size>

If all steps are successfully, then you have updated linux kernel uImage.

BTW, the fw_printenv is used with Linux file system to access u-boot 
environment.

> Not sure where to go from here...
>
> Thanks,
>
> Lance

Best Regards,
Bo Shen

  reply	other threads:[~2013-05-17  1:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-16 22:32 [U-Boot] u-boot USB question Lance Beck
2013-05-17  1:22 ` Bo Shen [this message]
2013-05-17  2:20   ` Lance Beck
2013-05-17  3:04     ` Bo Shen
2013-05-17  3:39       ` Michael Trimarchi
2013-05-17  5:54     ` Andreas Bießmann
2013-05-17  5:45   ` Andreas Bießmann

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=51958652.7030501@atmel.com \
    --to=voice.shen@atmel.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