Patchwork [U-Boot] Can I read env from RAM in uboot script?

login
register
mail settings
Submitter Bo Shen
Date Jan. 29, 2013, 9:58 a.m.
Message ID <51079D2E.90607@atmel.com>
Download mbox | patch
Permalink /patch/216486/
State Not Applicable
Delegated to: Tom Rini
Headers show

Comments

Bo Shen - Jan. 29, 2013, 9:58 a.m.
Hi John Stile,

On 01/29/2013 08:25 AM, John Stile wrote:
[snip]
> I saw that.
>
> I tried to update u-boot-1.3.4 to u-boot-2013.
>
> I changed at91bootstrap's JUMP_ADDR from 0x23F00000 to 0x21F00000, as
> advised by previous posts.
>
> Now I am getting the wrong board type error from the kernel.
> my board is an AT91SAM9G20EK_2MMC
>
> I am having a hard time setting:
> #define MACH_TYPE_AT91SAM9G20EK_2MMC   2288
> insted of
> #define MACH_TYPE_AT91SAM9G20EK        1624
>
> In had to change buildroot's .config from:
> BR2_TARGET_UBOOT_BOARDNAME="at91sam9g20ek_2mmc_nandflash"
> to
> BR2_TARGET_UBOOT_BOARDNAME="at91sam9g20ek_nandflash"
> whihch I suspect is the problem.
>
> I'm trying to change the buildroots output/build/uboot-custom manually,
> and rerun the build, but no luck yet.
>
> My kernel is built with CONFIG_MACH_AT91SAM9G20EK_2MMC=y
>
> So how do I force u-boot to agree?

Please have test with the following patch (add at91sam9g20ek 2mmc 
nandflash boot support) and check whether it will solve you problem.

You should use at91sam9g20ek_2mmc_nandflash to configure the u-boot

------------------------------------------------
  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
---------------------------------------------------------------------------

Best Regards,
Bo Shen

Patch

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