]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - nand_spl/board/amcc/bamboo/Makefile
net/phy: Correct AR8021 phy_mask
[karo-tx-uboot.git] / nand_spl / board / amcc / bamboo / Makefile
1 #
2 # (C) Copyright 2007
3 # Stefan Roese, DENX Software Engineering, sr@denx.de.
4 #
5 # SPDX-License-Identifier:      GPL-2.0+
6 #
7
8 include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk
9
10 nandobj := $(OBJTREE)/nand_spl/
11
12 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
13 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
14            $(LDFLAGS_FINAL)
15 asflags-y += -DCONFIG_NAND_SPL
16 ccflags-y += -DCONFIG_NAND_SPL
17
18 SOBJS   = start.o init.o resetvec.o
19 COBJS   = nand_boot.o nand_ecc.o ndfc.o sdram.o
20
21 OBJS    := $(addprefix $(obj)/,$(SOBJS) $(COBJS))
22 __OBJS  := $(SOBJS) $(COBJS)
23 LNDIR   := $(nandobj)board/$(BOARDDIR)
24
25 targets += $(__OBJS)
26
27 all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
28
29 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
30         $(OBJCOPY) $(OBJCOPYFLAGS) --pad-to=$(PAD_TO) -O binary $< $@
31
32 $(nandobj)u-boot-spl.bin:       $(nandobj)u-boot-spl
33         $(OBJCOPY) $(OBJCOPYFLAGS) -O binary $< $@
34
35 $(nandobj)u-boot-spl:   $(OBJS) $(nandobj)u-boot.lds
36         cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
37                 -Map $(nandobj)u-boot-spl.map -o $@
38
39 $(nandobj)u-boot.lds: $(LDSCRIPT)
40         $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
41
42 # create symbolic links for common files
43
44 # from cpu directory
45 $(obj)/ndfc.c:
46         @rm -f $@
47         ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@
48
49 $(obj)/resetvec.S:
50         @rm -f $@
51         ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@
52
53 $(obj)/start.S:
54         @rm -f $@
55         ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@
56
57 # from board directory
58 $(obj)/init.S:
59         @rm -f $@
60         ln -s $(SRCTREE)/board/amcc/bamboo/init.S $@
61
62 # from nand_spl directory
63 $(obj)/nand_boot.c:
64         @rm -f $@
65         ln -s $(SRCTREE)/nand_spl/nand_boot.c $@
66
67 # from drivers/mtd/nand directory
68 $(obj)/nand_ecc.c:
69         @rm -f $@
70         ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@