All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Stile <john@stilen.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Can I read env from RAM in uboot script?
Date: Tue, 29 Jan 2013 09:33:38 -0800	[thread overview]
Message-ID: <1359480818.7974.184.camel@genx> (raw)
In-Reply-To: <51079D2E.90607@atmel.com>

On Tue, 2013-01-29 at 17:58 +0800, Bo Shen wrote:
> 
> You should use at91sam9g20ek_2mmc_nandflash to configure the u-boot
> 
> ------------------------------------------------
> diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c 
> b/board/atmel/at91sam9260ek/at91sam9260ek.c
> index 2555672..ce475df 100644
> --- a/board/atmel/at91sam9260ek/at91sam9260ek.c
> +++ b/board/atmel/at91sam9260ek/at91sam9260ek.c
> @@ -157,6 +157,10 @@ int board_early_init_f(void)
> 
>   int board_init(void)
>   {
> +#ifdef CONFIG_AT91SAM9G20EK_2MMC
> +       /* arch number of AT91SAM9260EK-Board */
> +       gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK_2MMC;
> +#else
>   #ifdef CONFIG_AT91SAM9G20EK
>          /* arch number of AT91SAM9260EK-Board */
>          gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK;
> @@ -164,6 +168,7 @@ int board_init(void)
>          /* arch number of AT91SAM9260EK-Board */
>          gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9260EK;
>   #endif
> +#endif
>          /* adress of boot parameters */
>          gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
> 
> diff --git a/boards.cfg b/boards.cfg
> index e4b0d44..fa863dc 100644
> --- a/boards.cfg
> +++ b/boards.cfg
> @@ -95,6 +95,7 @@ at91sam9g10ek_nandflash      arm         arm926ejs 
> at91sam9261ek       atmel
>   at91sam9g20ek_dataflash_cs0  arm         arm926ejs   at91sam9260ek 
>     atmel          at91 
> at91sam9260ek:AT91SAM9G20,SYS_USE_DATAFLASH_CS0
>   at91sam9g20ek_dataflash_cs1  arm         arm926ejs   at91sam9260ek 
>     atmel          at91 
> at91sam9260ek:AT91SAM9G20,SYS_USE_DATAFLASH_CS1
>   at91sam9g20ek_nandflash      arm         arm926ejs   at91sam9260ek 
>     atmel          at91
> at91sam9260ek:AT91SAM9G20,SYS_USE_NANDFLASH
> +at91sam9g20ek_2mmc_nandflash arm         arm926ejs   at91sam9260ek 
>    atmel          at91 
> at91sam9260ek:AT91SAM9G20,AT91SAM9G20EK_2MMC,SYS_USE_NANDFLASH
>   at91sam9m10g45ek_nandflash   arm         arm926ejs
> at91sam9m10g45ek 
>     atmel          at91 
> at91sam9m10g45ek:AT91SAM9M10G45,SYS_USE_NANDFLASH
>   at91sam9rlek_dataflash       arm         arm926ejs   at91sam9rlek 
>     atmel          at91
> at91sam9rlek:AT91SAM9RL,SYS_USE_DATAFLASH
>   at91sam9rlek_nandflash       arm         arm926ejs   at91sam9rlek 
>     atmel          at91
> at91sam9rlek:AT91SAM9RL,SYS_USE_NANDFLASH
> ---------------------------------------------------------------------------
> 
> 
That worked!  Very nice!  But, I had to apply the patches manually.
Email may have messed up the patch sets with new-lines and indentation.
Can this be added to the main stream?  I am on to learning 'env import'.
Thank you.

If email messed it up once, I guess it could mess it up again, but I
generated patches using:
  diff -Naur before/ after/ > diff.patch

--- board/atmel/at91sam9260ek/at91sam9260ek.c.orig    2013-01-29 09:09:35.000000000 -0800
+++ board/atmel/at91sam9260ek/at91sam9260ek.c 2013-01-29 09:10:46.000000000 -0800
@@ -157,6 +157,10 @@
 
 int board_init(void)
 {
+#ifdef CONFIG_AT91SAM9G20EK_2MMC
+       /* arch number of AT91SAM9260EK-Board */
+       gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK_2MMC;
+#else
 #ifdef CONFIG_AT91SAM9G20EK
        /* arch number of AT91SAM9260EK-Board */
        gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK;
@@ -164,6 +168,7 @@
        /* arch number of AT91SAM9260EK-Board */
        gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9260EK;
 #endif
+#endif
        /* adress of boot parameters */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
--- boards.cfg.orig   2013-01-29 08:56:47.000000000 -0800
+++ boards.cfg        2013-01-29 08:58:21.000000000 -0800
@@ -94,6 +94,7 @@
 at91sam9g10ek_nandflash      arm         arm926ejs   at91sam9261ek       atmel          at91        at91sam9261ek:AT91SAM9G10,SYS_USE_NANDFLASH
 at91sam9g20ek_dataflash_cs0  arm         arm926ejs   at91sam9260ek       atmel          at91        at91sam9260ek:AT91SAM9G20,SYS_USE_DATAFLASH_CS0
 at91sam9g20ek_dataflash_cs1  arm         arm926ejs   at91sam9260ek       atmel          at91        at91sam9260ek:AT91SAM9G20,SYS_USE_DATAFLASH_CS1
+at91sam9g20ek_2mmc_nandflash arm         arm926ejs   at91sam9260ek       atmel          at91        at91sam9260ek:AT91SAM9G20,AT91SAM9G20EK_2MMC,SYS_USE_NANDFLASH
 at91sam9g20ek_nandflash      arm         arm926ejs   at91sam9260ek       atmel          at91        at91sam9260ek:AT91SAM9G20,SYS_USE_NANDFLASH
 at91sam9m10g45ek_nandflash   arm         arm926ejs   at91sam9m10g45ek    atmel          at91        at91sam9m10g45ek:AT91SAM9M10G45,SYS_USE_NANDFLASH
 at91sam9rlek_dataflash       arm         arm926ejs   at91sam9rlek        atmel          at91        at91sam9rlek:AT91SAM9RL,SYS_USE_DATAFLASH

  reply	other threads:[~2013-01-29 17:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-26  1:56 [U-Boot] Can I read env from RAM in uboot script? John Stile
2013-01-26  7:41 ` Wolfgang Denk
2013-01-28 21:19   ` John Stile
2013-01-28 21:48     ` Jeroen Hofstee
2013-01-28 22:01       ` Jeroen Hofstee
2013-01-29  0:25         ` John Stile
2013-01-29  9:58           ` Bo Shen
2013-01-29 17:33             ` John Stile [this message]
2013-01-30  1:20               ` Bo Shen
2013-01-29  6:37         ` Wolfgang Denk

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=1359480818.7974.184.camel@genx \
    --to=john@stilen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.