Patchwork [U-Boot] u-boot powerpc build error

login
register
mail settings
Submitter gmane
Date Jan. 12, 2011, 4:47 a.m.
Message ID <4D2D324C.3010607@gmail.com>
Download mbox | patch
Permalink /patch/78502/
State Changes Requested
Headers show

Comments

gmane - Jan. 12, 2011, 4:47 a.m.
Hello,

I met this error (use GNU make 3.80).

$ make MPC885ADS_config
$ make
/home/namsh/work/u-boot/arch/powerpc/config.mk:35: Extraneous text after 
`else' directive
/home/namsh/work/u-boot/arch/powerpc/config.mk:37: *** only one `else' 
per conditional.  Stop.

Regards,
namsh
Wolfgang Denk - Jan. 12, 2011, 7:33 a.m.
Dear gmane,

In message <4D2D324C.3010607@gmail.com> you wrote:
> Hello,
> 
> I met this error (use GNU make 3.80).
> 
> $ make MPC885ADS_config
> $ make
> /home/namsh/work/u-boot/arch/powerpc/config.mk:35: Extraneous text after 
> `else' directive
> /home/namsh/work/u-boot/arch/powerpc/config.mk:37: *** only one `else' 
> per conditional.  Stop.

Can you please submit this as a proper patch, i. e. with a proper
commit message and your Signed-off-by: line? Please see
http://www.denx.de/wiki/U-Boot/Patches  for details.

And can you please extend the patch to fix _all_ places where such a
construct is being used, i. e. at least these:

arch/powerpc/config.mk:else ifdef CONFIG_NAND_SPL
board/amcc/bamboo/config.mk:else ifdef CONFIG_NAND_U_BOOT
board/amcc/sequoia/config.mk:else ifdef CONFIG_NAND_U_BOOT
board/amcc/acadia/config.mk:else ifdef CONFIG_NAND_U_BOOT
board/amcc/canyonlands/config.mk:else ifdef CONFIG_NAND_U_BOOT
board/amcc/kilauea/config.mk:else ifdef CONFIG_NAND_U_BOOT

And please make sure to run a "MAKEALL ppc" to verify you have found
all occurrences.

Best regards,

Wolfgang Denk
gmane - Jan. 13, 2011, 12:16 a.m.
Wolfgang Denk wrote:
>
> In message<4D2D324C.3010607@gmail.com>  you wrote:
>> Hello,
>>
>> I met this error (use GNU make 3.80).
>>
>> $ make MPC885ADS_config
>> $ make
>> /home/namsh/work/u-boot/arch/powerpc/config.mk:35: Extraneous text after
>> `else' directive
>> /home/namsh/work/u-boot/arch/powerpc/config.mk:37: *** only one `else'
>> per conditional.  Stop.
>
> Can you please submit this as a proper patch, i. e. with a proper
> commit message and your Signed-off-by: line? Please see
> http://www.denx.de/wiki/U-Boot/Patches  for details.

After sending a patch, I noticed I need GNU make 3.81 and now I
use it to build U-Boot.  3.81 was released at 2006.  So that,
I think modifying all the makefiles to support 3.80 or older is not
good.
Hmm, you may want to add a section like 'SOFTWARE REQUIREMENTS'.

regards,
namsh
Scott Wood - Jan. 13, 2011, 12:20 a.m.
On Wed, 12 Jan 2011 13:47:08 +0900
gmane <goweol@gmail.com> wrote:

> Hello,
> 
> I met this error (use GNU make 3.80).

"else ifdef" appears to be new in make 3.81.

> $ make MPC885ADS_config
> $ make
> /home/namsh/work/u-boot/arch/powerpc/config.mk:35: Extraneous text after 
> `else' directive
> /home/namsh/work/u-boot/arch/powerpc/config.mk:37: *** only one `else' 
> per conditional.  Stop.
> 
> Regards,
> namsh
> 
> diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
> index 2912604..5eeba9a 100644
> --- a/arch/powerpc/config.mk
> +++ b/arch/powerpc/config.mk
> @@ -32,13 +32,15 @@ PLATFORM_LDFLAGS  += -n --gc-sections
>   ifdef CONFIG_SYS_LDSCRIPT
>   # need to strip off double quotes
>   LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))
> -else ifdef CONFIG_NAND_SPL
> +else
> +ifdef CONFIG_NAND_SPL
>   LDSCRIPT := $(SRCTREE)/$(CONFIG_BOARDDIR)/u-boot-nand.lds
>   else
>   ifneq ($(wildcard $(SRCTREE)/arch/powerpc/cpu/$(CPU)/u-boot.lds),)
>   LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/$(CPU)/u-boot.lds
>   endif
>   endif
> +endif

Shouldn't CONFIG_SYS_LDSCRIPT override only the main U-boot's linker
script, not the NAND SPL?  It's unlikely that the same linker
script would be used for both.

If the NAND SPL linker script needs to be overridden (probably
unlikely), it would need CONFIG_SYS_LDSCRIPT_SPL, similar to
CONFIG_SYS_TEXT_BASE_SPL.

I know this isn't your change, but this is where I noticed it. :-)

-Scott
Aggrwal Poonam-B10812 - Jan. 13, 2011, 7:19 a.m.
> -----Original Message-----
> From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces@lists.denx.de]
> On Behalf Of Wood Scott-B07421
> Sent: Thursday, January 13, 2011 5:51 AM
> To: gmane
> Cc: u-boot@lists.denx.de
> Subject: Re: [U-Boot] [patch] u-boot powerpc build error
> 
> On Wed, 12 Jan 2011 13:47:08 +0900
> gmane <goweol@gmail.com> wrote:
> 
> > Hello,
> >
> > I met this error (use GNU make 3.80).
> 
> "else ifdef" appears to be new in make 3.81.
Yes I also faced this error with make 3.80
So I made temporary change in config.mk to get build successful.

> 
> > $ make MPC885ADS_config
> > $ make
> > /home/namsh/work/u-boot/arch/powerpc/config.mk:35: Extraneous text
> > after `else' directive
> > /home/namsh/work/u-boot/arch/powerpc/config.mk:37: *** only one `else'
> > per conditional.  Stop.
> >
> > Regards,
> > namsh
> >
> > diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk index
> > 2912604..5eeba9a 100644
> > --- a/arch/powerpc/config.mk
> > +++ b/arch/powerpc/config.mk
> > @@ -32,13 +32,15 @@ PLATFORM_LDFLAGS  += -n --gc-sections
> >   ifdef CONFIG_SYS_LDSCRIPT
> >   # need to strip off double quotes
> >   LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) -else ifdef
> > CONFIG_NAND_SPL
> > +else
> > +ifdef CONFIG_NAND_SPL
> >   LDSCRIPT := $(SRCTREE)/$(CONFIG_BOARDDIR)/u-boot-nand.lds
> >   else
> >   ifneq ($(wildcard $(SRCTREE)/arch/powerpc/cpu/$(CPU)/u-boot.lds),)
> >   LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/$(CPU)/u-boot.lds
> >   endif
> >   endif
> > +endif
> 
> Shouldn't CONFIG_SYS_LDSCRIPT override only the main U-boot's linker
> script, not the NAND SPL?  It's unlikely that the same linker script
> would be used for both.
> 
> If the NAND SPL linker script needs to be overridden (probably unlikely),
> it would need CONFIG_SYS_LDSCRIPT_SPL, similar to
> CONFIG_SYS_TEXT_BASE_SPL.
> 
> I know this isn't your change, but this is where I noticed it. :-)
> 
> -Scott
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Doninelli Davide - Jan. 13, 2011, 7:59 a.m.
hi,
On tx25  Uboot 2010.12 with standard tx25 config don't read correctly the environment see: 
http://www.mail-archive.com/u-boot@lists.denx.de/msg44454.html

now i tryed without relocation and works fine,
adding on tx25.h like version 2010.6
#define CONFIG_SKIP_RELOCATE_UBOOT
#define CONFIG_SYS_GBL_DATA_SIZE	128



Davide

Patch

diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index 2912604..5eeba9a 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -32,13 +32,15 @@  PLATFORM_LDFLAGS  += -n --gc-sections
  ifdef CONFIG_SYS_LDSCRIPT
  # need to strip off double quotes
  LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))
-else ifdef CONFIG_NAND_SPL
+else
+ifdef CONFIG_NAND_SPL
  LDSCRIPT := $(SRCTREE)/$(CONFIG_BOARDDIR)/u-boot-nand.lds
  else
  ifneq ($(wildcard $(SRCTREE)/arch/powerpc/cpu/$(CPU)/u-boot.lds),)
  LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/$(CPU)/u-boot.lds
  endif
  endif
+endif

  #
  # When cross-compiling on NetBSD, we have to define __PPC__ or else we