summaryrefslogtreecommitdiffstats
path: root/firmware/decompressor/Makefile
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-11-27 23:55:13 +0000
committerJens Arnold <amiconn@rockbox.org>2005-11-27 23:55:13 +0000
commitdbff1f20eec246d9c9f720b1fa64696fd7671737 (patch)
tree0a8a73832532bc6b194d5b74f789ba501998e651 /firmware/decompressor/Makefile
parent4923f49c6f89b751c89678d328d6b5adb7d7bcfb (diff)
downloadrockbox-dbff1f20eec246d9c9f720b1fa64696fd7671737.tar.gz
rockbox-dbff1f20eec246d9c9f720b1fa64696fd7671737.tar.bz2
rockbox-dbff1f20eec246d9c9f720b1fa64696fd7671737.zip
Archos targets: Self-extractor for on-disk firmware images to work around the file size limit. Re-uses rockbox.ucl. Not yet integrated with build system.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8089 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/decompressor/Makefile')
-rw-r--r--firmware/decompressor/Makefile42
1 files changed, 42 insertions, 0 deletions
diff --git a/firmware/decompressor/Makefile b/firmware/decompressor/Makefile
new file mode 100644
index 0000000000..99e91aa35e
--- /dev/null
+++ b/firmware/decompressor/Makefile
@@ -0,0 +1,42 @@
+# __________ __ ___.
+# Open \______ \ ____ ____ | | _\_ |__ _______ ___
+# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+# \/ \/ \/ \/ \/
+# $Id$
+#
+
+CC = sh-elf-gcc
+LD = sh-elf-ld
+AR = sh-elf-ar
+AS = sh-elf-as
+OC = sh-elf-objcopy
+
+TOOLSDIR=../../tools
+OBJDIR := .
+# FIXME: get proper value from build system
+MEMORYSIZE = 2
+
+
+LDS := link.lds
+LINKFILE = $(OBJDIR)/linkage.lds
+OBJS := $(OBJDIR)/decompressor.o $(OBJDIR)/rockboxucl.o
+
+CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns
+
+$(OBJDIR)/compressed.bin : $(OBJDIR)/compressed.elf
+ @echo "OBJCOPY "`basename $@`
+ @$(OC) -O binary $< $@
+
+$(OBJDIR)/compressed.elf : $(OBJS) $(LINKFILE)
+ @echo "LD rockbox.elf"
+ @$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/compressed.map
+
+$(LINKFILE): $(LDS)
+ @echo "Build LDS file"
+ @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
+
+$(OBJDIR)/rockboxucl.o: $(OBJDIR)/rockbox.ucl
+ @echo "OBJCOPY rockbox.ucl"
+ @$(OC) -I binary -O elf32-sh -B sh --rename-section .data=.image,alloc,load,data,contents $< $@