summaryrefslogtreecommitdiff
path: root/firmware/target/mips/ingenic_x1000/x1000boot.make
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/x1000boot.make')
-rw-r--r--firmware/target/mips/ingenic_x1000/x1000boot.make53
1 files changed, 53 insertions, 0 deletions
diff --git a/firmware/target/mips/ingenic_x1000/x1000boot.make b/firmware/target/mips/ingenic_x1000/x1000boot.make
new file mode 100644
index 0000000000..e69b6a1439
--- /dev/null
+++ b/firmware/target/mips/ingenic_x1000/x1000boot.make
@@ -0,0 +1,53 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9
10INCLUDES += -I$(APPSDIR)
11SRC += $(call preprocess, $(APPSDIR)/SOURCES)
12
13LDSDEP := $(FIRMDIR)/export/cpu.h $(FIRMDIR)/export/config/$(MODELNAME).h
14
15BOOTLDS := $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/boot.lds
16BOOTLINK := $(BUILDDIR)/boot.link
17
18SPLLDS := $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/spl.lds
19SPLLINK := $(BUILDDIR)/spl.link
20
21CLEANOBJS += $(BUILDDIR)/bootloader.* $(BUILDDIR)/spl.*
22
23include $(FIRMDIR)/target/$(CPU)/$(MANUFACTURER)/$(MODELNAME)/boot.make
24
25.SECONDEXPANSION:
26
27$(BOOTLINK): $(BOOTLDS) $(LDSDEP)
28 $(call PRINTS,PP $(@F))
29 $(call preprocess2file,$<,$@,)
30
31$(BUILDDIR)/bootloader.elf: $$(OBJ) $(FIRMLIB) $(CORE_LIBS) $$(BOOTLINK)
32 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
33 -L$(BUILDDIR)/firmware -lfirmware \
34 -L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \
35 -lgcc -T$(BOOTLINK) $(GLOBAL_LDOPTS) \
36 -Wl,--gc-sections -Wl,-Map,$(BUILDDIR)/bootloader.map
37
38$(BUILDDIR)/bootloader.bin: $(BUILDDIR)/bootloader.elf
39 $(call PRINTS,OC $(@F))$(call objcopy,$<,$@)
40
41$(SPLLINK): $(SPLLDS) $(LDSDEP)
42 $(call PRINTS,PP $(@F))
43 $(call preprocess2file,$<,$@,)
44
45$(BUILDDIR)/spl.elf: $$(OBJ) $(FIRMLIB) $(CORE_LIBS) $$(SPLLINK)
46 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
47 -L$(BUILDDIR)/firmware -lfirmware \
48 -L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \
49 -lgcc -T$(SPLLINK) $(GLOBAL_LDOPTS) \
50 -Wl,--gc-sections -Wl,-Map,$(BUILDDIR)/spl.map
51
52$(BUILDDIR)/spl.bin: $(BUILDDIR)/spl.elf
53 $(call PRINTS,OC $(@F))$(call objcopy,$<,$@)