Magnus Lilja | 24f8b41 | 2009-07-04 10:31:24 +0200 | [diff] [blame] | 1 | CONFIG_NAND_SPL = y |
| 2 | |
| 3 | include $(TOPDIR)/config.mk |
| 4 | include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk |
| 5 | |
| 6 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds |
Haiying Wang | 3935873 | 2011-02-22 16:38:05 -0500 | [diff] [blame] | 7 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ |
| 8 | $(LDFLAGS_FINAL) |
Magnus Lilja | 24f8b41 | 2009-07-04 10:31:24 +0200 | [diff] [blame] | 9 | AFLAGS += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL |
| 10 | CFLAGS += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL |
| 11 | |
| 12 | SOBJS = start.o lowlevel_init.o |
| 13 | COBJS = nand_boot_fsl_nfc.o |
| 14 | |
| 15 | SRCS := $(SRCTREE)/nand_spl/nand_boot_fsl_nfc.c |
Peter Tyser | f7c6737 | 2010-04-12 22:28:11 -0500 | [diff] [blame] | 16 | SRCS += $(SRCTREE)/arch/arm/cpu/arm1136/start.S |
Magnus Lilja | 24f8b41 | 2009-07-04 10:31:24 +0200 | [diff] [blame] | 17 | SRCS += $(SRCTREE)/board/freescale/mx31pdk/lowlevel_init.S |
| 18 | OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) |
| 19 | __OBJS := $(SOBJS) $(COBJS) |
| 20 | LNDIR := $(OBJTREE)/nand_spl/board/$(BOARDDIR) |
| 21 | |
| 22 | nandobj := $(OBJTREE)/nand_spl/ |
| 23 | |
| 24 | ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin |
| 25 | |
| 26 | all: $(obj).depend $(ALL) |
| 27 | |
| 28 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl |
| 29 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ |
| 30 | |
| 31 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl |
| 32 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
| 33 | |
Wolfgang Denk | 18d46c0 | 2009-08-17 14:00:53 +0200 | [diff] [blame] | 34 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds |
Magnus Lilja | 24f8b41 | 2009-07-04 10:31:24 +0200 | [diff] [blame] | 35 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) \ |
| 36 | -Map $(nandobj)u-boot-spl.map \ |
| 37 | -o $@ |
| 38 | |
Wolfgang Denk | 18d46c0 | 2009-08-17 14:00:53 +0200 | [diff] [blame] | 39 | $(nandobj)u-boot.lds: $(LDSCRIPT) |
| 40 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ |
| 41 | |
Magnus Lilja | 24f8b41 | 2009-07-04 10:31:24 +0200 | [diff] [blame] | 42 | ######################################################################### |
| 43 | |
Peter Tyser | f7c6737 | 2010-04-12 22:28:11 -0500 | [diff] [blame] | 44 | $(obj)%.o: $(SRCTREE)/arch/arm/cpu/arm1136/%.S |
Magnus Lilja | 24f8b41 | 2009-07-04 10:31:24 +0200 | [diff] [blame] | 45 | $(CC) $(AFLAGS) -c -o $@ $< |
| 46 | |
| 47 | $(obj)%.o: $(SRCTREE)/board/freescale/mx31pdk/%.S |
| 48 | $(CC) $(AFLAGS) -c -o $@ $< |
| 49 | |
| 50 | $(obj)%.o: $(SRCTREE)/nand_spl/%.c |
| 51 | $(CC) $(CFLAGS) -c -o $@ $< |
| 52 | |
| 53 | # defines $(obj).depend target |
| 54 | include $(SRCTREE)/rules.mk |
| 55 | |
| 56 | sinclude $(obj).depend |
| 57 | |
| 58 | ######################################################################### |