Re: [U-Boot] [PATCH 09/24 V2] arch/powerpc/*/config.mk:makeCONFIG_SYS_LDSCRIPT settings work

2010-11-25 Thread Haiying Wang
On Thu, 2010-11-25 at 10:19 -0700, Wolfgang Denk wrote:
 Dear Haiying Wang,
 
 In message 1290702018.2007.4.ca...@haiying-laptop you wrote:
 
   - If CONFIG_SYS_LDCONFIG is not set, and the system is booting
 from
 NAND (CONFIG_NAND_U_BOOT is set), then a board specific linker
 script board/$(BOARDDIR)/u-boot-nand.lds gets use.
 
  u-boot-nand.lds is not in board/$(BOARDDIR) for 85xx at least, it is
 in
  $(SRCTREE)/$(CPUDIR)/
 
 This is not correct - situation before applying my patches:

 - find * -name u-boot-nand.lds
 arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
so your patch for arch/powerpc/config.mk will not get u-boot-nand.lds
for mpc85xx boards, only for the boards below. Then 85xx boards still
need to get the lds from board/$(BOARDIR)/config.mk. Is that what you
want?

 board/amcc/acadia/u-boot-nand.lds
 board/amcc/bamboo/u-boot-nand.lds
 board/amcc/canyonlands/u-boot-nand.lds
 board/amcc/kilauea/u-boot-nand.lds
 board/amcc/sequoia/u-boot-nand.lds
 board/esd/pmc440/u-boot-nand.lds
 board/samsung/smdk6400/u-boot-nand.lds
 
   - If we are not booting from NAND, we test if a processor specific
 linker script arch/powerpc/cpu/$(CPU)/u-boot.lds exists; if so
 we
 use that.
  should we use $(CPUDIR) instead of arch/powerpc/cpu/$(CPU)?
 
 I'm not sure if CPUDIR is defined at that time.  Did you try it out?

CPUDIR is defined in config.mk, I tried it for 85xx/p1 boards and it
worked.

Haiying


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 09/24 V2] arch/powerpc/*/config.mk:makeCONFIG_SYS_LDSCRIPT settings work

2010-11-25 Thread Wolfgang Denk
Dear Haiying Wang,

In message 1290708988.2007.13.ca...@haiying-laptop you wrote:

   u-boot-nand.lds is not in board/$(BOARDDIR) for 85xx at least, it is
  in
   $(SRCTREE)/$(CPUDIR)/
  
  This is not correct - situation before applying my patches:
 
  - find * -name u-boot-nand.lds
  arch/powerpc/cpu/mpc85xx/u-boot-nand.lds

Oops, sorry. I missed that one, even though I was looking for it :-(

 so your patch for arch/powerpc/config.mk will not get u-boot-nand.lds
 for mpc85xx boards, only for the boards below. Then 85xx boards still
 need to get the lds from board/$(BOARDIR)/config.mk. Is that what you
 want?

No, not really.  But actually I was just cleaning up probems where ran
into them, not trying to perform a more general cleanup [*].

The situation is that the relevant 85xx boards appeare to have their
own config.mk files which explicitly set LDSCRIPT to the value they
need (which is indeed different from the default that gets set up ib
arch/powerpc/config.mk:

arch/powerpc/config.mk:  LDSCRIPT := 
$(SRCTREE)/$(CONFIG_BOARDDIR)/u-boot-nand.lds

board/freescale/mpc8536ds/config.mk:   LDSCRIPT := 
$(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
board/freescale/mpc8569mds/config.mk:  LDSCRIPT := 
$(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
board/freescale/p1_p2_rdb/config.mk:   LDSCRIPT := 
$(TOPDIR)/$(CPUDIR)/u-boot-nand.lds

So it seems my patches do not have any impact on the building of 85xx
systems.  Or am I missing something?

 CPUDIR is defined in config.mk, I tried it for 85xx/p1 boards and it
 worked.

OK, I'll remember this for the next optimization.

[*] There is more that can be done for ontimization: actually many of
the PPC u-boot.lds files are (except for white space, indentation
and tiny irrelevant details) identical. I intend to use a single,
common linker script for all these cases, which will allow to
remove dozens of more or less identical files.

But I want to have a stable code base first.

Best regards,

Wolfgang Denk

-- 
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: w...@denx.de
Go to Heaven for the climate, Hell for the company.- Mark Twain
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 09/24 V2] arch/powerpc/*/config.mk:makeCONFIG_SYS_LDSCRIPT settings work

2010-11-25 Thread Haiying Wang
On Thu, 2010-11-25 at 11:28 -0700, Wolfgang Denk wrote:
 Dear Haiying Wang,
 
 In message 1290708988.2007.13.ca...@haiying-laptop you wrote:
 
u-boot-nand.lds is not in board/$(BOARDDIR) for 85xx at least,
 it is
   in
$(SRCTREE)/$(CPUDIR)/
  
   This is not correct - situation before applying my patches:
 
   - find * -name u-boot-nand.lds
   arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
 
 Oops, sorry. I missed that one, even though I was looking for it :-(
 
  so your patch for arch/powerpc/config.mk will not get
 u-boot-nand.lds
  for mpc85xx boards, only for the boards below. Then 85xx boards
 still
  need to get the lds from board/$(BOARDIR)/config.mk. Is that what
 you
  want?
 
 No, not really.  But actually I was just cleaning up probems where ran
 into them, not trying to perform a more general cleanup [*].
 
 The situation is that the relevant 85xx boards appeare to have their
 own config.mk files which explicitly set LDSCRIPT to the value they
 need (which is indeed different from the default that gets set up ib
 arch/powerpc/config.mk:
 
 arch/powerpc/config.mk:  LDSCRIPT :=
 $(SRCTREE)/$(CONFIG_BOARDDIR)/u-boot-nand.lds
 
 board/freescale/mpc8536ds/config.mk:   LDSCRIPT :=
 $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
 board/freescale/mpc8569mds/config.mk:  LDSCRIPT :=
 $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
 board/freescale/p1_p2_rdb/config.mk:   LDSCRIPT :=
 $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
 
 So it seems my patches do not have any impact on the building of 85xx
 systems.  Or am I missing something?
 
No, your patch doesn't have impact on them. I just wonder if you wanted
to apply your patch for 85xx board.:)

Haiying




___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot