Commit ef123c525370463254a6f8e67563fdb0b0b46412
1 parent
3ebd1cbc49
Exists in
master
and in
53 other branches
Refactor linker-generated arrays
Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Showing 177 changed files with 380 additions and 351 deletions Side-by-side Diff
- .gitignore
- Makefile
- arch/arm/cpu/arm920t/ep93xx/u-boot.lds
- arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
- arch/arm/cpu/ixp/u-boot.lds
- arch/arm/cpu/u-boot.lds
- arch/avr32/cpu/u-boot.lds
- arch/blackfin/cpu/u-boot.lds
- arch/microblaze/cpu/u-boot.lds
- arch/mips/cpu/u-boot.lds
- arch/nds32/cpu/n1213/u-boot.lds
- arch/nios2/cpu/u-boot.lds
- arch/powerpc/cpu/74xx_7xx/u-boot.lds
- arch/powerpc/cpu/mpc512x/u-boot.lds
- arch/powerpc/cpu/mpc5xx/u-boot.lds
- arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds
- arch/powerpc/cpu/mpc5xxx/u-boot.lds
- arch/powerpc/cpu/mpc8220/u-boot.lds
- arch/powerpc/cpu/mpc824x/u-boot.lds
- arch/powerpc/cpu/mpc8260/u-boot.lds
- arch/powerpc/cpu/mpc83xx/u-boot.lds
- arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
- arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
- arch/powerpc/cpu/mpc85xx/u-boot.lds
- arch/powerpc/cpu/mpc86xx/u-boot.lds
- arch/powerpc/cpu/ppc4xx/u-boot.lds
- arch/sandbox/cpu/u-boot.lds
- arch/sh/cpu/sh2/u-boot.lds
- arch/sh/cpu/sh3/u-boot.lds
- arch/sh/cpu/sh4/u-boot.lds
- arch/x86/cpu/u-boot.lds
- board/BuS/eb_cpu5282/u-boot.lds
- board/LEOX/elpt860/u-boot.lds
- board/RPXClassic/u-boot.lds
- board/RPXClassic/u-boot.lds.debug
- board/RPXlite/u-boot.lds
- board/RPXlite/u-boot.lds.debug
- board/RPXlite_dw/u-boot.lds
- board/RPXlite_dw/u-boot.lds.debug
- board/RRvision/u-boot.lds
- board/actux1/u-boot.lds
- board/actux2/u-boot.lds
- board/actux3/u-boot.lds
- board/adder/u-boot.lds
- board/altera/nios2-generic/u-boot.lds
- 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/amcc/sequoia/u-boot-ram.lds
- board/astro/mcf5373l/u-boot.lds
- board/cobra5272/u-boot.lds
- board/cogent/u-boot.lds
- board/cogent/u-boot.lds.debug
- board/cray/L1/u-boot.lds.debug
- board/dave/PPChameleonEVB/u-boot.lds
- board/dvlhost/u-boot.lds
- board/eltec/mhpc/u-boot.lds
- board/eltec/mhpc/u-boot.lds.debug
- board/emk/top860/u-boot.lds
- board/ep88x/u-boot.lds
- board/esd/dasa_sim/u-boot.lds
- board/esd/pmc440/u-boot-nand.lds
- board/esd/tasreg/u-boot.lds
- board/esteem192e/u-boot.lds
- board/evb64260/u-boot.lds
- board/fads/u-boot.lds
- board/flagadm/u-boot.lds
- board/flagadm/u-boot.lds.debug
- board/freescale/m5208evbe/u-boot.lds
- board/freescale/m52277evb/u-boot.lds
- board/freescale/m5235evb/u-boot.lds
- board/freescale/m5249evb/u-boot.lds
- board/freescale/m5253demo/u-boot.lds
- board/freescale/m5253evbe/u-boot.lds
- board/freescale/m5271evb/u-boot.lds
- board/freescale/m5272c3/u-boot.lds
- board/freescale/m5275evb/u-boot.lds
- board/freescale/m5282evb/u-boot.lds
- board/freescale/m53017evb/u-boot.lds
- board/freescale/m5329evb/u-boot.lds
- board/freescale/m5373evb/u-boot.lds
- board/freescale/m54418twr/u-boot.lds
- board/freescale/m54451evb/u-boot.lds
- board/freescale/m54455evb/u-boot.lds
- board/freescale/m547xevb/u-boot.lds
- board/freescale/m548xevb/u-boot.lds
- board/freescale/mx31ads/u-boot.lds
- board/gaisler/gr_cpci_ax2000/u-boot.lds
- board/gaisler/gr_ep2s60/u-boot.lds
- board/gaisler/gr_xc3s_1500/u-boot.lds
- board/gaisler/grsim/u-boot.lds
- board/gaisler/grsim_leon2/u-boot.lds
- board/gen860t/u-boot-flashenv.lds
- board/gen860t/u-boot.lds
- board/genietv/u-boot.lds
- board/genietv/u-boot.lds.debug
- board/hermes/u-boot.lds
- board/hermes/u-boot.lds.debug
- board/hymod/u-boot.lds
- board/hymod/u-boot.lds.debug
- board/icu862/u-boot.lds
- board/icu862/u-boot.lds.debug
- board/idmr/u-boot.lds
- board/ip860/u-boot.lds
- board/ip860/u-boot.lds.debug
- board/ivm/u-boot.lds
- board/ivm/u-boot.lds.debug
- board/korat/u-boot-F7FC.lds
- board/kup/kup4k/u-boot.lds
- board/kup/kup4k/u-boot.lds.debug
- board/kup/kup4x/u-boot.lds
- board/kup/kup4x/u-boot.lds.debug
- board/lwmon/u-boot.lds
- board/lwmon/u-boot.lds.debug
- board/manroland/uc100/u-boot.lds
- board/matrix_vision/mvsmr/u-boot.lds
- board/mbx8xx/u-boot.lds
- board/mbx8xx/u-boot.lds.debug
- board/mousse/u-boot.lds
- board/mpl/pip405/u-boot.lds.debug
- board/mvblue/u-boot.lds
- board/netphone/u-boot.lds
- board/netphone/u-boot.lds.debug
- board/netta/u-boot.lds
- board/netta/u-boot.lds.debug
- board/netta2/u-boot.lds
- board/netta2/u-boot.lds.debug
- board/netvia/u-boot.lds
- board/netvia/u-boot.lds.debug
- board/nx823/u-boot.lds
- board/nx823/u-boot.lds.debug
- board/openrisc/openrisc-generic/u-boot.lds
- board/quantum/u-boot.lds
- board/r360mpi/u-boot.lds
- board/rbc823/u-boot.lds
- board/renesas/sh7752evb/u-boot.lds
- board/renesas/sh7757lcr/u-boot.lds
- board/rsdproto/u-boot.lds
- board/samsung/smdk5250/smdk5250-uboot-spl.lds
- board/samsung/smdk6400/u-boot-nand.lds
- board/sandburst/karef/u-boot.lds.debug
- board/sandburst/metrobox/u-boot.lds.debug
- board/sandpoint/u-boot.lds
- board/sixnet/u-boot.lds
- board/snmc/qs850/u-boot.lds
- board/snmc/qs860t/u-boot.lds
- board/spc1920/u-boot.lds
- board/spd8xx/u-boot.lds
- board/spd8xx/u-boot.lds.debug
- board/stx/stxxtc/u-boot.lds
- board/stx/stxxtc/u-boot.lds.debug
- board/svm_sc8xx/u-boot.lds
- board/tqc/tqm8xx/u-boot.lds
- board/v37/u-boot.lds
- board/w7o/u-boot.lds.debug
- board/xes/xpedite1000/u-boot.lds.debug
- common/cmd_help.c
- config.mk
- doc/README.commands
- helper.mk
- include/command.h
- include/env_callback.h
- include/linker_lists.h
- nand_spl/board/freescale/mpc8536ds/Makefile
- nand_spl/board/freescale/mpc8569mds/Makefile
- nand_spl/board/freescale/mpc8572ds/Makefile
- nand_spl/board/freescale/mx31pdk/Makefile
- nand_spl/board/freescale/mx31pdk/u-boot.lds
- nand_spl/board/freescale/p1010rdb/Makefile
- nand_spl/board/freescale/p1023rds/Makefile
- nand_spl/board/freescale/p1_p2_rdb/Makefile
- nand_spl/board/karo/tx25/Makefile
- nand_spl/board/karo/tx25/u-boot.lds
- nand_spl/board/samsung/smdk6400/u-boot.lds
- spl/.gitignore
.gitignore
Makefile
... | ... | @@ -556,10 +556,8 @@ |
556 | 556 | $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map -o u-boot |
557 | 557 | else |
558 | 558 | GEN_UBOOT = \ |
559 | - UNDEF_LST=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \ | |
560 | - sed -n -e 's/.*\($(SYM_PREFIX)_u_boot_list_.*\)/-u\1/p'|sort|uniq`;\ | |
561 | 559 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \ |
562 | - $$UNDEF_LST $(__OBJS) \ | |
560 | + $(__OBJS) \ | |
563 | 561 | --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ |
564 | 562 | -Map u-boot.map -o u-boot |
565 | 563 | endif |
... | ... | @@ -592,11 +590,7 @@ |
592 | 590 | $(LDSCRIPT): depend |
593 | 591 | $(MAKE) -C $(dir $@) $(notdir $@) |
594 | 592 | |
595 | -# The following line expands into whole rule which generates u-boot.lst, | |
596 | -# the file containing u-boots LG-array linker section. This is included into | |
597 | -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file. | |
598 | -$(eval $(call make_u_boot_list, $(obj)include/u-boot.lst, $(LIBBOARD) $(LIBS))) | |
599 | -$(obj)u-boot.lds: $(LDSCRIPT) $(obj)include/u-boot.lst | |
593 | +$(obj)u-boot.lds: $(LDSCRIPT) | |
600 | 594 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$< >$@ |
601 | 595 | |
602 | 596 | nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend |
... | ... | @@ -832,7 +826,6 @@ |
832 | 826 | $(obj)board/matrix_vision/*/bootscript.img \ |
833 | 827 | $(obj)board/voiceblue/eeprom \ |
834 | 828 | $(obj)u-boot.lds \ |
835 | - $(obj)include/u-boot.lst \ | |
836 | 829 | $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs] \ |
837 | 830 | $(obj)arch/blackfin/cpu/init.{lds,elf} |
838 | 831 | @rm -f $(obj)include/bmp_logo.h |
... | ... | @@ -870,7 +863,7 @@ |
870 | 863 | @rm -f $(obj)nand_spl/{u-boot.{lds,lst},System.map} |
871 | 864 | @rm -f $(obj)nand_spl/{u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map} |
872 | 865 | @rm -f $(obj)spl/{u-boot-spl,u-boot-spl.bin,u-boot-spl.map} |
873 | - @rm -f $(obj)spl/{u-boot-spl.lds,u-boot.lst} | |
866 | + @rm -f $(obj)spl/u-boot-spl.lds | |
874 | 867 | @rm -f $(obj)MLO MLO.byteswap |
875 | 868 | @rm -f $(obj)SPL |
876 | 869 | @rm -f $(obj)tools/xway-swap-bytes |
arch/arm/cpu/arm920t/ep93xx/u-boot.lds
arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
arch/arm/cpu/ixp/u-boot.lds
arch/arm/cpu/u-boot.lds
arch/avr32/cpu/u-boot.lds
arch/blackfin/cpu/u-boot.lds
arch/microblaze/cpu/u-boot.lds
arch/mips/cpu/u-boot.lds
arch/nds32/cpu/n1213/u-boot.lds
arch/nios2/cpu/u-boot.lds
arch/powerpc/cpu/74xx_7xx/u-boot.lds
arch/powerpc/cpu/mpc512x/u-boot.lds
arch/powerpc/cpu/mpc5xx/u-boot.lds
arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds
arch/powerpc/cpu/mpc5xxx/u-boot.lds
arch/powerpc/cpu/mpc8220/u-boot.lds
arch/powerpc/cpu/mpc824x/u-boot.lds
arch/powerpc/cpu/mpc8260/u-boot.lds
arch/powerpc/cpu/mpc83xx/u-boot.lds
arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
arch/powerpc/cpu/mpc85xx/u-boot.lds
arch/powerpc/cpu/mpc86xx/u-boot.lds
arch/powerpc/cpu/ppc4xx/u-boot.lds
arch/sandbox/cpu/u-boot.lds
arch/sh/cpu/sh2/u-boot.lds
arch/sh/cpu/sh3/u-boot.lds
arch/sh/cpu/sh4/u-boot.lds
arch/x86/cpu/u-boot.lds
board/BuS/eb_cpu5282/u-boot.lds
board/LEOX/elpt860/u-boot.lds
board/RPXClassic/u-boot.lds
board/RPXClassic/u-boot.lds.debug
board/RPXlite/u-boot.lds
board/RPXlite/u-boot.lds.debug
board/RPXlite_dw/u-boot.lds
board/RPXlite_dw/u-boot.lds.debug
board/RRvision/u-boot.lds
board/actux1/u-boot.lds
board/actux2/u-boot.lds
board/actux3/u-boot.lds
board/adder/u-boot.lds
board/altera/nios2-generic/u-boot.lds
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/amcc/sequoia/u-boot-ram.lds
board/astro/mcf5373l/u-boot.lds
board/cobra5272/u-boot.lds
board/cogent/u-boot.lds
board/cogent/u-boot.lds.debug
board/cray/L1/u-boot.lds.debug
board/dave/PPChameleonEVB/u-boot.lds
board/dvlhost/u-boot.lds
board/eltec/mhpc/u-boot.lds
board/eltec/mhpc/u-boot.lds.debug
board/emk/top860/u-boot.lds
board/ep88x/u-boot.lds
board/esd/dasa_sim/u-boot.lds
board/esd/pmc440/u-boot-nand.lds
board/esd/tasreg/u-boot.lds
board/esteem192e/u-boot.lds
board/evb64260/u-boot.lds
board/fads/u-boot.lds
board/flagadm/u-boot.lds
board/flagadm/u-boot.lds.debug
board/freescale/m5208evbe/u-boot.lds
board/freescale/m52277evb/u-boot.lds
board/freescale/m5235evb/u-boot.lds
board/freescale/m5249evb/u-boot.lds
board/freescale/m5253demo/u-boot.lds
board/freescale/m5253evbe/u-boot.lds
board/freescale/m5271evb/u-boot.lds
board/freescale/m5272c3/u-boot.lds
board/freescale/m5275evb/u-boot.lds
board/freescale/m5282evb/u-boot.lds
board/freescale/m53017evb/u-boot.lds
board/freescale/m5329evb/u-boot.lds
board/freescale/m5373evb/u-boot.lds
board/freescale/m54418twr/u-boot.lds
board/freescale/m54451evb/u-boot.lds
board/freescale/m54455evb/u-boot.lds
board/freescale/m547xevb/u-boot.lds
board/freescale/m548xevb/u-boot.lds
board/freescale/mx31ads/u-boot.lds
board/gaisler/gr_cpci_ax2000/u-boot.lds
board/gaisler/gr_ep2s60/u-boot.lds
board/gaisler/gr_xc3s_1500/u-boot.lds
board/gaisler/grsim/u-boot.lds
board/gaisler/grsim_leon2/u-boot.lds
board/gen860t/u-boot-flashenv.lds
board/gen860t/u-boot.lds
board/genietv/u-boot.lds
board/genietv/u-boot.lds.debug
board/hermes/u-boot.lds
board/hermes/u-boot.lds.debug
board/hymod/u-boot.lds
board/hymod/u-boot.lds.debug
board/icu862/u-boot.lds
board/icu862/u-boot.lds.debug
board/idmr/u-boot.lds
board/ip860/u-boot.lds
board/ip860/u-boot.lds.debug
board/ivm/u-boot.lds
board/ivm/u-boot.lds.debug
board/korat/u-boot-F7FC.lds
board/kup/kup4k/u-boot.lds
board/kup/kup4k/u-boot.lds.debug
board/kup/kup4x/u-boot.lds
board/kup/kup4x/u-boot.lds.debug
board/lwmon/u-boot.lds
board/lwmon/u-boot.lds.debug
board/manroland/uc100/u-boot.lds
board/matrix_vision/mvsmr/u-boot.lds
board/mbx8xx/u-boot.lds
board/mbx8xx/u-boot.lds.debug
board/mousse/u-boot.lds
board/mpl/pip405/u-boot.lds.debug
board/mvblue/u-boot.lds
board/netphone/u-boot.lds
board/netphone/u-boot.lds.debug
board/netta/u-boot.lds
board/netta/u-boot.lds.debug
board/netta2/u-boot.lds
board/netta2/u-boot.lds.debug
board/netvia/u-boot.lds
board/netvia/u-boot.lds.debug
board/nx823/u-boot.lds
board/nx823/u-boot.lds.debug
board/openrisc/openrisc-generic/u-boot.lds
board/quantum/u-boot.lds
board/r360mpi/u-boot.lds
board/rbc823/u-boot.lds
board/renesas/sh7752evb/u-boot.lds
board/renesas/sh7757lcr/u-boot.lds
board/rsdproto/u-boot.lds
board/samsung/smdk5250/smdk5250-uboot-spl.lds
board/samsung/smdk6400/u-boot-nand.lds
board/sandburst/karef/u-boot.lds.debug
board/sandburst/metrobox/u-boot.lds.debug
board/sandpoint/u-boot.lds
board/sixnet/u-boot.lds
board/snmc/qs850/u-boot.lds
board/snmc/qs860t/u-boot.lds
board/spc1920/u-boot.lds
board/spd8xx/u-boot.lds
board/spd8xx/u-boot.lds.debug
board/stx/stxxtc/u-boot.lds
board/stx/stxxtc/u-boot.lds.debug
board/svm_sc8xx/u-boot.lds
board/tqc/tqm8xx/u-boot.lds
board/v37/u-boot.lds
board/w7o/u-boot.lds.debug
board/xes/xpedite1000/u-boot.lds.debug
common/cmd_help.c
... | ... | @@ -41,7 +41,7 @@ |
41 | 41 | ); |
42 | 42 | |
43 | 43 | /* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names */ |
44 | -ll_entry_declare(cmd_tbl_t, question_mark, cmd, cmd) = { | |
44 | +ll_entry_declare(cmd_tbl_t, question_mark, cmd) = { | |
45 | 45 | "?", CONFIG_SYS_MAXARGS, 1, do_help, |
46 | 46 | "alias for 'help'", |
47 | 47 | #ifdef CONFIG_SYS_LONGHELP |
config.mk
doc/README.commands
... | ... | @@ -15,25 +15,23 @@ |
15 | 15 | |
16 | 16 | **** Behind the scene ****** |
17 | 17 | |
18 | -The structure created is named with a special prefix (__u_boot_list_cmd_) | |
19 | -and placed by the linker in a special section. | |
18 | +The structure created is named with a special prefix and placed by | |
19 | +the linker in a special section using the linker lists mechanism | |
20 | +(see include/linker_lists.h) | |
20 | 21 | |
21 | 22 | This makes it possible for the final link to extract all commands |
22 | 23 | compiled into any object code and construct a static array so the |
23 | -command can be found in an array starting at _u_boot_list_cmd__start. | |
24 | +command array can be iterated over using the linker lists macros. | |
24 | 25 | |
25 | -To ensure that the linker does not discard these symbols when linking | |
26 | -full U-Boot we generate a list of all the commands we have built (based | |
27 | -on the sections mentioned above) and use that to force the linker to | |
28 | -first enter the symbol as undefined in the output object so that there | |
29 | -is then a need for the symbol to be kept (this is the UNDEF_SYM logic in | |
30 | -the Makefile). | |
26 | +The linker lists feature ensures that the linker does not discard | |
27 | +these symbols when linking full U-Boot even though they are not | |
28 | +referenced in the source code as such. | |
31 | 29 | |
32 | 30 | If a new board is defined do not forget to define the command section |
33 | 31 | by writing in u-boot.lds ($(TOPDIR)/board/boardname/u-boot.lds) these |
34 | 32 | 3 lines: |
35 | 33 | |
36 | 34 | .u_boot_list : { |
37 | - #include "u-boot.lst"; | |
35 | + KEEP(*(SORT(.u_boot_list*))); | |
38 | 36 | } |
helper.mk
1 | -# | |
2 | -# Copyright (C) 2012 Marek Vasut <marex@denx.de> | |
3 | -# | |
4 | -# See file CREDITS for list of people who contributed to this | |
5 | -# project. | |
6 | -# | |
7 | -# This program is free software; you can redistribute it and/or | |
8 | -# modify it under the terms of the GNU General Public License as | |
9 | -# published by the Free Software Foundation; either version 2 of | |
10 | -# the License, or (at your option) any later version. | |
11 | -# | |
12 | -######################################################################### | |
13 | - | |
14 | -## | |
15 | -# make_u_boot_list - Generate contents of u_boot_list section | |
16 | -# 1: The name of the resulting file (usually u-boot.lst) | |
17 | -# 2: Files to analyze for possible u_boot_list entries | |
18 | -# | |
19 | -# This function generates the contents of the u_boot_list section, | |
20 | -# including all the border symbols for it's subsections. The operation | |
21 | -# of this function is as follows, numbering goes per lines: | |
22 | -# | |
23 | -# 1) Dump the ELF header sections from all files supplied via $(2) | |
24 | -# 2) Filter out all other stuff that does not belong into .u_boot_list | |
25 | -# section. | |
26 | -# 3) Fix up the lines so that the resulting output is is in format | |
27 | -# ".u_boot_list.*". | |
28 | -# 4) Remove the last .something$, since that only contains the name | |
29 | -# of the variable to be put into a subsection. This name is irelevant | |
30 | -# for generation of border symbols, thus of no interest, remove it. | |
31 | -# 5) Take each line and for every dot "." in that line, print the whole | |
32 | -# line until that dot "." . This is important so that we have all | |
33 | -# parent border symbols generated as well. | |
34 | -# 6) Load every line and firstly append "\a" at the end and print the | |
35 | -# line. Next, append "@" at the end and print the line. Finally, | |
36 | -# append "~" at the end of line. This will make sense in conjunction | |
37 | -# with 6) and 7). | |
38 | -# 7) Sort the lines. It is imperative to use LC_COLLATE=C here because | |
39 | -# with this, the "\a" symbol is first and "~" symbol is last. Any | |
40 | -# other symbols fall inbetween. Symbols like "@", which marks the | |
41 | -# end of current line (representing current section) and ".", which | |
42 | -# means the line continues and thus represents subsection. | |
43 | -# 8) With such ordering, all lines ending with "\a" will float at the | |
44 | -# begining of all lines with the same prefix. Thus it is easy to | |
45 | -# replace "\a" with __start and make it the __start border symbol. | |
46 | -# Very similarly for "~", which will be always at the bottom and so | |
47 | -# can be replaced by "__end" and made into the __end border symbol. | |
48 | -# Finally, every line ending with "@" symbol will be transformed | |
49 | -# into " *(SORT(${line}*)); " format, which in the linker parlance | |
50 | -# will allow it to trap all symbols relevant to the subsection. | |
51 | -# | |
52 | -define make_u_boot_list | |
53 | -$(1): $(2) | |
54 | - $(OBJDUMP) -h $(2) | \ | |
55 | - sed -n -e '/.*\.u_boot_list[^ ]\+/ ! {d;n}' \ | |
56 | - -e 's/.*\(\.u_boot_list[^ ]\+\).*$$$$/\1/' \ | |
57 | - -e 's/\.[^\.]\+$$$$//' \ | |
58 | - -e ':s /^.\+$$$$/ { p;s/^\(.*\)\.[^\.]*$$$$/\1/;b s }' | \ | |
59 | - sed -n -e 'h;s/$$$$/\a/p;g;s/$$$$/@/p;g;s/$$$$/~/p;' | \ | |
60 | - LC_COLLATE=C sort -u | \ | |
61 | - sed -n -e '/\a$$$$/ { s/\./_/g;s/\a$$$$/__start = .;/p; }'\ | |
62 | - -e '/~$$$$/ { s/\./_/g;s/~$$$$/__end = .;/p; }'\ | |
63 | - -e '/@$$$$/ { s/\(.*\)@$$$$/*(SORT(\1.*));/p }' > $(1) | |
64 | -endef |
include/command.h
... | ... | @@ -175,7 +175,7 @@ |
175 | 175 | _usage, _help, NULL) |
176 | 176 | |
177 | 177 | #define U_BOOT_CMD_COMPLETE(_name, _maxargs, _rep, _cmd, _usage, _help, _comp) \ |
178 | - ll_entry_declare(cmd_tbl_t, _name, cmd, cmd) = \ | |
178 | + ll_entry_declare(cmd_tbl_t, _name, cmd) = \ | |
179 | 179 | U_BOOT_CMD_MKENT_COMPLETE(_name, _maxargs, _rep, _cmd, \ |
180 | 180 | _usage, _help, _comp); |
181 | 181 |
include/env_callback.h
include/linker_lists.h
... | ... | @@ -13,6 +13,96 @@ |
13 | 13 | * published by the Free Software Foundation; either version 2 of |
14 | 14 | * the License, or (at your option) any later version. |
15 | 15 | */ |
16 | + | |
17 | +/* | |
18 | + * There is no use in including this from ASM files, but that happens | |
19 | + * anyway, e.g. PPC kgdb.S includes command.h which incluse us. | |
20 | + * So just don't define anything when included from ASM. | |
21 | + */ | |
22 | + | |
23 | +#if !defined(__ASSEMBLY__) | |
24 | + | |
25 | +/** | |
26 | + * A linker list is constructed by grouping together linker input | |
27 | + * sections, each containning one entry of the list. Each input section | |
28 | + * contains a constant initialized variable which holds the entry's | |
29 | + * content. Linker list input sections are constructed from the list | |
30 | + * and entry names, plus a prefix which allows grouping all lists | |
31 | + * together. Assuming _list and _entry are the list and entry names, | |
32 | + * then the corresponding input section name is | |
33 | + * | |
34 | + * _u_boot_list + _2_ + @_list + _2_ + @_entry | |
35 | + * | |
36 | + * and the C variable name is | |
37 | + * | |
38 | + * .u_boot_list_ + 2_ + @_list + _2_ + @_entry | |
39 | + * | |
40 | + * This ensures uniqueness for both input section and C variable name. | |
41 | + * | |
42 | + * Note that the names differ only in the first character, "." for the | |
43 | + * setion and "_" for the variable, so that the linker cannot confuse | |
44 | + * section and symbol names. From now on, both names will be referred | |
45 | + * to as | |
46 | + * | |
47 | + * %u_boot_list_ + 2_ + @_list + _2_ + @_entry | |
48 | + * | |
49 | + * Entry variables need never be referred to directly. | |
50 | + * | |
51 | + * The naming scheme for input sections allows grouping all linker lists | |
52 | + * into a single linker output section and grouping all entries for a | |
53 | + * single list. | |
54 | + * | |
55 | + * Note the two '_2_' constant components in the names: their presence | |
56 | + * allows putting a start and end symbols around a list, by mapping | |
57 | + * these symbols to sections names with components "1" (before) and | |
58 | + * "3" (after) instead of "2" (within). | |
59 | + * Start and end symbols for a list can generally be defined as | |
60 | + * | |
61 | + * %u_boot_list_2_ + @_list + _1_... | |
62 | + * %u_boot_list_2_ + @_list + _3_... | |
63 | + * | |
64 | + * Start and end symbols for the whole of the linker lists area can be | |
65 | + * defined as | |
66 | + * | |
67 | + * %u_boot_list_1_... | |
68 | + * %u_boot_list_3_... | |
69 | + * | |
70 | + * Here is an example of the sorted sections which result from a list | |
71 | + * "array" made up of three entries : "first", "second" and "third", | |
72 | + * iterated at least once. | |
73 | + * | |
74 | + * .u_boot_list_2_array_1 | |
75 | + * .u_boot_list_2_array_2_first | |
76 | + * .u_boot_list_2_array_2_second | |
77 | + * .u_boot_list_2_array_2_third | |
78 | + * .u_boot_list_2_array_3 | |
79 | + * | |
80 | + * If lists must be divided into sublists (e.g. for iterating only on | |
81 | + * part of a list), one can simply give the list a name of the form | |
82 | + * 'outer_2_inner', where 'outer' is the global list name and 'inner' | |
83 | + * is the sub-list name. Iterators for the whole list should use the | |
84 | + * global list name ("outer"); iterators for only a sub-list should use | |
85 | + * the full sub-list name ("outer_2_inner"). | |
86 | + * | |
87 | + * Here is an example of the sections generated from a global list | |
88 | + * named "drivers", two sub-lists named "i2c" and "pci", and iterators | |
89 | + * defined for the whole list and each sub-list: | |
90 | + * | |
91 | + * %u_boot_list_2_drivers_1 | |
92 | + * %u_boot_list_2_drivers_2_i2c_1 | |
93 | + * %u_boot_list_2_drivers_2_i2c_2_first | |
94 | + * %u_boot_list_2_drivers_2_i2c_2_first | |
95 | + * %u_boot_list_2_drivers_2_i2c_2_second | |
96 | + * %u_boot_list_2_drivers_2_i2c_2_third | |
97 | + * %u_boot_list_2_drivers_2_i2c_3 | |
98 | + * %u_boot_list_2_drivers_2_pci_1 | |
99 | + * %u_boot_list_2_drivers_2_pci_2_first | |
100 | + * %u_boot_list_2_drivers_2_pci_2_second | |
101 | + * %u_boot_list_2_drivers_2_pci_2_third | |
102 | + * %u_boot_list_2_drivers_2_pci_3 | |
103 | + * %u_boot_list_2_drivers_3 | |
104 | + */ | |
105 | + | |
16 | 106 | #ifndef __LINKER_LISTS_H__ |
17 | 107 | #define __LINKER_LISTS_H__ |
18 | 108 | |
19 | 109 | |
20 | 110 | |
21 | 111 | |
22 | 112 | |
23 | 113 | |
24 | 114 | |
... | ... | @@ -20,43 +110,28 @@ |
20 | 110 | * ll_entry_declare() - Declare linker-generated array entry |
21 | 111 | * @_type: Data type of the entry |
22 | 112 | * @_name: Name of the entry |
23 | - * @_section_u: Subsection of u_boot_list in which this entry is placed | |
24 | - * (with underscores instead of dots, for name concatenation) | |
25 | - * @_section_d: Subsection of u_boot_list in which this entry is placed | |
26 | - * (with dots, for section concatenation) | |
113 | + * @_list: name of the list. Should contain only characters allowed | |
114 | + * in a C variable name! | |
27 | 115 | * |
28 | 116 | * This macro declares a variable that is placed into a linker-generated |
29 | 117 | * array. This is a basic building block for more advanced use of linker- |
30 | 118 | * generated arrays. The user is expected to build their own macro wrapper |
31 | 119 | * around this one. |
32 | 120 | * |
33 | - * A variable declared using this macro must be compile-time initialized | |
34 | - * and is as such placed into subsection of special section, .u_boot_list. | |
35 | - * The subsection is specified by the _section_[u,d] parameter, see below. | |
36 | - * The base name of the variable is _name, yet the actual variable is | |
37 | - * declared as concatenation of | |
121 | + * A variable declared using this macro must be compile-time initialized. | |
38 | 122 | * |
39 | - * %_u_boot_list_ + @_section_u + _ + @_name | |
40 | - * | |
41 | - * which ensures name uniqueness. This variable shall never be refered | |
42 | - * directly though. | |
43 | - * | |
44 | 123 | * Special precaution must be made when using this macro: |
45 | - * 1) The _type must not contain the "static" keyword, otherwise the entry | |
46 | - * is not generated. | |
47 | 124 | * |
48 | - * 2) The @_section_u and @_section_d variables must match, the only difference | |
49 | - * is that in @_section_u is every dot "." character present in @_section_d | |
50 | - * replaced by a single underscore "_" character in @_section_u. The actual | |
51 | - * purpose of these parameters is to select proper subsection in the global | |
52 | - * .u_boot_list section. | |
125 | + * 1) The _type must not contain the "static" keyword, otherwise the | |
126 | + * entry is generated and can be iterated but is listed in the map | |
127 | + * file and cannot be retrieved by name. | |
53 | 128 | * |
54 | - * 3) In case a section is declared that contains some array elements AND a | |
55 | - * subsection of this section is declared and contains some elements, it is | |
56 | - * imperative that the elements are of the same type. | |
129 | + * 2) In case a section is declared that contains some array elements AND | |
130 | + * a subsection of this section is declared and contains some elements, | |
131 | + * it is imperative that the elements are of the same type. | |
57 | 132 | * |
58 | 133 | * 4) In case an outer section is declared that contains some array elements |
59 | - * AND am inner subsection of this section is declared and contains some | |
134 | + * AND an inner subsection of this section is declared and contains some | |
60 | 135 | * elements, then when traversing the outer section, even the elements of |
61 | 136 | * the inner sections are present in the array. |
62 | 137 | * |
63 | 138 | |
64 | 139 | |
65 | 140 | |
66 | 141 | |
67 | 142 | |
68 | 143 | |
69 | 144 | |
70 | 145 | |
71 | 146 | |
... | ... | @@ -66,39 +141,71 @@ |
66 | 141 | * .y = 4, |
67 | 142 | * }; |
68 | 143 | */ |
69 | -#define ll_entry_declare(_type, _name, _section_u, _section_d) \ | |
70 | - _type _u_boot_list_##_section_u##_##_name __attribute__(( \ | |
71 | - unused, aligned(4), \ | |
72 | - section(".u_boot_list."#_section_d"."#_name))) | |
144 | +#define ll_entry_declare(_type, _name, _list) \ | |
145 | + _type _u_boot_list_2_##_list##_2_##_name __aligned(4) \ | |
146 | + __attribute__((unused, \ | |
147 | + section(".u_boot_list_2_"#_list"_2_"#_name))) | |
73 | 148 | |
74 | 149 | /** |
150 | + * We need a 0-byte-size type for iterator symbols, and the compiler | |
151 | + * does not allow defining objects of C type 'void'. Using an empty | |
152 | + * struct is allowed by the compiler, but causes gcc versions 4.4 and | |
153 | + * below to complain about aliasing. Therefore we use the next best | |
154 | + * thing: zero-sized arrays, which are both 0-byte-size and exempt from | |
155 | + * aliasing warnings. | |
156 | + */ | |
157 | + | |
158 | +/** | |
75 | 159 | * ll_entry_start() - Point to first entry of linker-generated array |
76 | 160 | * @_type: Data type of the entry |
77 | - * @_section_u: Subsection of u_boot_list in which this entry is placed | |
78 | - * (with underscores instead of dots) | |
161 | + * @_list: Name of the list in which this entry is placed | |
79 | 162 | * |
80 | 163 | * This function returns (_type *) pointer to the very first entry of a |
81 | 164 | * linker-generated array placed into subsection of .u_boot_list section |
82 | - * specified by _section_u argument. | |
165 | + * specified by _list argument. | |
83 | 166 | * |
167 | + * Since this macro defines an array start symbol, its leftmost index | |
168 | + * must be 2 and its rightmost index must be 1. | |
169 | + * | |
84 | 170 | * Example: |
85 | 171 | * struct my_sub_cmd *msc = ll_entry_start(struct my_sub_cmd, cmd_sub); |
86 | 172 | */ |
87 | -#define ll_entry_start(_type, _section_u) \ | |
88 | - ({ \ | |
89 | - extern _type _u_boot_list_##_section_u##__start; \ | |
90 | - _type *_ll_result = &_u_boot_list_##_section_u##__start;\ | |
91 | - _ll_result; \ | |
92 | - }) | |
173 | +#define ll_entry_start(_type, _list) \ | |
174 | +({ \ | |
175 | + static char start[0] __aligned(4) __attribute__((unused, \ | |
176 | + section(".u_boot_list_2_"#_list"_1"))); \ | |
177 | + (_type *)&start; \ | |
178 | +}) | |
93 | 179 | |
94 | 180 | /** |
95 | - * ll_entry_count() - Return the number of elements in linker-generated array | |
181 | + * ll_entry_end() - Point after last entry of linker-generated array | |
96 | 182 | * @_type: Data type of the entry |
97 | - * @_section_u: Subsection of u_boot_list in which this entry is placed | |
183 | + * @_list: Name of the list in which this entry is placed | |
98 | 184 | * (with underscores instead of dots) |
99 | 185 | * |
186 | + * This function returns (_type *) pointer after the very last entry of | |
187 | + * a linker-generated array placed into subsection of .u_boot_list | |
188 | + * section specified by _list argument. | |
189 | + * | |
190 | + * Since this macro defines an array end symbol, its leftmost index | |
191 | + * must be 2 and its rightmost index must be 3. | |
192 | + * | |
193 | + * Example: | |
194 | + * struct my_sub_cmd *msc = ll_entry_end(struct my_sub_cmd, cmd_sub); | |
195 | + */ | |
196 | +#define ll_entry_end(_type, _list) \ | |
197 | +({ \ | |
198 | + static char end[0] __aligned(4) __attribute__((unused, \ | |
199 | + section(".u_boot_list_2_"#_list"_3"))); \ | |
200 | + (_type *)&end; \ | |
201 | +}) | |
202 | +/** | |
203 | + * ll_entry_count() - Return the number of elements in linker-generated array | |
204 | + * @_type: Data type of the entry | |
205 | + * @_list: Name of the list of which the number of elements is computed | |
206 | + * | |
100 | 207 | * This function returns the number of elements of a linker-generated array |
101 | - * placed into subsection of .u_boot_list section specified by _section_u | |
208 | + * placed into subsection of .u_boot_list section specified by _list | |
102 | 209 | * argument. The result is of an unsigned int type. |
103 | 210 | * |
104 | 211 | * Example: |
105 | 212 | |
106 | 213 | |
107 | 214 | |
... | ... | @@ -108,23 +215,19 @@ |
108 | 215 | * for (i = 0; i < count; i++, msc++) |
109 | 216 | * printf("Entry %i, x=%i y=%i\n", i, msc->x, msc->y); |
110 | 217 | */ |
111 | -#define ll_entry_count(_type, _section_u) \ | |
218 | +#define ll_entry_count(_type, _list) \ | |
112 | 219 | ({ \ |
113 | - extern _type _u_boot_list_##_section_u##__start; \ | |
114 | - extern _type _u_boot_list_##_section_u##__end; \ | |
115 | - unsigned int _ll_result = \ | |
116 | - &_u_boot_list_##_section_u##__end - \ | |
117 | - &_u_boot_list_##_section_u##__start; \ | |
220 | + _type *start = ll_entry_start(_type, _list); \ | |
221 | + _type *end = ll_entry_end(_type, _list); \ | |
222 | + unsigned int _ll_result = end - start; \ | |
118 | 223 | _ll_result; \ |
119 | 224 | }) |
120 | 225 | |
121 | - | |
122 | 226 | /** |
123 | 227 | * ll_entry_get() - Retrieve entry from linker-generated array by name |
124 | 228 | * @_type: Data type of the entry |
125 | 229 | * @_name: Name of the entry |
126 | - * @_section_u: Subsection of u_boot_list in which this entry is placed | |
127 | - * (with underscores instead of dots) | |
230 | + * @_list: Name of the list in which this entry is placed | |
128 | 231 | * |
129 | 232 | * This function returns a pointer to a particular entry in LG-array |
130 | 233 | * identified by the subsection of u_boot_list where the entry resides |
131 | 234 | |
132 | 235 | |
... | ... | @@ -138,12 +241,55 @@ |
138 | 241 | * ... |
139 | 242 | * struct my_sub_cmd *c = ll_entry_get(struct my_sub_cmd, my_sub_cmd, cmd_sub); |
140 | 243 | */ |
141 | -#define ll_entry_get(_type, _name, _section_u) \ | |
244 | +#define ll_entry_get(_type, _name, _list) \ | |
142 | 245 | ({ \ |
143 | - extern _type _u_boot_list_##_section_u##_##_name; \ | |
144 | - _type *_ll_result = &_u_boot_list_##_section_u##_##_name;\ | |
246 | + extern _type _u_boot_list_2_##_list##_2_##_name; \ | |
247 | + _type *_ll_result = \ | |
248 | + &_u_boot_list_2_##_list##_2_##_name; \ | |
145 | 249 | _ll_result; \ |
146 | 250 | }) |
251 | + | |
252 | +/** | |
253 | + * ll_start() - Point to first entry of first linker-generated array | |
254 | + * @_type: Data type of the entry | |
255 | + * | |
256 | + * This function returns (_type *) pointer to the very first entry of | |
257 | + * the very first linker-generated array. | |
258 | + * | |
259 | + * Since this macro defines the start of the linker-generated arrays, | |
260 | + * its leftmost index must be 1. | |
261 | + * | |
262 | + * Example: | |
263 | + * struct my_sub_cmd *msc = ll_start(struct my_sub_cmd); | |
264 | + */ | |
265 | +#define ll_start(_type) \ | |
266 | +({ \ | |
267 | + static char start[0] __aligned(4) __attribute__((unused, \ | |
268 | + section(".u_boot_list_1"))); \ | |
269 | + (_type *)&start; \ | |
270 | +}) | |
271 | + | |
272 | +/** | |
273 | + * ll_entry_end() - Point after last entry of last linker-generated array | |
274 | + * @_type: Data type of the entry | |
275 | + * | |
276 | + * This function returns (_type *) pointer after the very last entry of | |
277 | + * the very last linker-generated array. | |
278 | + * | |
279 | + * Since this macro defines the end of the linker-generated arrays, | |
280 | + * its leftmost index must be 3. | |
281 | + * | |
282 | + * Example: | |
283 | + * struct my_sub_cmd *msc = ll_end(struct my_sub_cmd); | |
284 | + */ | |
285 | +#define ll_end(_type) \ | |
286 | +({ \ | |
287 | + static char end[0] __aligned(4) __attribute__((unused, \ | |
288 | + section(".u_boot_list_3"))); \ | |
289 | + (_type *)&end; \ | |
290 | +}) | |
291 | + | |
292 | +#endif /* __ASSEMBLY__ */ | |
147 | 293 | |
148 | 294 | #endif /* __LINKER_LISTS_H__ */ |
nand_spl/board/freescale/mpc8536ds/Makefile
... | ... | @@ -32,7 +32,6 @@ |
32 | 32 | nandobj := $(OBJTREE)/nand_spl/ |
33 | 33 | |
34 | 34 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds |
35 | -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst | |
36 | 35 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
37 | 36 | $(LDFLAGS) $(LDFLAGS_FINAL) |
38 | 37 | AFLAGS += -DCONFIG_NAND_SPL |
... | ... | @@ -62,11 +61,7 @@ |
62 | 61 | -Map $(nandobj)u-boot-spl.map \ |
63 | 62 | -o $(nandobj)u-boot-spl |
64 | 63 | |
65 | -# The following line expands into whole rule which generates $(LSTSCRIPT), | |
66 | -# the file containing u-boots LG-array linker section. This is included into | |
67 | -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file. | |
68 | -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) | |
69 | -$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT) | |
64 | +$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) | |
70 | 65 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ |
71 | 66 | -ansi -D__ASSEMBLY__ -P - <$< >$@ |
72 | 67 |
nand_spl/board/freescale/mpc8569mds/Makefile
... | ... | @@ -32,7 +32,6 @@ |
32 | 32 | nandobj := $(OBJTREE)/nand_spl/ |
33 | 33 | |
34 | 34 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds |
35 | -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst | |
36 | 35 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
37 | 36 | $(LDFLAGS) $(LDFLAGS_FINAL) |
38 | 37 | AFLAGS += -DCONFIG_NAND_SPL |
... | ... | @@ -62,11 +61,7 @@ |
62 | 61 | -Map $(nandobj)u-boot-spl.map \ |
63 | 62 | -o $(nandobj)u-boot-spl |
64 | 63 | |
65 | -# The following line expands into whole rule which generates $(LSTSCRIPT), | |
66 | -# the file containing u-boots LG-array linker section. This is included into | |
67 | -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file. | |
68 | -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) | |
69 | -$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT) | |
64 | +$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) | |
70 | 65 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ |
71 | 66 | -ansi -D__ASSEMBLY__ -P - <$< >$@ |
72 | 67 |
nand_spl/board/freescale/mpc8572ds/Makefile
... | ... | @@ -32,7 +32,6 @@ |
32 | 32 | nandobj := $(OBJTREE)/nand_spl/ |
33 | 33 | |
34 | 34 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds |
35 | -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst | |
36 | 35 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
37 | 36 | $(LDFLAGS) $(LDFLAGS_FINAL) |
38 | 37 | AFLAGS += -DCONFIG_NAND_SPL |
... | ... | @@ -62,11 +61,7 @@ |
62 | 61 | -Map $(nandobj)u-boot-spl.map \ |
63 | 62 | -o $(nandobj)u-boot-spl |
64 | 63 | |
65 | -# The following line expands into whole rule which generates $(LSTSCRIPT), | |
66 | -# the file containing u-boots LG-array linker section. This is included into | |
67 | -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file. | |
68 | -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) | |
69 | -$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT) | |
64 | +$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) | |
70 | 65 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ |
71 | 66 | -ansi -D__ASSEMBLY__ -P - <$< >$@ |
72 | 67 |
nand_spl/board/freescale/mx31pdk/Makefile
... | ... | @@ -6,7 +6,6 @@ |
6 | 6 | nandobj := $(OBJTREE)/nand_spl/ |
7 | 7 | |
8 | 8 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds |
9 | -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst | |
10 | 9 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ |
11 | 10 | $(LDFLAGS_FINAL) |
12 | 11 | AFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL |
... | ... | @@ -38,11 +37,7 @@ |
38 | 37 | -Map $(nandobj)u-boot-spl.map \ |
39 | 38 | -o $@ |
40 | 39 | |
41 | -# The following line expands into whole rule which generates $(LSTSCRIPT), | |
42 | -# the file containing u-boots LG-array linker section. This is included into | |
43 | -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file. | |
44 | -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) | |
45 | -$(nandobj)u-boot.lds: $(LDSCRIPT) $(LSTSCRIPT) | |
40 | +$(nandobj)u-boot.lds: $(LDSCRIPT) | |
46 | 41 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ |
47 | 42 | -ansi -D__ASSEMBLY__ -P - <$< >$@ |
48 | 43 |
nand_spl/board/freescale/mx31pdk/u-boot.lds
nand_spl/board/freescale/p1010rdb/Makefile
... | ... | @@ -32,7 +32,6 @@ |
32 | 32 | nandobj := $(OBJTREE)/nand_spl/ |
33 | 33 | |
34 | 34 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds |
35 | -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst | |
36 | 35 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) $(LDFLAGS) \ |
37 | 36 | $(LDFLAGS_FINAL) |
38 | 37 | AFLAGS += -DCONFIG_NAND_SPL |
... | ... | @@ -62,11 +61,7 @@ |
62 | 61 | -Map $(nandobj)u-boot-spl.map \ |
63 | 62 | -o $(nandobj)u-boot-spl |
64 | 63 | |
65 | -# The following line expands into whole rule which generates $(LSTSCRIPT), | |
66 | -# the file containing u-boots LG-array linker section. This is included into | |
67 | -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file. | |
68 | -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) | |
69 | -$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT) | |
64 | +$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) | |
70 | 65 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)board/$(BOARDDIR) \ |
71 | 66 | -ansi -D__ASSEMBLY__ -P - <$< >$@ |
72 | 67 |
nand_spl/board/freescale/p1023rds/Makefile
... | ... | @@ -27,7 +27,6 @@ |
27 | 27 | nandobj := $(OBJTREE)/nand_spl/ |
28 | 28 | |
29 | 29 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds |
30 | -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst | |
31 | 30 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
32 | 31 | $(LDFLAGS) $(LDFLAGS_FINAL) |
33 | 32 | AFLAGS += -DCONFIG_NAND_SPL |
... | ... | @@ -57,11 +56,7 @@ |
57 | 56 | -Map $(nandobj)u-boot-spl.map \ |
58 | 57 | -o $(nandobj)u-boot-spl |
59 | 58 | |
60 | -# The following line expands into whole rule which generates $(LSTSCRIPT), | |
61 | -# the file containing u-boots LG-array linker section. This is included into | |
62 | -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file. | |
63 | -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) | |
64 | -$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT) | |
59 | +$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) | |
65 | 60 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ |
66 | 61 | -ansi -D__ASSEMBLY__ -P - <$< >$@ |
67 | 62 |
nand_spl/board/freescale/p1_p2_rdb/Makefile
... | ... | @@ -32,7 +32,6 @@ |
32 | 32 | nandobj := $(OBJTREE)/nand_spl/ |
33 | 33 | |
34 | 34 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds |
35 | -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst | |
36 | 35 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
37 | 36 | $(LDFLAGS) $(LDFLAGS_FINAL) |
38 | 37 | AFLAGS += -DCONFIG_NAND_SPL |
... | ... | @@ -62,11 +61,7 @@ |
62 | 61 | -Map $(nandobj)u-boot-spl.map \ |
63 | 62 | -o $(nandobj)u-boot-spl |
64 | 63 | |
65 | -# The following line expands into whole rule which generates $(LSTSCRIPT), | |
66 | -# the file containing u-boots LG-array linker section. This is included into | |
67 | -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file. | |
68 | -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) | |
69 | -$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT) | |
64 | +$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) | |
70 | 65 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ |
71 | 66 | -ansi -D__ASSEMBLY__ -P - <$< >$@ |
72 | 67 |
nand_spl/board/karo/tx25/Makefile
... | ... | @@ -27,7 +27,6 @@ |
27 | 27 | nandobj := $(OBJTREE)/nand_spl/ |
28 | 28 | |
29 | 29 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds |
30 | -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst | |
31 | 30 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ |
32 | 31 | $(LDFLAGS_FINAL) |
33 | 32 | AFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL |
... | ... | @@ -59,11 +58,7 @@ |
59 | 58 | -Map $(nandobj)u-boot-spl.map \ |
60 | 59 | -o $@ |
61 | 60 | |
62 | -# The following line expands into whole rule which generates $(LSTSCRIPT), | |
63 | -# the file containing u-boots LG-array linker section. This is included into | |
64 | -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file. | |
65 | -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) | |
66 | -$(nandobj)u-boot.lds: $(LDSCRIPT) $(LSTSCRIPT) | |
61 | +$(nandobj)u-boot.lds: $(LDSCRIPT) | |
67 | 62 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ |
68 | 63 | -ansi -D__ASSEMBLY__ -P - <$< >$@ |
69 | 64 |
nand_spl/board/karo/tx25/u-boot.lds
nand_spl/board/samsung/smdk6400/u-boot.lds
spl/.gitignore