Skip to contentSkip to conversation

u-boot powerpc build error

PATCH New gmane 5 participants 6 messages Jan 12, 2011 – Jan 13, 2011 PowerPC

lore
Share & tools
lore

gmane

author
#0 lore raw

PATCH 1/1 u-boot powerpc build error

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

arch/powerpc/config.mk +3 -1
index 2912604..5eeba9a 100644
@@ -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
#1 lore raw

PATCH 1/1 u-boot powerpc build error

Dear gmane,

Quoted 10 lines · In message <[email protected]> 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

Signature · 7 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If a packet hits a pocket on a socket on a port,
And the bus is interrupted as a very last resort,
And the address of the memory makes your floppy disk abort,
Then the socket packet pocket has an error to report! - Ken Burchill?
#2 lore raw

PATCH 1/1 u-boot powerpc build error

Quoted 13 lines · Wolfgang Denk
Quoted 10 lines · In message<[email protected]> 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.
Quoted 3 lines

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

#3 lore raw

PATCH 1/1 u-boot powerpc build error

In reply to gmane
Quoted 3 lines · On Wed, 12 Jan 2011 13:47:08 +0900 gmane <[email protected]> wrote:

Hello,

I met this error (use GNU make 3.80).

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

Quoted 18 lines
$ 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

arch/powerpc/config.mk +0 -0
index 2912604..5eeba9a 100644
@@ -32,13 +32,15 @@ PLATFORM_LDFLAGS  += -n --gc-sections
  ifdef CONFIG_SYS_LDSCRIPT
  # need to strip off double quotes
  LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))

arch/powerpc/config.mk PLATFORM_LDFLAGS += -n --gc-sections · line 43

Quoted 10 lines
arch/powerpc/config.mk +3 -1
-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

#4 lore raw

PATCH 1/1 u-boot powerpc build error

Quoted 10 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Wood Scott-B07421
Sent: Thursday, January 13, 2011 5:51 AM
To: gmane
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [patch] u-boot powerpc build error

Quoted 8 lines
Quoted 3 lines · On Wed, 12 Jan 2011 13:47:08 +0900 gmane <[email protected]> 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.

Quoted 46 lines
Quoted 20 lines
$ 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

arch/powerpc/config.mk index renamed from arch/powerpc/config.mk +0 -0

2912604..5eeba9a 100644

arch/powerpc/config.mk +0 -0
@@ -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

arch/powerpc/config.mk PLATFORM_LDFLAGS += -n --gc-sections · line 43

Quoted 9 lines
arch/powerpc/config.mk +3 -0
+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 at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#5 lore raw

[U-Boot] U-Boot 12.2010 on Tx25

hi,
On tx25 Uboot 2010.12 with standard tx25 config don't read correctly the environment see:
http://www.mail-archive.com/u-boot at 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