diff mbox

[U-Boot] U-Boot build break for m501sk board from Artila

Message ID loom.20110927T050021-301@post.gmane.org
State Changes Requested
Headers show

Commit Message

Jamie Sept. 27, 2011, 3:06 a.m. UTC
Stefano Babic <sbabic <at> denx.de> writes:

> 
> On 09/21/2011 08:00 AM, Sandeep Kumar wrote:
> > Hi,
> > 
> 
> Hi,
> 
> > Did anybody face the issue which I am facing in building U-Boot for
> > m501sk board from Artila.
> 
> Not anymore. Because no one fixed this board in the last two years, the
> board was removed from U-Boot mainline. It is not supported.
> 
> Best regards,
> Stefano Babic
> 

That's too bad.  I've been developing for the board for the past 3 years and 
only recently have been given the opportunity to re-examine the loader and root 
file system. 

I was super excited that U-Boot supported the board.  For about 5 minutes.

Those interested might find this patch of use.  I won't be able to test it for a 
few days.  Applied to the "v2011.06" tag (git checkout v2011.06).

<snip>
<snap>

Comments

Wolfgang Denk Sept. 27, 2011, 5:27 a.m. UTC | #1
Dear Jamie,

In message <loom.20110927T050021-301@post.gmane.org> you wrote:
> 
> > Not anymore. Because no one fixed this board in the last two years, the
> > board was removed from U-Boot mainline. It is not supported.
...
> That's too bad.  I've been developing for the board for the past 3 years and 
> only recently have been given the opportunity to re-examine the loader and root 
> file system. 

It would be trivial to re-add the board if there is someone who
actively maintains the related code.

>  #if defined(CONFIG_AT91RM9200)
> -# include <asm/arch/at91rm9200.h>
> +# include <asm/arch-at91/at91rm9200.h>
>  #elif defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20) || \
>         defined(CONFIG_AT91SAM9XE)
> -# include <asm/arch/at91sam9260.h>
> +# include <asm/arch-at91/at91sam9260.h>
>  #elif defined(CONFIG_AT91SAM9261) || defined(CONFIG_AT91SAM9G10)
> -# include <asm/arch/at91sam9261.h>
> +# include <asm/arch-at91/at91sam9261.h>
>  #elif defined(CONFIG_AT91SAM9263)
> -# include <asm/arch/at91sam9263.h>
> +# include <asm/arch-at91/at91sam9263.h>
>  #elif defined(CONFIG_AT91SAM9RL)
> -# include <asm/arch/at91sam9rl.h>
> +# include <asm/arch-at91/at91sam9rl.h>
>  #elif defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
> -# include <asm/arch/at91sam9g45.h>
> +# include <asm/arch-at91/at91sam9g45.h>
>  #elif defined(CONFIG_AT91CAP9)
> -# include <asm/arch/at91cap9.h>
> +# include <asm/arch-at91/at91cap9.h>
>  #elif defined(CONFIG_AT91X40)
> -# include <asm/arch/at91x40.h>
> +# include <asm/arch-at91/at91x40.h>

All these modifications are bogus and should be removed.  They are not
needed either.

> diff --git a/include/configs/m501sk.h b/include/configs/m501sk.h
> index 68f0415..55b9154 100644
> --- a/include/configs/m501sk.h
> +++ b/include/configs/m501sk.h
> @@ -162,7 +162,9 @@
> 
>  #define CONFIG_NR_DRAM_BANKS   1
>  #define PHYS_SDRAM             0x20000000
> -#define PHYS_SDRAM_SIZE        0x2000000 /* 32 megs */
> +#define PHYS_SDRAM_SIZE                0x4000000 /* 64 megs */
> +#define CONFIG_SYS_SDRAM_BASE  PHYS_SDRAM
> +#define CONFIG_SYS_INIT_SP_ADDR        (PHYS_SDRAM + (PHYS_SDRAM_SIZE >> 13))

This is a highly cryptic way to say "+ 8192" - is there any rationale
for such an unreadable way to express this?

>  #define CONFIG_SYS_MEMTEST_START       0x21000000 /* PHYS_SDRAM */
>  /* CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144 */

Hm - after reverting commit b1a2bd4 and then applying your patches, I
still get:

Configuring for m501sk board...
make[1]: *** No targets specified and no makefile found.  Stop.
make: *** [arch/arm/cpu/arm920t/at91rm9200/libat91rm9200.o] Error 2

Sorry, this does not work.

Best regards,

Wolfgang Denk
Jamie Sept. 27, 2011, 1:40 p.m. UTC | #2
On 27 September 2011 01:27, Wolfgang Denk <wd@denx.de> wrote:

> Dear Jamie,
>
> In message <loom.20110927T050021-301@post.gmane.org> you wrote:
> >
> > > Not anymore. Because no one fixed this board in the last two years, the
> > > board was removed from U-Boot mainline. It is not supported.
> ...
> > That's too bad.  I've been developing for the board for the past 3 years
> and
> > only recently have been given the opportunity to re-examine the loader
> and root
> > file system.
>
> It would be trivial to re-add the board if there is someone who
> actively maintains the related code.
>

I reverted 'v2011.06-0-gb1af6f5' without knowing the support had been taken
away (I saw
"m501sk" in boards.cfg.)  It was only after I made some changes that I found
this thread.

If I'm successful, I can post changes, and could take on support, but if
you're not getting
any pull for M501 cards is it worth it?


> >  #if defined(CONFIG_AT91RM9200)
> > -# include <asm/arch/at91rm9200.h>
> > +# include <asm/arch-at91/at91rm9200.h>
> >  #elif defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20) || \
> >         defined(CONFIG_AT91SAM9XE)
> > -# include <asm/arch/at91sam9260.h>
> > +# include <asm/arch-at91/at91sam9260.h>
> >  #elif defined(CONFIG_AT91SAM9261) || defined(CONFIG_AT91SAM9G10)
> > -# include <asm/arch/at91sam9261.h>
> > +# include <asm/arch-at91/at91sam9261.h>
> >  #elif defined(CONFIG_AT91SAM9263)
> > -# include <asm/arch/at91sam9263.h>
> > +# include <asm/arch-at91/at91sam9263.h>
> >  #elif defined(CONFIG_AT91SAM9RL)
> > -# include <asm/arch/at91sam9rl.h>
> > +# include <asm/arch-at91/at91sam9rl.h>
> >  #elif defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
> > -# include <asm/arch/at91sam9g45.h>
> > +# include <asm/arch-at91/at91sam9g45.h>
> >  #elif defined(CONFIG_AT91CAP9)
> > -# include <asm/arch/at91cap9.h>
> > +# include <asm/arch-at91/at91cap9.h>
> >  #elif defined(CONFIG_AT91X40)
> > -# include <asm/arch/at91x40.h>
> > +# include <asm/arch-at91/at91x40.h>
>
> All these modifications are bogus and should be removed.  They are not
> needed either.
>

Is the configuration meant to create a symbolic link (asm/arch ->
asm/arch-at91)?
If so I'll have to investigate how the make works.  Without the above
changes I get the error:

  /u-boot/include/asm/arch-at91/hardware.h:28:34: error:
asm/arch/at91rm9200.h: No such file or directory

It seemed harmless enough to change the "hardware.h" file as it itself is
located
in the "arch-at91" directory.


> > diff --git a/include/configs/m501sk.h b/include/configs/m501sk.h
> > index 68f0415..55b9154 100644
> > --- a/include/configs/m501sk.h
> > +++ b/include/configs/m501sk.h
> > @@ -162,7 +162,9 @@
> >
> >  #define CONFIG_NR_DRAM_BANKS   1
> >  #define PHYS_SDRAM             0x20000000
> > -#define PHYS_SDRAM_SIZE        0x2000000 /* 32 megs */
> > +#define PHYS_SDRAM_SIZE                0x4000000 /* 64 megs */
> > +#define CONFIG_SYS_SDRAM_BASE  PHYS_SDRAM
> > +#define CONFIG_SYS_INIT_SP_ADDR        (PHYS_SDRAM + (PHYS_SDRAM_SIZE >>
> 13))
>
> This is a highly cryptic way to say "+ 8192" - is there any rationale
> for such an unreadable way to express this?
>

Okay ... fair enough.


> >  #define CONFIG_SYS_MEMTEST_START       0x21000000 /* PHYS_SDRAM */
> >  /* CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144 */
>
> Hm - after reverting commit b1a2bd4 and then applying your patches, I
> still get:
>
> Configuring for m501sk board...
> make[1]: *** No targets specified and no makefile found.  Stop.
> make: *** [arch/arm/cpu/arm920t/at91rm9200/libat91rm9200.o] Error 2
>
> Sorry, this does not work.
>
>
I get the error when I revert to b1a2bd4 too, but the patch above I applied
the to b1af6f5.

The commands I did in order were:

  ~/$ git clone git://git.denx.de/u-boot.git && cd u-boot
  ~/$ git checkout b1af6f5
  ~/$ patch -p1 < ../my-m501sk.patch
  ~/$ make m501sk_config
  ~/$ make all

I'm not at a computer with a working linker, but the build goes through
until the final "arm-...-ld" linker
line.

- Jamie
Jamie Sept. 27, 2011, 7:24 p.m. UTC | #3
On 27 September 2011 01:27, Wolfgang Denk <wd@denx.de> wrote:
>
> >  #if defined(CONFIG_AT91RM9200)
> > -# include <asm/arch/at91rm9200.h>
> > +# include <asm/arch-at91/at91rm9200.h>
> >  #elif defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20) || \
> >         defined(CONFIG_AT91SAM9XE)
> > -# include <asm/arch/at91sam9260.h>
> > +# include <asm/arch-at91/at91sam9260.h>
> >  #elif defined(CONFIG_AT91SAM9261) || defined(CONFIG_AT91SAM9G10)
> > -# include <asm/arch/at91sam9261.h>
> > +# include <asm/arch-at91/at91sam9261.h>
> >  #elif defined(CONFIG_AT91SAM9263)
> > -# include <asm/arch/at91sam9263.h>
> > +# include <asm/arch-at91/at91sam9263.h>
> >  #elif defined(CONFIG_AT91SAM9RL)
> > -# include <asm/arch/at91sam9rl.h>
> > +# include <asm/arch-at91/at91sam9rl.h>
> >  #elif defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
> > -# include <asm/arch/at91sam9g45.h>
> > +# include <asm/arch-at91/at91sam9g45.h>
> >  #elif defined(CONFIG_AT91CAP9)
> > -# include <asm/arch/at91cap9.h>
> > +# include <asm/arch-at91/at91cap9.h>
> >  #elif defined(CONFIG_AT91X40)
> > -# include <asm/arch/at91x40.h>
> > +# include <asm/arch-at91/at91x40.h>
>
> All these modifications are bogus and should be removed.  They
> are not needed either.

The bogusity of the above modifications come from my confusion -
there are two include files:

 ./arch/arm/include/asm/arch-at91/at91rm9200.h
 ./arch/arm/include/asm/arch-at91rm9200/AT91RM9200.h

which have overlapping interests in defining the memory mapped
registers (one for c and the other for asm) it would seem.
diff mbox

Patch

diff --git a/arch/arm/include/asm/arch-at91/hardware.h 
b/arch/arm/include/asm/arch-at91/hardware.h
index 36af571..4faa072 100644
--- a/arch/arm/include/asm/arch-at91/hardware.h
+++ b/arch/arm/include/asm/arch-at91/hardware.h
@@ -25,22 +25,22 @@ 
 #define __ASM_ARM_ARCH_HARDWARE_H__

 #if defined(CONFIG_AT91RM9200)
-# include <asm/arch/at91rm9200.h>
+# include <asm/arch-at91/at91rm9200.h>
 #elif defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20) || \
        defined(CONFIG_AT91SAM9XE)
-# include <asm/arch/at91sam9260.h>
+# include <asm/arch-at91/at91sam9260.h>
 #elif defined(CONFIG_AT91SAM9261) || defined(CONFIG_AT91SAM9G10)
-# include <asm/arch/at91sam9261.h>
+# include <asm/arch-at91/at91sam9261.h>
 #elif defined(CONFIG_AT91SAM9263)
-# include <asm/arch/at91sam9263.h>
+# include <asm/arch-at91/at91sam9263.h>
 #elif defined(CONFIG_AT91SAM9RL)
-# include <asm/arch/at91sam9rl.h>
+# include <asm/arch-at91/at91sam9rl.h>
 #elif defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
-# include <asm/arch/at91sam9g45.h>
+# include <asm/arch-at91/at91sam9g45.h>
 #elif defined(CONFIG_AT91CAP9)
-# include <asm/arch/at91cap9.h>
+# include <asm/arch-at91/at91cap9.h>
 #elif defined(CONFIG_AT91X40)
-# include <asm/arch/at91x40.h>
+# include <asm/arch-at91/at91x40.h>
 #else
 # error "Unsupported AT91 processor"
 #endif
diff --git a/include/configs/m501sk.h b/include/configs/m501sk.h
index 68f0415..55b9154 100644
--- a/include/configs/m501sk.h
+++ b/include/configs/m501sk.h
@@ -162,7 +162,9 @@ 

 #define CONFIG_NR_DRAM_BANKS   1
 #define PHYS_SDRAM             0x20000000
-#define PHYS_SDRAM_SIZE        0x2000000 /* 32 megs */
+#define PHYS_SDRAM_SIZE                0x4000000 /* 64 megs */
+#define CONFIG_SYS_SDRAM_BASE  PHYS_SDRAM
+#define CONFIG_SYS_INIT_SP_ADDR        (PHYS_SDRAM + (PHYS_SDRAM_SIZE >> 13))

 #define CONFIG_SYS_MEMTEST_START       0x21000000 /* PHYS_SDRAM */
 /* CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144 */