blob: 7a10c20ae450380409906b2c93dc256e7251d7ca [file] [log] [blame]
Dave Chapman1aa6cde2008-05-11 18:29:53 +00001
2# Change INFILE to point to your original firmware file
3INFILE=$(HOME)/FW/AMS/CLIP/m300a-1.1.17A.bin
4
5# OUTFILE is the file you copy to your device's root and rename to
6# (e.g.) m300a.bin
7OUTFILE=patched.bin
8
9
10all: amsinfo $(OUTFILE)
11
12amsinfo: amsinfo.c
13 gcc -o amsinfo -W -Wall amsinfo.c
14
15mkamsboot: mkamsboot.c
16 gcc -o mkamsboot -W -Wall mkamsboot.c
17
18# Rules for our test ARM application - assemble, link, then extract
19# the binary code
20
21test.o: test.S
22 arm-elf-as -o test.o test.S
23
24test.elf: test.o
25 arm-elf-ld -e 0 -o test.elf test.o
26
27test.bin: test.elf
28 arm-elf-objcopy -O binary test.elf test.bin
29
30$(OUTFILE): mkamsboot test.bin $(INFILE)
31 ./mkamsboot $(INFILE) test.bin $(OUTFILE)
32
33clean:
34 rm -fr amsinfo mkamsboot test.bin test.o test.elf $(OUTFILE) *~