public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] Creating U-Boot env image
Date: Mon, 09 Dec 2013 14:56:41 -0700	[thread overview]
Message-ID: <52A63C99.3050703@wwwdotorg.org> (raw)
In-Reply-To: <52A6387C.3000802@xtech2.lv>

On 12/09/2013 02:39 PM, Alexey Smishlayev wrote:
> Dear Wolfgang Denk,
> 
> On 2013.12.09. 22:12, Wolfgang Denk wrote:
>> Dear Alexey Smishlayev,
>>
>> In message <52A5D4F1.7020101@xtech2.lv> you wrote:
>>> What should I do to flash environment values directly to the board's
>>> NAND?
>> Why don't you just use "env import"?
>>
> 
> I didn't have any information about that. Also, I would like to get done
> without entering the U-Boot prompt. I am flashing my board using the
> J-TAG - USB cable, and it will be much more simple and convenient if I'd
> be able to just write the binary images on the NAND flash.
> 
> So, there is no way to do something like that straight away?

I have no idea if something similar would work on your SoC, but I flash
my Tegra devices as follows:

* Download a copy of U-Boot into RAM and execute it.

I use "tegrarcm" to download it (a method of talking to Tegra's boot
ROM), but I imagine you could download using JTAG too.

* This U-Boot's bootcmd (specified in the attached device tree in my
case) writes the desired binary to boot flash; I flash from the device
itself rather than using JTAG/... for the actual flash writes.

* After flashing the U-Boot binary, the same U-Boot does "env default -f
-a; saveenv" and hence re-initializes the environment in flash. You can
easily "setenv foo bar" between those two commands for any custom
overrides. You could even push a file into some known RAM location and
run "env import" on it too...

* Reboot into the newly-flashed U-Boot.

The code is at:
https://github.com/NVIDIA/tegra-uboot-flasher-scripts

  reply	other threads:[~2013-12-09 21:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09 14:34 [U-Boot] Creating U-Boot env image Alexey Smishlayev
2013-12-09 20:12 ` Wolfgang Denk
2013-12-09 21:39   ` Alexey Smishlayev
2013-12-09 21:56     ` Stephen Warren [this message]
2013-12-10 11:39 ` Mats Kärrman
2013-12-10 12:32   ` Alexey Smishlayev
2013-12-10 13:33     ` Mats Kärrman
2013-12-10 13:36       ` Alexey Smishlayev
2013-12-11  9:59 ` Bo Shen

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=52A63C99.3050703@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --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