summaryrefslogtreecommitdiff
path: root/rbutil/mkamsboot/dualboot/Makefile
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-05-28 18:27:08 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-05-28 18:27:08 +0000
commit96165abec2da60c466659fa0e68e06d97587d51a (patch)
tree5445bddea2ac0e706546ce972d61dacc8d0f81e2 /rbutil/mkamsboot/dualboot/Makefile
parentbebc8587cfa7896684278d824ed5b28b2e9f9df1 (diff)
downloadrockbox-96165abec2da60c466659fa0e68e06d97587d51a.tar.gz
rockbox-96165abec2da60c466659fa0e68e06d97587d51a.zip
FS#10253 : mkamsboot v1.0mkamsboot_1.0
- Bump version to 1.0 - Add Clipv2 target - Make mkamsboot work as a library (work by domonoky : FS#10185, with a few modifications by me) . Use a macro with variadic arguments for error cases in functions which might error. . Add detailed descriptions to functions exported by the library (in the header file) - modify bin2c.c to produce only one pair of .c/.h files with several files embedded in it - move files needing to be built by an ARM cross compiler into dualboot/ - commit produced .c/.h files (containing nrv2e_d8.S and dualboot.S built for Clip, Fuze, e200v2, c200v2, m200v4, Clipv2) - Write a real README file - cosmetics: indent dualboot.S properly, remove trailing spaces, limit lines to 80 characters - comments: add/correct comments in dualboot.S and mkamsboot.c - move back extract_fw.c to utils/AMS/hacking git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21118 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/mkamsboot/dualboot/Makefile')
-rw-r--r--rbutil/mkamsboot/dualboot/Makefile54
1 files changed, 54 insertions, 0 deletions
diff --git a/rbutil/mkamsboot/dualboot/Makefile b/rbutil/mkamsboot/dualboot/Makefile
new file mode 100644
index 0000000000..06b90c7fb9
--- /dev/null
+++ b/rbutil/mkamsboot/dualboot/Makefile
@@ -0,0 +1,54 @@
1CC=gcc
2
3# Edit the following variables (plus copy/paste another set of rules) when
4# adding a new target. mkamsboot.c also needs to be edited to refer to these
5# new images.
6
7BOOTOBJS = nrv2e_d8.o dualboot_clip.o dualboot_e200v2.o dualboot_c200v2.o dualboot_m200v4.o dualboot_fuze.o dualboot_clipv2.o
8BOOTBINS = nrv2e_d8.arm-bin dualboot_clip.arm-bin dualboot_e200v2.arm-bin dualboot_c200v2.arm-bin dualboot_m200v4.arm-bin dualboot_fuze.arm-bin dualboot_clipv2.arm-bin
9
10all: dualboot.h
11
12dualboot.h: $(BOOTBINS)
13
14# Dualboot bootloaders
15
16dualboot_clip.o: dualboot.S
17 arm-elf-gcc -DSANSA_CLIP -c -o dualboot_clip.o dualboot.S
18
19dualboot_fuze.o: dualboot.S
20 arm-elf-gcc -DSANSA_FUZE -c -o dualboot_fuze.o dualboot.S
21
22dualboot_e200v2.o: dualboot.S
23 arm-elf-gcc -DSANSA_E200V2 -c -o dualboot_e200v2.o dualboot.S
24
25dualboot_m200v4.o: dualboot.S
26 arm-elf-gcc -DSANSA_M200V4 -c -o dualboot_m200v4.o dualboot.S
27
28dualboot_c200v2.o: dualboot.S
29 arm-elf-gcc -DSANSA_C200V2 -c -o dualboot_c200v2.o dualboot.S
30
31dualboot_clipv2.o: dualboot.S
32 arm-elf-gcc -DSANSA_CLIPV2 -c -o dualboot_clipv2.o dualboot.S
33
34# Rules for the ucl unpack function
35nrv2e_d8.o: nrv2e_d8.S
36 arm-elf-gcc -DPURE_THUMB -c -o nrv2e_d8.o nrv2e_d8.S
37
38# Rules for the ARM code embedded in mkamsboot - assemble, link, then extract
39# the binary code and finally convert to .h for building in mkamsboot
40
41%.arm-elf: %.o
42 arm-elf-ld -e 0 -Ttext=0 -o $@ $<
43
44%.arm-bin: %.arm-elf
45 arm-elf-objcopy -O binary $< $@
46
47dualboot.c dualboot.h: $(BOOTBINS) bin2c
48 ./bin2c dualboot $(BOOTBINS)
49
50bin2c: bin2c.c
51 $(CC) -o bin2c bin2c.c
52
53clean:
54 rm -f *~ bin2c $(BOOTBINS) $(BOOTOBJS) dualboot.c dualboot.h