[U-Boot] [PATCH] Handle most LDSCRIPT setting centrally

Mike Frysinger vapier at gentoo.org
Thu Apr 7 21:55:00 CEST 2011


On Wed, Apr 6, 2011 at 7:31 PM, Scott Wood wrote:
> Currently, some linker scripts are found by common code in config.mk.
> Some are found using CONFIG_SYS_LDSCRIPT, but the code for that is
> sometimes in arch config.mk and sometimes in board config.mk.  Some
> are found using an arch-specific rule for looking in CPUDIR, etc.
>
> Further, the powerpc config.mk rule relied on CONFIG_NAND_SPL
> when it really wanted CONFIG_NAND_U_BOOT -- which covered up the fact
> that not all NAND_U_BOOT builds actually wanted CPUDIR/u-boot-nand.lds.
>
> Replace all of this -- except for a handful of boards that are actually
> selecting a linker script in a unique way -- with centralized ldscript
> finding.
>
> If board code specifies LDSCRIPT, that will be used.
> Otherwise, if CONFIG_SYS_LDSCRIPT is specified, that will be used.
>
> If neither of these are specified, then the central config.mk will
> check for the existence of the following, in order:
>
> $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds (only if CONFIG_NAND_U_BOOT)
> $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds (only if CONFIG_NAND_U_BOOT)
> $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds
> $(TOPDIR)/$(CPUDIR)/u-boot.lds

i guess if i simply renamed blackfin/u-boot.lds.S to
blackfin/u-boot.lds, things would "just work" for me too.
-mike


More information about the U-Boot mailing list