summaryrefslogtreecommitdiffstats
path: root/utils/AMS/hacking/Makefile
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-05-11 18:29:53 +0000
committerDave Chapman <dave@dchapman.com>2008-05-11 18:29:53 +0000
commit1aa6cde3eaa49c6607cc5827c0a7c8e6dd355a1a (patch)
treee5917680a7ea7c4abf18edf2a7251f894b4c63aa /utils/AMS/hacking/Makefile
parentd24eb9e461ca1d25a83d825d355710ebdbe509b5 (diff)
downloadrockbox-1aa6cde3eaa49c6607cc5827c0a7c8e6dd355a1a.tar.gz
rockbox-1aa6cde3eaa49c6607cc5827c0a7c8e6dd355a1a.tar.bz2
rockbox-1aa6cde3eaa49c6607cc5827c0a7c8e6dd355a1a.zip
Some tools for hacking Sansa V2 (AMS) firmware files and injecting our own code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17464 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/AMS/hacking/Makefile')
-rw-r--r--utils/AMS/hacking/Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/utils/AMS/hacking/Makefile b/utils/AMS/hacking/Makefile
new file mode 100644
index 0000000000..7a10c20ae4
--- /dev/null
+++ b/utils/AMS/hacking/Makefile
@@ -0,0 +1,34 @@
+
+# Change INFILE to point to your original firmware file
+INFILE=$(HOME)/FW/AMS/CLIP/m300a-1.1.17A.bin
+
+# OUTFILE is the file you copy to your device's root and rename to
+# (e.g.) m300a.bin
+OUTFILE=patched.bin
+
+
+all: amsinfo $(OUTFILE)
+
+amsinfo: amsinfo.c
+ gcc -o amsinfo -W -Wall amsinfo.c
+
+mkamsboot: mkamsboot.c
+ gcc -o mkamsboot -W -Wall mkamsboot.c
+
+# Rules for our test ARM application - assemble, link, then extract
+# the binary code
+
+test.o: test.S
+ arm-elf-as -o test.o test.S
+
+test.elf: test.o
+ arm-elf-ld -e 0 -o test.elf test.o
+
+test.bin: test.elf
+ arm-elf-objcopy -O binary test.elf test.bin
+
+$(OUTFILE): mkamsboot test.bin $(INFILE)
+ ./mkamsboot $(INFILE) test.bin $(OUTFILE)
+
+clean:
+ rm -fr amsinfo mkamsboot test.bin test.o test.elf $(OUTFILE) *~