public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michael Trimarchi <michael@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] u-boot USB question
Date: Fri, 17 May 2013 05:39:22 +0200	[thread overview]
Message-ID: <5195A66A.2050401@amarulasolutions.com> (raw)
In-Reply-To: <51959E2E.1080408@atmel.com>

Hi

On 17/05/13 05:04, Bo Shen wrote:
> Hi Lance,
> 
> On 5/17/2013 10:20, Lance Beck wrote:
>> Thanks Bo!
>>
>> My thinking with fw_printev (setenv) was that I would use it to set the environment variables from our user space app.  This way, we can control when the USB stick will be used for a kernel or rootfs upgrade.  Any thoughts on show this could be scripted and run?  We would like to be able to have a customer in the field do this without having to do anything but send a command from the user app, insert the USB drive and reboot.
> 

If the cpu doesn't have any register for rebooting reason, you can write in environment a variable
that said that you want update at the next reboot and then using and autoscript you can flash it

Michael 

> Maybe you can test reference in <include/configs/am3517_evm.h>
> ---8>---
> #define CONFIG_EXTRA_ENV_SETTINGS \
>         "loadaddr=0x82000000\0" \
>         "console=ttyO2,115200n8\0" \
>         "mmcdev=0\0" \
>         "mmcargs=setenv bootargs console=${console} " \
>                 "root=/dev/mmcblk0p2 rw rootwait\0" \
>         "nandargs=setenv bootargs console=${console} " \
>                 "root=/dev/mtdblock4 rw " \
>                 "rootfstype=jffs2\0" \
>         "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
>         "bootscript=echo Running bootscript from mmc ...; " \
>                 "source ${loadaddr}\0" \
>         "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
>         "mmcboot=echo Booting from mmc ...; " \
>                 "run mmcargs; " \
>                 "bootm ${loadaddr}\0" \
>         "nandboot=echo Booting from nand ...; " \
>                 "run nandargs; " \
>                 "nand read ${loadaddr} 280000 400000; " \
>                 "bootm ${loadaddr}\0" \
> 
> #define CONFIG_BOOTCOMMAND \
>         "mmc dev ${mmcdev}; if mmc rescan; then " \
>                 "if run loadbootscript; then " \
>                         "run bootscript; " \
>                 "else " \
>                         "if run loaduimage; then " \
>                                 "run mmcboot; " \
>                         "else run nandboot; " \
>                         "fi; " \
>                 "fi; " \
>         "else run nandboot; fi"
> ---<8---
> 
> Best Regards,
> Bo Shen
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

  reply	other threads:[~2013-05-17  3:39 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
2013-05-17  2:20   ` Lance Beck
2013-05-17  3:04     ` Bo Shen
2013-05-17  3:39       ` Michael Trimarchi [this message]
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=5195A66A.2050401@amarulasolutions.com \
    --to=michael@amarulasolutions.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