Commit b9735cbaebf497209a9cb111bdf02aacdb3b8866

Authored by Scott Wood
1 parent 510ed3b8fd

spl/mpc85xx: rename cpu_init_nand.c to spl_minimal.c

There is nothing really NAND-specific about this file.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>

Showing 9 changed files with 87 additions and 87 deletions Inline Diff

arch/powerpc/cpu/mpc85xx/cpu_init_nand.c
1 /* File was deleted
2 * Copyright 2009 Freescale Semiconductor, Inc.
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 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23 #include <common.h>
24 #include <asm/processor.h>
25 #include <asm/global_data.h>
26 #include <asm/fsl_ifc.h>
27 #include <asm/io.h>
28
29 DECLARE_GLOBAL_DATA_PTR;
30
31 void cpu_init_f(void)
32 {
33 #if defined(CONFIG_SYS_RAMBOOT) && defined(CONFIG_SYS_INIT_L2_ADDR)
34 ccsr_l2cache_t *l2cache = (void *)CONFIG_SYS_MPC85xx_L2_ADDR;
35
36 out_be32(&l2cache->l2srbar0, CONFIG_SYS_INIT_L2_ADDR);
37
38 /* set MBECCDIS=1, SBECCDIS=1 */
39 out_be32(&l2cache->l2errdis,
40 (MPC85xx_L2ERRDIS_MBECC | MPC85xx_L2ERRDIS_SBECC));
41
42 /* set L2E=1 & L2SRAM=001 */
43 out_be32(&l2cache->l2ctl,
44 (MPC85xx_L2CTL_L2E | MPC85xx_L2CTL_L2SRAM_ENTIRE));
45 #endif
46 }
47
48 #ifndef CONFIG_SYS_FSL_TBCLK_DIV
49 #define CONFIG_SYS_FSL_TBCLK_DIV 8
50 #endif
51
52 void udelay(unsigned long usec)
53 {
54 u32 ticks_per_usec = gd->bus_clk / (CONFIG_SYS_FSL_TBCLK_DIV * 1000000);
55 u32 ticks = ticks_per_usec * usec;
56 u32 s = mfspr(SPRN_TBRL);
57
58 while ((mfspr(SPRN_TBRL) - s) < ticks);
59 }
60 1 /*
arch/powerpc/cpu/mpc85xx/spl_minimal.c
File was created 1 /*
2 * Copyright 2009 Freescale Semiconductor, Inc.
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 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23 #include <common.h>
24 #include <asm/processor.h>
25 #include <asm/global_data.h>
26 #include <asm/fsl_ifc.h>
27 #include <asm/io.h>
28
29 DECLARE_GLOBAL_DATA_PTR;
30
31 void cpu_init_f(void)
32 {
33 #if defined(CONFIG_SYS_RAMBOOT) && defined(CONFIG_SYS_INIT_L2_ADDR)
34 ccsr_l2cache_t *l2cache = (void *)CONFIG_SYS_MPC85xx_L2_ADDR;
35
36 out_be32(&l2cache->l2srbar0, CONFIG_SYS_INIT_L2_ADDR);
37
38 /* set MBECCDIS=1, SBECCDIS=1 */
39 out_be32(&l2cache->l2errdis,
40 (MPC85xx_L2ERRDIS_MBECC | MPC85xx_L2ERRDIS_SBECC));
41
42 /* set L2E=1 & L2SRAM=001 */
43 out_be32(&l2cache->l2ctl,
44 (MPC85xx_L2CTL_L2E | MPC85xx_L2CTL_L2SRAM_ENTIRE));
45 #endif
46 }
47
48 #ifndef CONFIG_SYS_FSL_TBCLK_DIV
49 #define CONFIG_SYS_FSL_TBCLK_DIV 8
50 #endif
51
52 void udelay(unsigned long usec)
53 {
54 u32 ticks_per_usec = gd->bus_clk / (CONFIG_SYS_FSL_TBCLK_DIV * 1000000);
55 u32 ticks = ticks_per_usec * usec;
56 u32 s = mfspr(SPRN_TBRL);
57
58 while ((mfspr(SPRN_TBRL) - s) < ticks);
59 }
60
nand_spl/board/freescale/mpc8536ds/Makefile
1 # 1 #
2 # (C) Copyright 2007 2 # (C) Copyright 2007
3 # Stefan Roese, DENX Software Engineering, sr@denx.de. 3 # Stefan Roese, DENX Software Engineering, sr@denx.de.
4 # 4 #
5 # Copyright 2009-2011 Freescale Semiconductor, Inc. 5 # Copyright 2009-2011 Freescale Semiconductor, Inc.
6 # 6 #
7 # See file CREDITS for list of people who contributed to this 7 # See file CREDITS for list of people who contributed to this
8 # project. 8 # project.
9 # 9 #
10 # This program is free software; you can redistribute it and/or 10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License as 11 # modify it under the terms of the GNU General Public License as
12 # published by the Free Software Foundation; either version 2 of 12 # published by the Free Software Foundation; either version 2 of
13 # the License, or (at your option) any later version. 13 # the License, or (at your option) any later version.
14 # 14 #
15 # This program is distributed in the hope that it will be useful, 15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details. 18 # GNU General Public License for more details.
19 # 19 #
20 # You should have received a copy of the GNU General Public License 20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software 21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 # MA 02111-1307 USA 23 # MA 02111-1307 USA
24 # 24 #
25 25
26 NAND_SPL := y 26 NAND_SPL := y
27 CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000 27 CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000
28 PAD_TO := 0xfff01000 28 PAD_TO := 0xfff01000
29 29
30 include $(TOPDIR)/config.mk 30 include $(TOPDIR)/config.mk
31 31
32 nandobj := $(OBJTREE)/nand_spl/ 32 nandobj := $(OBJTREE)/nand_spl/
33 33
34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds 34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
35 LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst 35 LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
36 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ 36 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
37 $(LDFLAGS) $(LDFLAGS_FINAL) 37 $(LDFLAGS) $(LDFLAGS_FINAL)
38 AFLAGS += -DCONFIG_NAND_SPL 38 AFLAGS += -DCONFIG_NAND_SPL
39 CFLAGS += -DCONFIG_NAND_SPL 39 CFLAGS += -DCONFIG_NAND_SPL
40 40
41 SOBJS = start.o resetvec.o 41 SOBJS = start.o resetvec.o
42 COBJS = cache.o cpu_init_early.o cpu_init_nand.o fsl_law.o law.o \ 42 COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
43 nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o 43 nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
44 44
45 SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) 45 SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c))
46 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) 46 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
47 __OBJS := $(SOBJS) $(COBJS) 47 __OBJS := $(SOBJS) $(COBJS)
48 LNDIR := $(nandobj)board/$(BOARDDIR) 48 LNDIR := $(nandobj)board/$(BOARDDIR)
49 49
50 ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin 50 ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
51 51
52 all: $(obj).depend $(ALL) 52 all: $(obj).depend $(ALL)
53 53
54 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl 54 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
55 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ 55 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
56 56
57 $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl 57 $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl
58 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ 58 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
59 59
60 $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds 60 $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds
61 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ 61 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
62 -Map $(nandobj)u-boot-spl.map \ 62 -Map $(nandobj)u-boot-spl.map \
63 -o $(nandobj)u-boot-spl 63 -o $(nandobj)u-boot-spl
64 64
65 # The following line expands into whole rule which generates $(LSTSCRIPT), 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 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. 67 # $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
68 $(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) 68 $(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
69 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT) 69 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
70 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ 70 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
71 -ansi -D__ASSEMBLY__ -P - <$< >$@ 71 -ansi -D__ASSEMBLY__ -P - <$< >$@
72 72
73 # create symbolic links for common files 73 # create symbolic links for common files
74 74
75 $(obj)cache.c: 75 $(obj)cache.c:
76 @rm -f $(obj)cache.c 76 @rm -f $(obj)cache.c
77 ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c 77 ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c
78 78
79 $(obj)cpu_init_early.c: 79 $(obj)cpu_init_early.c:
80 @rm -f $(obj)cpu_init_early.c 80 @rm -f $(obj)cpu_init_early.c
81 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $(obj)cpu_init_early.c 81 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $(obj)cpu_init_early.c
82 82
83 $(obj)cpu_init_nand.c: 83 $(obj)spl_minimal.c:
84 @rm -f $(obj)cpu_init_nand.c 84 @rm -f $(obj)spl_minimal.c
85 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_nand.c $(obj)cpu_init_nand.c 85 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $(obj)spl_minimal.c
86 86
87 $(obj)fsl_law.c: 87 $(obj)fsl_law.c:
88 @rm -f $(obj)fsl_law.c 88 @rm -f $(obj)fsl_law.c
89 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c 89 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c
90 90
91 $(obj)law.c: 91 $(obj)law.c:
92 @rm -f $(obj)law.c 92 @rm -f $(obj)law.c
93 ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c 93 ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c
94 94
95 $(obj)nand_boot_fsl_elbc.c: 95 $(obj)nand_boot_fsl_elbc.c:
96 @rm -f $(obj)nand_boot_fsl_elbc.c 96 @rm -f $(obj)nand_boot_fsl_elbc.c
97 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \ 97 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \
98 $(obj)nand_boot_fsl_elbc.c 98 $(obj)nand_boot_fsl_elbc.c
99 99
100 $(obj)ns16550.c: 100 $(obj)ns16550.c:
101 @rm -f $(obj)ns16550.c 101 @rm -f $(obj)ns16550.c
102 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c 102 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c
103 103
104 $(obj)resetvec.S: 104 $(obj)resetvec.S:
105 @rm -f $(obj)resetvec.S 105 @rm -f $(obj)resetvec.S
106 ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S 106 ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S
107 107
108 $(obj)fixed_ivor.S: 108 $(obj)fixed_ivor.S:
109 @rm -f $(obj)fixed_ivor.S 109 @rm -f $(obj)fixed_ivor.S
110 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $(obj)fixed_ivor.S 110 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $(obj)fixed_ivor.S
111 111
112 $(obj)start.S: $(obj)fixed_ivor.S 112 $(obj)start.S: $(obj)fixed_ivor.S
113 @rm -f $(obj)start.S 113 @rm -f $(obj)start.S
114 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $(obj)start.S 114 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $(obj)start.S
115 115
116 $(obj)tlb.c: 116 $(obj)tlb.c:
117 @rm -f $(obj)tlb.c 117 @rm -f $(obj)tlb.c
118 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $(obj)tlb.c 118 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $(obj)tlb.c
119 119
120 $(obj)tlb_table.c: 120 $(obj)tlb_table.c:
121 @rm -f $(obj)tlb_table.c 121 @rm -f $(obj)tlb_table.c
122 ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c 122 ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c
123 123
124 ifneq ($(OBJTREE), $(SRCTREE)) 124 ifneq ($(OBJTREE), $(SRCTREE))
125 $(obj)nand_boot.c: 125 $(obj)nand_boot.c:
126 @rm -f $(obj)nand_boot.c 126 @rm -f $(obj)nand_boot.c
127 ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c 127 ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c
128 endif 128 endif
129 129
130 ######################################################################### 130 #########################################################################
131 131
132 $(obj)%.o: $(obj)%.S 132 $(obj)%.o: $(obj)%.S
133 $(CC) $(AFLAGS) -c -o $@ $< 133 $(CC) $(AFLAGS) -c -o $@ $<
134 134
135 $(obj)%.o: $(obj)%.c 135 $(obj)%.o: $(obj)%.c
136 $(CC) $(CFLAGS) -c -o $@ $< 136 $(CC) $(CFLAGS) -c -o $@ $<
137 137
138 # defines $(obj).depend target 138 # defines $(obj).depend target
139 include $(SRCTREE)/rules.mk 139 include $(SRCTREE)/rules.mk
140 140
141 sinclude $(obj).depend 141 sinclude $(obj).depend
142 142
143 ######################################################################### 143 #########################################################################
144 144
nand_spl/board/freescale/mpc8569mds/Makefile
1 # 1 #
2 # (C) Copyright 2007 2 # (C) Copyright 2007
3 # Stefan Roese, DENX Software Engineering, sr@denx.de. 3 # Stefan Roese, DENX Software Engineering, sr@denx.de.
4 # 4 #
5 # Copyright 2009-2011 Freescale Semiconductor, Inc. 5 # Copyright 2009-2011 Freescale Semiconductor, Inc.
6 # 6 #
7 # See file CREDITS for list of people who contributed to this 7 # See file CREDITS for list of people who contributed to this
8 # project. 8 # project.
9 # 9 #
10 # This program is free software; you can redistribute it and/or 10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License as 11 # modify it under the terms of the GNU General Public License as
12 # published by the Free Software Foundation; either version 2 of 12 # published by the Free Software Foundation; either version 2 of
13 # the License, or (at your option) any later version. 13 # the License, or (at your option) any later version.
14 # 14 #
15 # This program is distributed in the hope that it will be useful, 15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details. 18 # GNU General Public License for more details.
19 # 19 #
20 # You should have received a copy of the GNU General Public License 20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software 21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 # MA 02111-1307 USA 23 # MA 02111-1307 USA
24 # 24 #
25 25
26 NAND_SPL := y 26 NAND_SPL := y
27 CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000 27 CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000
28 PAD_TO := 0xfff01000 28 PAD_TO := 0xfff01000
29 29
30 include $(TOPDIR)/config.mk 30 include $(TOPDIR)/config.mk
31 31
32 nandobj := $(OBJTREE)/nand_spl/ 32 nandobj := $(OBJTREE)/nand_spl/
33 33
34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds 34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
35 LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst 35 LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
36 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ 36 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
37 $(LDFLAGS) $(LDFLAGS_FINAL) 37 $(LDFLAGS) $(LDFLAGS_FINAL)
38 AFLAGS += -DCONFIG_NAND_SPL 38 AFLAGS += -DCONFIG_NAND_SPL
39 CFLAGS += -DCONFIG_NAND_SPL 39 CFLAGS += -DCONFIG_NAND_SPL
40 40
41 SOBJS = start.o resetvec.o 41 SOBJS = start.o resetvec.o
42 COBJS = cache.o cpu_init_early.o cpu_init_nand.o fsl_law.o law.o \ 42 COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
43 nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o 43 nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
44 44
45 SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) 45 SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c))
46 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) 46 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
47 __OBJS := $(SOBJS) $(COBJS) 47 __OBJS := $(SOBJS) $(COBJS)
48 LNDIR := $(nandobj)board/$(BOARDDIR) 48 LNDIR := $(nandobj)board/$(BOARDDIR)
49 49
50 ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin 50 ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
51 51
52 all: $(obj).depend $(ALL) 52 all: $(obj).depend $(ALL)
53 53
54 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl 54 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
55 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ 55 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
56 56
57 $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl 57 $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl
58 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ 58 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
59 59
60 $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds 60 $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds
61 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ 61 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
62 -Map $(nandobj)u-boot-spl.map \ 62 -Map $(nandobj)u-boot-spl.map \
63 -o $(nandobj)u-boot-spl 63 -o $(nandobj)u-boot-spl
64 64
65 # The following line expands into whole rule which generates $(LSTSCRIPT), 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 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. 67 # $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
68 $(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) 68 $(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
69 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT) 69 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
70 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ 70 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
71 -ansi -D__ASSEMBLY__ -P - <$< >$@ 71 -ansi -D__ASSEMBLY__ -P - <$< >$@
72 72
73 # create symbolic links for common files 73 # create symbolic links for common files
74 74
75 $(obj)cache.c: 75 $(obj)cache.c:
76 @rm -f $(obj)cache.c 76 @rm -f $(obj)cache.c
77 ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c 77 ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c
78 78
79 $(obj)cpu_init_early.c: 79 $(obj)cpu_init_early.c:
80 @rm -f $(obj)cpu_init_early.c 80 @rm -f $(obj)cpu_init_early.c
81 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $(obj)cpu_init_early.c 81 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $(obj)cpu_init_early.c
82 82
83 $(obj)cpu_init_nand.c: 83 $(obj)spl_minimal.c:
84 @rm -f $(obj)cpu_init_nand.c 84 @rm -f $(obj)spl_minimal.c
85 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_nand.c $(obj)cpu_init_nand.c 85 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $(obj)spl_minimal.c
86 86
87 $(obj)fsl_law.c: 87 $(obj)fsl_law.c:
88 @rm -f $(obj)fsl_law.c 88 @rm -f $(obj)fsl_law.c
89 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c 89 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c
90 90
91 $(obj)law.c: 91 $(obj)law.c:
92 @rm -f $(obj)law.c 92 @rm -f $(obj)law.c
93 ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c 93 ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c
94 94
95 $(obj)nand_boot_fsl_elbc.c: 95 $(obj)nand_boot_fsl_elbc.c:
96 @rm -f $(obj)nand_boot_fsl_elbc.c 96 @rm -f $(obj)nand_boot_fsl_elbc.c
97 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \ 97 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \
98 $(obj)nand_boot_fsl_elbc.c 98 $(obj)nand_boot_fsl_elbc.c
99 99
100 $(obj)ns16550.c: 100 $(obj)ns16550.c:
101 @rm -f $(obj)ns16550.c 101 @rm -f $(obj)ns16550.c
102 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c 102 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c
103 103
104 $(obj)resetvec.S: 104 $(obj)resetvec.S:
105 @rm -f $(obj)resetvec.S 105 @rm -f $(obj)resetvec.S
106 ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S 106 ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S
107 107
108 $(obj)fixed_ivor.S: 108 $(obj)fixed_ivor.S:
109 @rm -f $(obj)fixed_ivor.S 109 @rm -f $(obj)fixed_ivor.S
110 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $(obj)fixed_ivor.S 110 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $(obj)fixed_ivor.S
111 111
112 $(obj)start.S: $(obj)fixed_ivor.S 112 $(obj)start.S: $(obj)fixed_ivor.S
113 @rm -f $(obj)start.S 113 @rm -f $(obj)start.S
114 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $(obj)start.S 114 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $(obj)start.S
115 115
116 $(obj)tlb.c: 116 $(obj)tlb.c:
117 @rm -f $(obj)tlb.c 117 @rm -f $(obj)tlb.c
118 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $(obj)tlb.c 118 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $(obj)tlb.c
119 119
120 $(obj)tlb_table.c: 120 $(obj)tlb_table.c:
121 @rm -f $(obj)tlb_table.c 121 @rm -f $(obj)tlb_table.c
122 ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c 122 ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c
123 123
124 ifneq ($(OBJTREE), $(SRCTREE)) 124 ifneq ($(OBJTREE), $(SRCTREE))
125 $(obj)nand_boot.c: 125 $(obj)nand_boot.c:
126 @rm -f $(obj)nand_boot.c 126 @rm -f $(obj)nand_boot.c
127 ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c 127 ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c
128 endif 128 endif
129 129
130 ######################################################################### 130 #########################################################################
131 131
132 $(obj)%.o: $(obj)%.S 132 $(obj)%.o: $(obj)%.S
133 $(CC) $(AFLAGS) -c -o $@ $< 133 $(CC) $(AFLAGS) -c -o $@ $<
134 134
135 $(obj)%.o: $(obj)%.c 135 $(obj)%.o: $(obj)%.c
136 $(CC) $(CFLAGS) -c -o $@ $< 136 $(CC) $(CFLAGS) -c -o $@ $<
137 137
138 # defines $(obj).depend target 138 # defines $(obj).depend target
139 include $(SRCTREE)/rules.mk 139 include $(SRCTREE)/rules.mk
140 140
141 sinclude $(obj).depend 141 sinclude $(obj).depend
142 142
143 ######################################################################### 143 #########################################################################
144 144
nand_spl/board/freescale/mpc8572ds/Makefile
1 # 1 #
2 # (C) Copyright 2007 2 # (C) Copyright 2007
3 # Stefan Roese, DENX Software Engineering, sr@denx.de. 3 # Stefan Roese, DENX Software Engineering, sr@denx.de.
4 # 4 #
5 # Copyright 2009-2011 Freescale Semiconductor, Inc. 5 # Copyright 2009-2011 Freescale Semiconductor, Inc.
6 # 6 #
7 # See file CREDITS for list of people who contributed to this 7 # See file CREDITS for list of people who contributed to this
8 # project. 8 # project.
9 # 9 #
10 # This program is free software; you can redistribute it and/or 10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License as 11 # modify it under the terms of the GNU General Public License as
12 # published by the Free Software Foundation; either version 2 of 12 # published by the Free Software Foundation; either version 2 of
13 # the License, or (at your option) any later version. 13 # the License, or (at your option) any later version.
14 # 14 #
15 # This program is distributed in the hope that it will be useful, 15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details. 18 # GNU General Public License for more details.
19 # 19 #
20 # You should have received a copy of the GNU General Public License 20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software 21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 # MA 02111-1307 USA 23 # MA 02111-1307 USA
24 # 24 #
25 25
26 NAND_SPL := y 26 NAND_SPL := y
27 CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000 27 CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000
28 PAD_TO := 0xfff01000 28 PAD_TO := 0xfff01000
29 29
30 include $(TOPDIR)/config.mk 30 include $(TOPDIR)/config.mk
31 31
32 nandobj := $(OBJTREE)/nand_spl/ 32 nandobj := $(OBJTREE)/nand_spl/
33 33
34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds 34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
35 LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst 35 LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
36 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ 36 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
37 $(LDFLAGS) $(LDFLAGS_FINAL) 37 $(LDFLAGS) $(LDFLAGS_FINAL)
38 AFLAGS += -DCONFIG_NAND_SPL 38 AFLAGS += -DCONFIG_NAND_SPL
39 CFLAGS += -DCONFIG_NAND_SPL 39 CFLAGS += -DCONFIG_NAND_SPL
40 40
41 SOBJS = start.o resetvec.o 41 SOBJS = start.o resetvec.o
42 COBJS = cache.o cpu_init_early.o cpu_init_nand.o fsl_law.o law.o \ 42 COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
43 nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o 43 nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
44 44
45 SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) 45 SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c))
46 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) 46 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
47 __OBJS := $(SOBJS) $(COBJS) 47 __OBJS := $(SOBJS) $(COBJS)
48 LNDIR := $(nandobj)board/$(BOARDDIR) 48 LNDIR := $(nandobj)board/$(BOARDDIR)
49 49
50 ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin 50 ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
51 51
52 all: $(obj).depend $(ALL) 52 all: $(obj).depend $(ALL)
53 53
54 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl 54 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
55 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ 55 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
56 56
57 $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl 57 $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl
58 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ 58 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
59 59
60 $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds 60 $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds
61 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ 61 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
62 -Map $(nandobj)u-boot-spl.map \ 62 -Map $(nandobj)u-boot-spl.map \
63 -o $(nandobj)u-boot-spl 63 -o $(nandobj)u-boot-spl
64 64
65 # The following line expands into whole rule which generates $(LSTSCRIPT), 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 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. 67 # $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
68 $(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) 68 $(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
69 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT) 69 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
70 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ 70 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
71 -ansi -D__ASSEMBLY__ -P - <$< >$@ 71 -ansi -D__ASSEMBLY__ -P - <$< >$@
72 72
73 # create symbolic links for common files 73 # create symbolic links for common files
74 74
75 $(obj)cache.c: 75 $(obj)cache.c:
76 @rm -f $(obj)cache.c 76 @rm -f $(obj)cache.c
77 ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c 77 ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c
78 78
79 $(obj)cpu_init_early.c: 79 $(obj)cpu_init_early.c:
80 @rm -f $(obj)cpu_init_early.c 80 @rm -f $(obj)cpu_init_early.c
81 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $(obj)cpu_init_early.c 81 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $(obj)cpu_init_early.c
82 82
83 $(obj)cpu_init_nand.c: 83 $(obj)spl_minimal.c:
84 @rm -f $(obj)cpu_init_nand.c 84 @rm -f $(obj)spl_minimal.c
85 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_nand.c $(obj)cpu_init_nand.c 85 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $(obj)spl_minimal.c
86 86
87 $(obj)fsl_law.c: 87 $(obj)fsl_law.c:
88 @rm -f $(obj)fsl_law.c 88 @rm -f $(obj)fsl_law.c
89 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c 89 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c
90 90
91 $(obj)law.c: 91 $(obj)law.c:
92 @rm -f $(obj)law.c 92 @rm -f $(obj)law.c
93 ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c 93 ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c
94 94
95 $(obj)nand_boot_fsl_elbc.c: 95 $(obj)nand_boot_fsl_elbc.c:
96 @rm -f $(obj)nand_boot_fsl_elbc.c 96 @rm -f $(obj)nand_boot_fsl_elbc.c
97 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \ 97 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \
98 $(obj)nand_boot_fsl_elbc.c 98 $(obj)nand_boot_fsl_elbc.c
99 99
100 $(obj)ns16550.c: 100 $(obj)ns16550.c:
101 @rm -f $(obj)ns16550.c 101 @rm -f $(obj)ns16550.c
102 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c 102 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c
103 103
104 $(obj)resetvec.S: 104 $(obj)resetvec.S:
105 @rm -f $(obj)resetvec.S 105 @rm -f $(obj)resetvec.S
106 ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S 106 ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S
107 107
108 $(obj)fixed_ivor.S: 108 $(obj)fixed_ivor.S:
109 @rm -f $(obj)fixed_ivor.S 109 @rm -f $(obj)fixed_ivor.S
110 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $(obj)fixed_ivor.S 110 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $(obj)fixed_ivor.S
111 111
112 $(obj)start.S: $(obj)fixed_ivor.S 112 $(obj)start.S: $(obj)fixed_ivor.S
113 @rm -f $(obj)start.S 113 @rm -f $(obj)start.S
114 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $(obj)start.S 114 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $(obj)start.S
115 115
116 $(obj)tlb.c: 116 $(obj)tlb.c:
117 @rm -f $(obj)tlb.c 117 @rm -f $(obj)tlb.c
118 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $(obj)tlb.c 118 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $(obj)tlb.c
119 119
120 $(obj)tlb_table.c: 120 $(obj)tlb_table.c:
121 @rm -f $(obj)tlb_table.c 121 @rm -f $(obj)tlb_table.c
122 ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c 122 ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c
123 123
124 ifneq ($(OBJTREE), $(SRCTREE)) 124 ifneq ($(OBJTREE), $(SRCTREE))
125 $(obj)nand_boot.c: 125 $(obj)nand_boot.c:
126 @rm -f $(obj)nand_boot.c 126 @rm -f $(obj)nand_boot.c
127 ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c 127 ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c
128 endif 128 endif
129 129
130 ######################################################################### 130 #########################################################################
131 131
132 $(obj)%.o: $(obj)%.S 132 $(obj)%.o: $(obj)%.S
133 $(CC) $(AFLAGS) -c -o $@ $< 133 $(CC) $(AFLAGS) -c -o $@ $<
134 134
135 $(obj)%.o: $(obj)%.c 135 $(obj)%.o: $(obj)%.c
136 $(CC) $(CFLAGS) -c -o $@ $< 136 $(CC) $(CFLAGS) -c -o $@ $<
137 137
138 # defines $(obj).depend target 138 # defines $(obj).depend target
139 include $(SRCTREE)/rules.mk 139 include $(SRCTREE)/rules.mk
140 140
141 sinclude $(obj).depend 141 sinclude $(obj).depend
142 142
143 ######################################################################### 143 #########################################################################
144 144
nand_spl/board/freescale/p1010rdb/Makefile
1 # 1 #
2 # (C) Copyright 2007 2 # (C) Copyright 2007
3 # Stefan Roese, DENX Software Engineering, sr@denx.de. 3 # Stefan Roese, DENX Software Engineering, sr@denx.de.
4 # 4 #
5 # Copyright 2011 Freescale Semiconductor, Inc. 5 # Copyright 2011 Freescale Semiconductor, Inc.
6 # 6 #
7 # See file CREDITS for list of people who contributed to this 7 # See file CREDITS for list of people who contributed to this
8 # project. 8 # project.
9 # 9 #
10 # This program is free software; you can redistribute it and/or 10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License as 11 # modify it under the terms of the GNU General Public License as
12 # published by the Free Software Foundation; either version 2 of 12 # published by the Free Software Foundation; either version 2 of
13 # the License, or (at your option) any later version. 13 # the License, or (at your option) any later version.
14 # 14 #
15 # This program is distributed in the hope that it will be useful, 15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details. 18 # GNU General Public License for more details.
19 # 19 #
20 # You should have received a copy of the GNU General Public License 20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software 21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 # MA 02111-1307 USA 23 # MA 02111-1307 USA
24 # 24 #
25 25
26 NAND_SPL := y 26 NAND_SPL := y
27 CONFIG_SYS_TEXT_BASE_SPL := 0xff800000 27 CONFIG_SYS_TEXT_BASE_SPL := 0xff800000
28 PAD_TO := 0xff802000 28 PAD_TO := 0xff802000
29 29
30 include $(TOPDIR)/config.mk 30 include $(TOPDIR)/config.mk
31 31
32 nandobj := $(OBJTREE)/nand_spl/ 32 nandobj := $(OBJTREE)/nand_spl/
33 33
34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds 34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
35 LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst 35 LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
36 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) $(LDFLAGS) \ 36 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) $(LDFLAGS) \
37 $(LDFLAGS_FINAL) 37 $(LDFLAGS_FINAL)
38 AFLAGS += -DCONFIG_NAND_SPL 38 AFLAGS += -DCONFIG_NAND_SPL
39 CFLAGS += -DCONFIG_NAND_SPL 39 CFLAGS += -DCONFIG_NAND_SPL
40 40
41 SOBJS = start.o resetvec.o ticks.o 41 SOBJS = start.o resetvec.o ticks.o
42 COBJS = cache.o cpu_init_early.o cpu_init_nand.o fsl_law.o law.o \ 42 COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
43 nand_boot.o nand_boot_fsl_ifc.o ns16550.o tlb.o tlb_table.o 43 nand_boot.o nand_boot_fsl_ifc.o ns16550.o tlb.o tlb_table.o
44 44
45 SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) 45 SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c))
46 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) 46 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
47 __OBJS := $(SOBJS) $(COBJS) 47 __OBJS := $(SOBJS) $(COBJS)
48 LNDIR := $(nandobj)board/$(BOARDDIR) 48 LNDIR := $(nandobj)board/$(BOARDDIR)
49 49
50 ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin 50 ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
51 51
52 all: $(obj).depend $(ALL) 52 all: $(obj).depend $(ALL)
53 53
54 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl 54 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
55 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ 55 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
56 56
57 $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl 57 $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl
58 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ 58 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
59 59
60 $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds 60 $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds
61 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ 61 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
62 -Map $(nandobj)u-boot-spl.map \ 62 -Map $(nandobj)u-boot-spl.map \
63 -o $(nandobj)u-boot-spl 63 -o $(nandobj)u-boot-spl
64 64
65 # The following line expands into whole rule which generates $(LSTSCRIPT), 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 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. 67 # $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
68 $(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) 68 $(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
69 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT) 69 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
70 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)board/$(BOARDDIR) \ 70 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)board/$(BOARDDIR) \
71 -ansi -D__ASSEMBLY__ -P - <$< >$@ 71 -ansi -D__ASSEMBLY__ -P - <$< >$@
72 72
73 # create symbolic links for common files 73 # create symbolic links for common files
74 74
75 $(obj)cache.c: 75 $(obj)cache.c:
76 @rm -f $(obj)cache.c 76 @rm -f $(obj)cache.c
77 ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c 77 ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c
78 78
79 $(obj)cpu_init_early.c: 79 $(obj)cpu_init_early.c:
80 @rm -f $(obj)cpu_init_early.c 80 @rm -f $(obj)cpu_init_early.c
81 ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_early.c $(obj)cpu_init_early.c 81 ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_early.c $(obj)cpu_init_early.c
82 82
83 $(obj)cpu_init_nand.c: 83 $(obj)spl_minimal.c:
84 @rm -f $(obj)cpu_init_nand.c 84 @rm -f $(obj)spl_minimal.c
85 ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_nand.c $(obj)cpu_init_nand.c 85 ln -sf $(SRCTREE)/$(CPUDIR)/spl_minimal.c $(obj)spl_minimal.c
86 86
87 $(obj)fsl_law.c: 87 $(obj)fsl_law.c:
88 @rm -f $(obj)fsl_law.c 88 @rm -f $(obj)fsl_law.c
89 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c 89 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c
90 90
91 $(obj)law.c: 91 $(obj)law.c:
92 @rm -f $(obj)law.c 92 @rm -f $(obj)law.c
93 ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c 93 ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c
94 94
95 $(obj)nand_boot_fsl_ifc.c: 95 $(obj)nand_boot_fsl_ifc.c:
96 @rm -f $(obj)nand_boot_fsl_ifc.c 96 @rm -f $(obj)nand_boot_fsl_ifc.c
97 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_ifc.c \ 97 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_ifc.c \
98 $(obj)nand_boot_fsl_ifc.c 98 $(obj)nand_boot_fsl_ifc.c
99 99
100 $(obj)ns16550.c: 100 $(obj)ns16550.c:
101 @rm -f $(obj)ns16550.c 101 @rm -f $(obj)ns16550.c
102 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c 102 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c
103 103
104 $(obj)resetvec.S: 104 $(obj)resetvec.S:
105 @rm -f $(obj)resetvec.S 105 @rm -f $(obj)resetvec.S
106 ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S 106 ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S
107 107
108 $(obj)fixed_ivor.S: 108 $(obj)fixed_ivor.S:
109 @rm -f $(obj)fixed_ivor.S 109 @rm -f $(obj)fixed_ivor.S
110 ln -sf $(SRCTREE)/$(CPUDIR)/fixed_ivor.S $(obj)fixed_ivor.S 110 ln -sf $(SRCTREE)/$(CPUDIR)/fixed_ivor.S $(obj)fixed_ivor.S
111 111
112 $(obj)start.S: $(obj)fixed_ivor.S 112 $(obj)start.S: $(obj)fixed_ivor.S
113 @rm -f $(obj)start.S 113 @rm -f $(obj)start.S
114 ln -sf $(SRCTREE)/$(CPUDIR)/start.S $(obj)start.S 114 ln -sf $(SRCTREE)/$(CPUDIR)/start.S $(obj)start.S
115 115
116 $(obj)ticks.S: 116 $(obj)ticks.S:
117 @rm -f $(obj)ticks.S 117 @rm -f $(obj)ticks.S
118 ln -sf $(SRCTREE)/arch/powerpc/lib/ticks.S $(obj)ticks.S 118 ln -sf $(SRCTREE)/arch/powerpc/lib/ticks.S $(obj)ticks.S
119 119
120 $(obj)tlb.c: 120 $(obj)tlb.c:
121 @rm -f $(obj)tlb.c 121 @rm -f $(obj)tlb.c
122 ln -sf $(SRCTREE)/$(CPUDIR)/tlb.c $(obj)tlb.c 122 ln -sf $(SRCTREE)/$(CPUDIR)/tlb.c $(obj)tlb.c
123 123
124 $(obj)tlb_table.c: 124 $(obj)tlb_table.c:
125 @rm -f $(obj)tlb_table.c 125 @rm -f $(obj)tlb_table.c
126 ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c 126 ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c
127 127
128 ifneq ($(OBJTREE), $(SRCTREE)) 128 ifneq ($(OBJTREE), $(SRCTREE))
129 $(obj)nand_boot.c: 129 $(obj)nand_boot.c:
130 @rm -f $(obj)nand_boot.c 130 @rm -f $(obj)nand_boot.c
131 ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c 131 ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c
132 endif 132 endif
133 133
134 ######################################################################### 134 #########################################################################
135 135
136 $(obj)%.o: $(obj)%.S 136 $(obj)%.o: $(obj)%.S
137 $(CC) $(AFLAGS) -c -o $@ $< 137 $(CC) $(AFLAGS) -c -o $@ $<
138 138
139 $(obj)%.o: $(obj)%.c 139 $(obj)%.o: $(obj)%.c
140 $(CC) $(CFLAGS) -c -o $@ $< 140 $(CC) $(CFLAGS) -c -o $@ $<
141 141
142 # defines $(obj).depend target 142 # defines $(obj).depend target
143 include $(SRCTREE)/rules.mk 143 include $(SRCTREE)/rules.mk
144 144
145 sinclude $(obj).depend 145 sinclude $(obj).depend
146 146
147 ######################################################################### 147 #########################################################################
148 148
nand_spl/board/freescale/p1023rds/Makefile
1 # 1 #
2 # Copyright 2010-2011 Freescale Semiconductor, Inc. 2 # Copyright 2010-2011 Freescale Semiconductor, Inc.
3 # 3 #
4 # See file CREDITS for list of people who contributed to this 4 # See file CREDITS for list of people who contributed to this
5 # project. 5 # project.
6 # 6 #
7 # This program is free software; you can redistribute it and/or 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 8 # modify it under the terms of the GNU General Public License as
9 # published by the Free Software Foundation; either version 2 of 9 # published by the Free Software Foundation; either version 2 of
10 # the License, or (at your option) any later version. 10 # the License, or (at your option) any later version.
11 # 11 #
12 # This program is distributed in the hope that it will be useful, 12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details. 15 # GNU General Public License for more details.
16 # 16 #
17 # You should have received a copy of the GNU General Public License 17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software 18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 # MA 02111-1307 USA 20 # MA 02111-1307 USA
21 # 21 #
22 NAND_SPL := y 22 NAND_SPL := y
23 PAD_TO := 0xfff01000 23 PAD_TO := 0xfff01000
24 24
25 include $(TOPDIR)/config.mk 25 include $(TOPDIR)/config.mk
26 26
27 nandobj := $(OBJTREE)/nand_spl/ 27 nandobj := $(OBJTREE)/nand_spl/
28 28
29 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds 29 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
30 LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst 30 LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
31 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ 31 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
32 $(LDFLAGS) $(LDFLAGS_FINAL) 32 $(LDFLAGS) $(LDFLAGS_FINAL)
33 AFLAGS += -DCONFIG_NAND_SPL 33 AFLAGS += -DCONFIG_NAND_SPL
34 CFLAGS += -DCONFIG_NAND_SPL 34 CFLAGS += -DCONFIG_NAND_SPL
35 35
36 SOBJS = start.o resetvec.o 36 SOBJS = start.o resetvec.o
37 COBJS = cache.o cpu_init_early.o cpu_init_nand.o fsl_law.o law.o \ 37 COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
38 nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o 38 nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
39 39
40 SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) 40 SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c))
41 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) 41 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
42 __OBJS := $(SOBJS) $(COBJS) 42 __OBJS := $(SOBJS) $(COBJS)
43 LNDIR := $(nandobj)board/$(BOARDDIR) 43 LNDIR := $(nandobj)board/$(BOARDDIR)
44 44
45 ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin 45 ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
46 46
47 all: $(obj).depend $(ALL) 47 all: $(obj).depend $(ALL)
48 48
49 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl 49 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
50 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ 50 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
51 51
52 $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl 52 $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl
53 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ 53 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
54 54
55 $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds 55 $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds
56 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ 56 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
57 -Map $(nandobj)u-boot-spl.map \ 57 -Map $(nandobj)u-boot-spl.map \
58 -o $(nandobj)u-boot-spl 58 -o $(nandobj)u-boot-spl
59 59
60 # The following line expands into whole rule which generates $(LSTSCRIPT), 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 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. 62 # $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
63 $(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) 63 $(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
64 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT) 64 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
65 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ 65 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
66 -ansi -D__ASSEMBLY__ -P - <$< >$@ 66 -ansi -D__ASSEMBLY__ -P - <$< >$@
67 67
68 # create symbolic links for common files 68 # create symbolic links for common files
69 69
70 $(obj)cache.c: 70 $(obj)cache.c:
71 @rm -f $(obj)cache.c 71 @rm -f $(obj)cache.c
72 ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c 72 ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c
73 73
74 $(obj)cpu_init_early.c: 74 $(obj)cpu_init_early.c:
75 @rm -f $(obj)cpu_init_early.c 75 @rm -f $(obj)cpu_init_early.c
76 ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_early.c $(obj)cpu_init_early.c 76 ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_early.c $(obj)cpu_init_early.c
77 77
78 $(obj)cpu_init_nand.c: 78 $(obj)spl_minimal.c:
79 @rm -f $(obj)cpu_init_nand.c 79 @rm -f $(obj)spl_minimal.c
80 ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_nand.c $(obj)cpu_init_nand.c 80 ln -sf $(SRCTREE)/$(CPUDIR)/spl_minimal.c $(obj)spl_minimal.c
81 81
82 $(obj)fsl_law.c: 82 $(obj)fsl_law.c:
83 @rm -f $(obj)fsl_law.c 83 @rm -f $(obj)fsl_law.c
84 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c 84 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c
85 85
86 $(obj)law.c: 86 $(obj)law.c:
87 @rm -f $(obj)law.c 87 @rm -f $(obj)law.c
88 ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c 88 ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c
89 89
90 $(obj)nand_boot_fsl_elbc.c: 90 $(obj)nand_boot_fsl_elbc.c:
91 @rm -f $(obj)nand_boot_fsl_elbc.c 91 @rm -f $(obj)nand_boot_fsl_elbc.c
92 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \ 92 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \
93 $(obj)nand_boot_fsl_elbc.c 93 $(obj)nand_boot_fsl_elbc.c
94 94
95 $(obj)ns16550.c: 95 $(obj)ns16550.c:
96 @rm -f $(obj)ns16550.c 96 @rm -f $(obj)ns16550.c
97 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c 97 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c
98 98
99 $(obj)resetvec.S: 99 $(obj)resetvec.S:
100 @rm -f $(obj)resetvec.S 100 @rm -f $(obj)resetvec.S
101 ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S 101 ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S
102 102
103 $(obj)fixed_ivor.S: 103 $(obj)fixed_ivor.S:
104 @rm -f $(obj)fixed_ivor.S 104 @rm -f $(obj)fixed_ivor.S
105 ln -sf $(SRCTREE)/$(CPUDIR)/fixed_ivor.S $(obj)fixed_ivor.S 105 ln -sf $(SRCTREE)/$(CPUDIR)/fixed_ivor.S $(obj)fixed_ivor.S
106 106
107 $(obj)start.S: $(obj)fixed_ivor.S 107 $(obj)start.S: $(obj)fixed_ivor.S
108 @rm -f $(obj)start.S 108 @rm -f $(obj)start.S
109 ln -sf $(SRCTREE)/$(CPUDIR)/start.S $(obj)start.S 109 ln -sf $(SRCTREE)/$(CPUDIR)/start.S $(obj)start.S
110 110
111 $(obj)tlb.c: 111 $(obj)tlb.c:
112 @rm -f $(obj)tlb.c 112 @rm -f $(obj)tlb.c
113 ln -sf $(SRCTREE)/$(CPUDIR)/tlb.c $(obj)tlb.c 113 ln -sf $(SRCTREE)/$(CPUDIR)/tlb.c $(obj)tlb.c
114 114
115 $(obj)tlb_table.c: 115 $(obj)tlb_table.c:
116 @rm -f $(obj)tlb_table.c 116 @rm -f $(obj)tlb_table.c
117 ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c 117 ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c
118 118
119 ifneq ($(OBJTREE), $(SRCTREE)) 119 ifneq ($(OBJTREE), $(SRCTREE))
120 $(obj)nand_boot.c: 120 $(obj)nand_boot.c:
121 @rm -f $(obj)nand_boot.c 121 @rm -f $(obj)nand_boot.c
122 ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c 122 ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c
123 endif 123 endif
124 124
125 ######################################################################### 125 #########################################################################
126 126
127 $(obj)%.o: $(obj)%.S 127 $(obj)%.o: $(obj)%.S
128 $(CC) $(AFLAGS) -c -o $@ $< 128 $(CC) $(AFLAGS) -c -o $@ $<
129 129
130 $(obj)%.o: $(obj)%.c 130 $(obj)%.o: $(obj)%.c
131 $(CC) $(CFLAGS) -c -o $@ $< 131 $(CC) $(CFLAGS) -c -o $@ $<
132 132
133 # defines $(obj).depend target 133 # defines $(obj).depend target
134 include $(SRCTREE)/rules.mk 134 include $(SRCTREE)/rules.mk
135 135
136 sinclude $(obj).depend 136 sinclude $(obj).depend
137 137
138 ######################################################################### 138 #########################################################################
139 139
nand_spl/board/freescale/p1_p2_rdb/Makefile
1 # 1 #
2 # (C) Copyright 2007 2 # (C) Copyright 2007
3 # Stefan Roese, DENX Software Engineering, sr@denx.de. 3 # Stefan Roese, DENX Software Engineering, sr@denx.de.
4 # 4 #
5 # Copyright 2009-2011 Freescale Semiconductor, Inc. 5 # Copyright 2009-2011 Freescale Semiconductor, Inc.
6 # 6 #
7 # See file CREDITS for list of people who contributed to this 7 # See file CREDITS for list of people who contributed to this
8 # project. 8 # project.
9 # 9 #
10 # This program is free software; you can redistribute it and/or 10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License as 11 # modify it under the terms of the GNU General Public License as
12 # published by the Free Software Foundation; either version 2 of 12 # published by the Free Software Foundation; either version 2 of
13 # the License, or (at your option) any later version. 13 # the License, or (at your option) any later version.
14 # 14 #
15 # This program is distributed in the hope that it will be useful, 15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details. 18 # GNU General Public License for more details.
19 # 19 #
20 # You should have received a copy of the GNU General Public License 20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software 21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 # MA 02111-1307 USA 23 # MA 02111-1307 USA
24 # 24 #
25 25
26 NAND_SPL := y 26 NAND_SPL := y
27 CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000 27 CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000
28 PAD_TO := 0xfff01000 28 PAD_TO := 0xfff01000
29 29
30 include $(TOPDIR)/config.mk 30 include $(TOPDIR)/config.mk
31 31
32 nandobj := $(OBJTREE)/nand_spl/ 32 nandobj := $(OBJTREE)/nand_spl/
33 33
34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds 34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
35 LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst 35 LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
36 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ 36 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
37 $(LDFLAGS) $(LDFLAGS_FINAL) 37 $(LDFLAGS) $(LDFLAGS_FINAL)
38 AFLAGS += -DCONFIG_NAND_SPL 38 AFLAGS += -DCONFIG_NAND_SPL
39 CFLAGS += -DCONFIG_NAND_SPL 39 CFLAGS += -DCONFIG_NAND_SPL
40 40
41 SOBJS = start.o resetvec.o 41 SOBJS = start.o resetvec.o
42 COBJS = cache.o cpu_init_early.o cpu_init_nand.o fsl_law.o law.o \ 42 COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
43 nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o 43 nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
44 44
45 SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) 45 SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c))
46 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) 46 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
47 __OBJS := $(SOBJS) $(COBJS) 47 __OBJS := $(SOBJS) $(COBJS)
48 LNDIR := $(nandobj)board/$(BOARDDIR) 48 LNDIR := $(nandobj)board/$(BOARDDIR)
49 49
50 ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin 50 ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
51 51
52 all: $(obj).depend $(ALL) 52 all: $(obj).depend $(ALL)
53 53
54 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl 54 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
55 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ 55 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
56 56
57 $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl 57 $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl
58 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ 58 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
59 59
60 $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds 60 $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds
61 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ 61 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
62 -Map $(nandobj)u-boot-spl.map \ 62 -Map $(nandobj)u-boot-spl.map \
63 -o $(nandobj)u-boot-spl 63 -o $(nandobj)u-boot-spl
64 64
65 # The following line expands into whole rule which generates $(LSTSCRIPT), 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 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. 67 # $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
68 $(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) 68 $(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
69 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT) 69 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
70 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ 70 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
71 -ansi -D__ASSEMBLY__ -P - <$< >$@ 71 -ansi -D__ASSEMBLY__ -P - <$< >$@
72 72
73 # create symbolic links for common files 73 # create symbolic links for common files
74 74
75 $(obj)cache.c: 75 $(obj)cache.c:
76 @rm -f $(obj)cache.c 76 @rm -f $(obj)cache.c
77 ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c 77 ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c
78 78
79 $(obj)cpu_init_early.c: 79 $(obj)cpu_init_early.c:
80 @rm -f $(obj)cpu_init_early.c 80 @rm -f $(obj)cpu_init_early.c
81 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $(obj)cpu_init_early.c 81 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $(obj)cpu_init_early.c
82 82
83 $(obj)cpu_init_nand.c: 83 $(obj)spl_minimal.c:
84 @rm -f $(obj)cpu_init_nand.c 84 @rm -f $(obj)spl_minimal.c
85 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_nand.c $(obj)cpu_init_nand.c 85 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $(obj)spl_minimal.c
86 86
87 $(obj)fsl_law.c: 87 $(obj)fsl_law.c:
88 @rm -f $(obj)fsl_law.c 88 @rm -f $(obj)fsl_law.c
89 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c 89 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c
90 90
91 $(obj)law.c: 91 $(obj)law.c:
92 @rm -f $(obj)law.c 92 @rm -f $(obj)law.c
93 ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c 93 ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c
94 94
95 $(obj)nand_boot_fsl_elbc.c: 95 $(obj)nand_boot_fsl_elbc.c:
96 @rm -f $(obj)nand_boot_fsl_elbc.c 96 @rm -f $(obj)nand_boot_fsl_elbc.c
97 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \ 97 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \
98 $(obj)nand_boot_fsl_elbc.c 98 $(obj)nand_boot_fsl_elbc.c
99 99
100 $(obj)ns16550.c: 100 $(obj)ns16550.c:
101 @rm -f $(obj)ns16550.c 101 @rm -f $(obj)ns16550.c
102 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c 102 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c
103 103
104 $(obj)resetvec.S: 104 $(obj)resetvec.S:
105 @rm -f $(obj)resetvec.S 105 @rm -f $(obj)resetvec.S
106 ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S 106 ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S
107 107
108 $(obj)fixed_ivor.S: 108 $(obj)fixed_ivor.S:
109 @rm -f $(obj)fixed_ivor.S 109 @rm -f $(obj)fixed_ivor.S
110 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $(obj)fixed_ivor.S 110 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $(obj)fixed_ivor.S
111 111
112 $(obj)start.S: $(obj)fixed_ivor.S 112 $(obj)start.S: $(obj)fixed_ivor.S
113 @rm -f $(obj)start.S 113 @rm -f $(obj)start.S
114 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $(obj)start.S 114 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $(obj)start.S
115 115
116 $(obj)tlb.c: 116 $(obj)tlb.c:
117 @rm -f $(obj)tlb.c 117 @rm -f $(obj)tlb.c
118 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $(obj)tlb.c 118 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $(obj)tlb.c
119 119
120 $(obj)tlb_table.c: 120 $(obj)tlb_table.c:
121 @rm -f $(obj)tlb_table.c 121 @rm -f $(obj)tlb_table.c
122 ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c 122 ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c
123 123
124 ifneq ($(OBJTREE), $(SRCTREE)) 124 ifneq ($(OBJTREE), $(SRCTREE))
125 $(obj)nand_boot.c: 125 $(obj)nand_boot.c:
126 @rm -f $(obj)nand_boot.c 126 @rm -f $(obj)nand_boot.c
127 ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c 127 ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c
128 endif 128 endif
129 129
130 ######################################################################### 130 #########################################################################
131 131
132 $(obj)%.o: $(obj)%.S 132 $(obj)%.o: $(obj)%.S
133 $(CC) $(AFLAGS) -c -o $@ $< 133 $(CC) $(AFLAGS) -c -o $@ $<
134 134
135 $(obj)%.o: $(obj)%.c 135 $(obj)%.o: $(obj)%.c
136 $(CC) $(CFLAGS) -c -o $@ $< 136 $(CC) $(CFLAGS) -c -o $@ $<
137 137
138 # defines $(obj).depend target 138 # defines $(obj).depend target
139 include $(SRCTREE)/rules.mk 139 include $(SRCTREE)/rules.mk
140 140
141 sinclude $(obj).depend 141 sinclude $(obj).depend
142 142
143 ######################################################################### 143 #########################################################################
144 144
nand_spl/board/freescale/p1_p2_rdb_pc/Makefile
1 # 1 #
2 # (C) Copyright 2007 2 # (C) Copyright 2007
3 # Stefan Roese, DENX Software Engineering, sr@denx.de. 3 # Stefan Roese, DENX Software Engineering, sr@denx.de.
4 # 4 #
5 # Copyright 2011 Freescale Semiconductor, Inc. 5 # Copyright 2011 Freescale Semiconductor, Inc.
6 # 6 #
7 # See file CREDITS for list of people who contributed to this 7 # See file CREDITS for list of people who contributed to this
8 # project. 8 # project.
9 # 9 #
10 # This program is free software; you can redistribute it and/or 10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License as 11 # modify it under the terms of the GNU General Public License as
12 # published by the Free Software Foundation; either version 2 of 12 # published by the Free Software Foundation; either version 2 of
13 # the License, or (at your option) any later version. 13 # the License, or (at your option) any later version.
14 # 14 #
15 # This program is distributed in the hope that it will be useful, 15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details. 18 # GNU General Public License for more details.
19 # 19 #
20 # You should have received a copy of the GNU General Public License 20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software 21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 # MA 02111-1307 USA 23 # MA 02111-1307 USA
24 # 24 #
25 25
26 NAND_SPL := y 26 NAND_SPL := y
27 CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000 27 CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000
28 PAD_TO := 0xff801000 28 PAD_TO := 0xff801000
29 29
30 include $(TOPDIR)/config.mk 30 include $(TOPDIR)/config.mk
31 31
32 nandobj := $(OBJTREE)/nand_spl/ 32 nandobj := $(OBJTREE)/nand_spl/
33 33
34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds 34 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
35 LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst 35 LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
36 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ 36 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
37 $(LDFLAGS) $(LDFLAGS_FINAL) 37 $(LDFLAGS) $(LDFLAGS_FINAL)
38 AFLAGS += -DCONFIG_NAND_SPL 38 AFLAGS += -DCONFIG_NAND_SPL
39 CFLAGS += -DCONFIG_NAND_SPL 39 CFLAGS += -DCONFIG_NAND_SPL
40 40
41 SOBJS = start.o resetvec.o 41 SOBJS = start.o resetvec.o
42 COBJS = cache.o cpu_init_early.o cpu_init_nand.o fsl_law.o law.o \ 42 COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \
43 nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o 43 nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o
44 44
45 SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) 45 SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c))
46 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) 46 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
47 __OBJS := $(SOBJS) $(COBJS) 47 __OBJS := $(SOBJS) $(COBJS)
48 LNDIR := $(nandobj)board/$(BOARDDIR) 48 LNDIR := $(nandobj)board/$(BOARDDIR)
49 49
50 ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin 50 ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
51 51
52 all: $(obj).depend $(ALL) 52 all: $(obj).depend $(ALL)
53 53
54 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl 54 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
55 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ 55 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
56 56
57 $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl 57 $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl
58 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ 58 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
59 59
60 $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds 60 $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds
61 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ 61 cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
62 -Map $(nandobj)u-boot-spl.map \ 62 -Map $(nandobj)u-boot-spl.map \
63 -o $(nandobj)u-boot-spl 63 -o $(nandobj)u-boot-spl
64 64
65 # The following line expands into whole rule which generates $(LSTSCRIPT), 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 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. 67 # $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
68 $(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) 68 $(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
69 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT) 69 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
70 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj) -ansi -D__ASSEMBLY__ -P - <$< >$@ 70 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj) -ansi -D__ASSEMBLY__ -P - <$< >$@
71 71
72 # create symbolic links for common files 72 # create symbolic links for common files
73 73
74 $(obj)cache.c: 74 $(obj)cache.c:
75 @rm -f $(obj)cache.c 75 @rm -f $(obj)cache.c
76 ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c 76 ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c
77 77
78 $(obj)cpu_init_early.c: 78 $(obj)cpu_init_early.c:
79 @rm -f $(obj)cpu_init_early.c 79 @rm -f $(obj)cpu_init_early.c
80 ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_early.c $(obj)cpu_init_early.c 80 ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_early.c $(obj)cpu_init_early.c
81 81
82 $(obj)cpu_init_nand.c: 82 $(obj)spl_minimal.c:
83 @rm -f $(obj)cpu_init_nand.c 83 @rm -f $(obj)spl_minimal.c
84 ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_nand.c $(obj)cpu_init_nand.c 84 ln -sf $(SRCTREE)/$(CPUDIR)/spl_minimal.c $(obj)spl_minimal.c
85 85
86 $(obj)fsl_law.c: 86 $(obj)fsl_law.c:
87 @rm -f $(obj)fsl_law.c 87 @rm -f $(obj)fsl_law.c
88 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c 88 ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c
89 89
90 $(obj)law.c: 90 $(obj)law.c:
91 @rm -f $(obj)law.c 91 @rm -f $(obj)law.c
92 ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c 92 ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c
93 93
94 $(obj)nand_boot_fsl_elbc.c: 94 $(obj)nand_boot_fsl_elbc.c:
95 @rm -f $(obj)nand_boot_fsl_elbc.c 95 @rm -f $(obj)nand_boot_fsl_elbc.c
96 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \ 96 ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \
97 $(obj)nand_boot_fsl_elbc.c 97 $(obj)nand_boot_fsl_elbc.c
98 98
99 $(obj)ns16550.c: 99 $(obj)ns16550.c:
100 @rm -f $(obj)ns16550.c 100 @rm -f $(obj)ns16550.c
101 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c 101 ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c
102 102
103 $(obj)resetvec.S: 103 $(obj)resetvec.S:
104 @rm -f $(obj)resetvec.S 104 @rm -f $(obj)resetvec.S
105 ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S 105 ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S
106 106
107 $(obj)fixed_ivor.S: 107 $(obj)fixed_ivor.S:
108 @rm -f $(obj)fixed_ivor.S 108 @rm -f $(obj)fixed_ivor.S
109 ln -sf $(SRCTREE)/$(CPUDIR)/fixed_ivor.S $(obj)fixed_ivor.S 109 ln -sf $(SRCTREE)/$(CPUDIR)/fixed_ivor.S $(obj)fixed_ivor.S
110 110
111 $(obj)start.S: $(obj)fixed_ivor.S 111 $(obj)start.S: $(obj)fixed_ivor.S
112 @rm -f $(obj)start.S 112 @rm -f $(obj)start.S
113 ln -sf $(SRCTREE)/$(CPUDIR)/start.S $(obj)start.S 113 ln -sf $(SRCTREE)/$(CPUDIR)/start.S $(obj)start.S
114 114
115 $(obj)tlb.c: 115 $(obj)tlb.c:
116 @rm -f $(obj)tlb.c 116 @rm -f $(obj)tlb.c
117 ln -sf $(SRCTREE)/$(CPUDIR)/tlb.c $(obj)tlb.c 117 ln -sf $(SRCTREE)/$(CPUDIR)/tlb.c $(obj)tlb.c
118 118
119 $(obj)tlb_table.c: 119 $(obj)tlb_table.c:
120 @rm -f $(obj)tlb_table.c 120 @rm -f $(obj)tlb_table.c
121 ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c 121 ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c
122 122
123 ifneq ($(OBJTREE), $(SRCTREE)) 123 ifneq ($(OBJTREE), $(SRCTREE))
124 $(obj)nand_boot.c: 124 $(obj)nand_boot.c:
125 @rm -f $(obj)nand_boot.c 125 @rm -f $(obj)nand_boot.c
126 ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c 126 ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c
127 endif 127 endif
128 128
129 ######################################################################### 129 #########################################################################
130 130
131 $(obj)%.o: $(obj)%.S 131 $(obj)%.o: $(obj)%.S
132 $(CC) $(AFLAGS) -c -o $@ $< 132 $(CC) $(AFLAGS) -c -o $@ $<
133 133
134 $(obj)%.o: $(obj)%.c 134 $(obj)%.o: $(obj)%.c
135 $(CC) $(CFLAGS) -c -o $@ $< 135 $(CC) $(CFLAGS) -c -o $@ $<
136 136
137 # defines $(obj).depend target 137 # defines $(obj).depend target
138 include $(SRCTREE)/rules.mk 138 include $(SRCTREE)/rules.mk
139 139
140 sinclude $(obj).depend 140 sinclude $(obj).depend
141 141
142 ######################################################################### 142 #########################################################################
143 143