summaryrefslogtreecommitdiffstats
path: root/firmware/decompressor/Makefile
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-11-30 00:05:40 +0000
committerJens Arnold <amiconn@rockbox.org>2005-11-30 00:05:40 +0000
commit4c385148ac4a2f4959ec39841c20eaeb42ace668 (patch)
tree09f7e37c89a0a187fc1573efbfa9f2bd8cd60ec2 /firmware/decompressor/Makefile
parent8b022749a7c29ce5f7254fc153ca78b087e53e04 (diff)
downloadrockbox-4c385148ac4a2f4959ec39841c20eaeb42ace668.tar.gz
rockbox-4c385148ac4a2f4959ec39841c20eaeb42ace668.zip
Self-extracting loader: Cleaner method for inclusion of the UCL-compressed image. The input image is now checked for correctness and converted to C source. The Makefile still needs fixing...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8109 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/decompressor/Makefile')
-rw-r--r--firmware/decompressor/Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/firmware/decompressor/Makefile b/firmware/decompressor/Makefile
index 29a78523ea..4136eafdb7 100644
--- a/firmware/decompressor/Makefile
+++ b/firmware/decompressor/Makefile
@@ -18,13 +18,14 @@ OBJDIR := .
# FIXME: get proper value from build system
MEMORYSIZE = 2
-
LDS := link.lds
LINKFILE = $(OBJDIR)/linkage.lds
-OBJS := $(OBJDIR)/decompressor.o $(OBJDIR)/rockboxucl.o $(OBJDIR)/startup.o
+OBJS := $(OBJDIR)/decompressor.o $(OBJDIR)/uclimage.o $(OBJDIR)/startup.o
CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns
+all: $(OBJDIR)/compressed.bin
+
$(OBJDIR)/compressed.bin : $(OBJDIR)/compressed.elf
@echo "OBJCOPY "`basename $@`
@$(OC) -O binary $< $@
@@ -37,6 +38,12 @@ $(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 $< $@
+$(OBJDIR)/decompressor.o : $(OBJDIR)/uclimage.h
+
+$(OBJDIR)/uclimage.c : $(OBJDIR)/rockbox.ucl $(TOOLSDIR)/ucl2src.pl
+ @echo "UCL2SRC"
+ @perl -s $(TOOLSDIR)/ucl2src.pl -p=uclimage $< $@
+
+$(OBJDIR)/uclimage.h : $(OBJDIR)/rockbox.ucl $(TOOLSDIR)/ucl2src.pl
+ @echo "UCL2SRC"
+ @perl -s $(TOOLSDIR)/ucl2src.pl -p=uclimage $< $@