diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/Makefile | 57 | ||||
-rw-r--r-- | firmware/decompressor/Makefile | 1 | ||||
-rw-r--r-- | firmware/export/config-mrobe500.h | 3 | ||||
-rw-r--r-- | firmware/export/debug.h | 3 | ||||
-rw-r--r-- | firmware/firmware.make | 39 |
5 files changed, 43 insertions, 60 deletions
diff --git a/firmware/Makefile b/firmware/Makefile deleted file mode 100644 index 0b80cf22e3..0000000000 --- a/firmware/Makefile +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | |||
10 | INCLUDES=$(TARGET_INC) -Iinclude -I$(FIRMDIR) -Iexport -Icommon -Idrivers -I$(BUILDDIR) | ||
11 | |||
12 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(BUILDDATE) $(EXTRA_DEFINES) \ | ||
13 | -DMEM=${MEMORYSIZE} | ||
14 | |||
15 | # Limits for the built-in sysfont: ASCII for bootloaders, ISO8859-1 for normal builds | ||
16 | ifneq (,$(findstring -DBOOTLOADER,$(EXTRA_DEFINES))) | ||
17 | MAXCHAR = 127 | ||
18 | else | ||
19 | MAXCHAR = 255 | ||
20 | endif | ||
21 | |||
22 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
23 | include $(TOOLSDIR)/makesrc.inc | ||
24 | |||
25 | SOURCES = $(SRC) | ||
26 | OBJS2 := $(patsubst %.c, $(OBJDIR)/%.o, $(SRC)) $(OBJDIR)/sysfont.o | ||
27 | OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) | ||
28 | DIRS:=. drivers common | ||
29 | OUTPUT = $(BUILDDIR)/librockbox.a | ||
30 | DEPFILE = $(OBJDIR)/dep-firmware | ||
31 | |||
32 | all: $(OUTPUT) $(EXTRA_TARGETS) | ||
33 | |||
34 | dep: $(DEPFILE) | ||
35 | |||
36 | $(OUTPUT): $(BUILDDIR)/sysfont.h $(OBJS) $(DEPFILE) | ||
37 | $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $(OBJS) >/dev/null 2>&1 | ||
38 | $(SILENT)$(RANLIB) $@ | ||
39 | |||
40 | include $(TOOLSDIR)/make.inc | ||
41 | |||
42 | clean: | ||
43 | $(call PRINTS,cleaning firmware)rm -f $(OBJS) $(OUTPUT) $(OBJDIR)/sysfont.c $(DEPFILE) | ||
44 | $(SILENT)rm -rf $(OBJDIR)/drivers $(OBJDIR)/common | ||
45 | |||
46 | # Special targets | ||
47 | $(OBJDIR)/thread.o: thread.c export/thread.h | ||
48 | $(call PRINTS,CC thread.c)$(CC) -c -O -fomit-frame-pointer $(CFLAGS) $< -o $@ | ||
49 | |||
50 | $(BUILDDIR)/sysfont.h: ../fonts/08-Schumacher-Clean.bdf | ||
51 | $(call PRINTS,Create sysfont.h)$(TOOLSDIR)/convbdf -l $(MAXCHAR) -h -o $@ $< | ||
52 | |||
53 | $(OBJDIR)/sysfont.o: ../fonts/08-Schumacher-Clean.bdf | ||
54 | $(call PRINTS,CONVBDF)$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(OBJDIR)/sysfont.c $< | ||
55 | $(call PRINTS,CC sysfont.c)$(CC) $(CFLAGS) -c $(OBJDIR)/sysfont.c -o $@ | ||
56 | |||
57 | -include $(DEPFILE) | ||
diff --git a/firmware/decompressor/Makefile b/firmware/decompressor/Makefile index 33b6affc6d..30bb04e480 100644 --- a/firmware/decompressor/Makefile +++ b/firmware/decompressor/Makefile | |||
@@ -27,6 +27,7 @@ $(OBJDIR)/compressed.elf : $(OBJS) $(LINKFILE) | |||
27 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/compressed.map | 27 | $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/compressed.map |
28 | 28 | ||
29 | $(LINKFILE): $(LDS) | 29 | $(LINKFILE): $(LDS) |
30 | $(SILENT)mkdir -p $(dir $@) | ||
30 | $(call PRINTS,Build LDS file)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ | 31 | $(call PRINTS,Build LDS file)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ |
31 | 32 | ||
32 | $(OBJDIR)/decompressor.o : decompressor.c $(OBJDIR)/uclimage.c | 33 | $(OBJDIR)/decompressor.o : decompressor.c $(OBJDIR)/uclimage.c |
diff --git a/firmware/export/config-mrobe500.h b/firmware/export/config-mrobe500.h index 572d018328..5f89a9667d 100644 --- a/firmware/export/config-mrobe500.h +++ b/firmware/export/config-mrobe500.h | |||
@@ -147,8 +147,7 @@ | |||
147 | /* Define this if you have a Motorola SCF5249 */ | 147 | /* Define this if you have a Motorola SCF5249 */ |
148 | #define CONFIG_CPU DM320 | 148 | #define CONFIG_CPU DM320 |
149 | 149 | ||
150 | /* Define this if you want to use coldfire's i2c interface */ | 150 | #define CONFIG_I2C I2C_DM320 |
151 | //#define CONFIG_I2C I2C_S3C2440 | ||
152 | 151 | ||
153 | /* define this if the hardware can be powered off while charging */ | 152 | /* define this if the hardware can be powered off while charging */ |
154 | #define HAVE_POWEROFF_WHILE_CHARGING | 153 | #define HAVE_POWEROFF_WHILE_CHARGING |
diff --git a/firmware/export/debug.h b/firmware/export/debug.h index dd65c3d7be..f9f93fdcd9 100644 --- a/firmware/export/debug.h +++ b/firmware/export/debug.h | |||
@@ -28,6 +28,7 @@ extern void debugf(const char* fmt,...) ATTRIBUTE_PRINTF(1, 2); | |||
28 | extern void ldebugf(const char* file, int line, const char *fmt, ...) | 28 | extern void ldebugf(const char* file, int line, const char *fmt, ...) |
29 | ATTRIBUTE_PRINTF(3, 4); | 29 | ATTRIBUTE_PRINTF(3, 4); |
30 | 30 | ||
31 | #ifndef CODEC | ||
31 | #ifdef __GNUC__ | 32 | #ifdef __GNUC__ |
32 | 33 | ||
33 | /* */ | 34 | /* */ |
@@ -57,5 +58,5 @@ void breakpoint(void); | |||
57 | 58 | ||
58 | #endif /* GCC */ | 59 | #endif /* GCC */ |
59 | 60 | ||
60 | 61 | #endif /* CODEC */ | |
61 | #endif | 62 | #endif |
diff --git a/firmware/firmware.make b/firmware/firmware.make new file mode 100644 index 0000000000..992df26141 --- /dev/null +++ b/firmware/firmware.make | |||
@@ -0,0 +1,39 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | INCLUDES += -I$(FIRMDIR) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers | ||
11 | |||
12 | FIRMLIB_SRC += $(call preprocess, $(FIRMDIR)/SOURCES) | ||
13 | FIRMLIB_SRC += $(ROOTDIR)/sysfont.o | ||
14 | FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC)) | ||
15 | OTHER_SRC += $(FIRMLIB_SRC) | ||
16 | |||
17 | FIRMLIB = $(BUILDDIR)/firmware/libfirmware.a | ||
18 | |||
19 | SYSFONT = $(ROOTDIR)/fonts/08-Schumacher-Clean.bdf | ||
20 | |||
21 | CLEANOBJS += $(BUILDDIR)/sysfont.* | ||
22 | |||
23 | # Limits for the built-in sysfont: ASCII for bootloaders, ISO8859-1 for normal builds | ||
24 | ifneq (,$(findstring -DBOOTLOADER,$(EXTRA_DEFINES))) | ||
25 | MAXCHAR = 127 | ||
26 | else | ||
27 | MAXCHAR = 255 | ||
28 | endif | ||
29 | |||
30 | $(FIRMLIB): $(FIRMLIB_OBJ) | ||
31 | $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 | ||
32 | |||
33 | $(BUILDDIR)/sysfont.h: $(SYSFONT) $(TOOLS) | ||
34 | $(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -h -o $@ $< | ||
35 | |||
36 | $(BUILDDIR)/sysfont.o: $(SYSFONT) $(BUILDDIR)/sysfont.h | ||
37 | $(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(BUILDDIR)/sysfont.c $< | ||
38 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$(BUILDDIR)/sysfont.c))$(CC) $(CFLAGS) -c $(BUILDDIR)/sysfont.c -o $@ | ||
39 | |||