summaryrefslogtreecommitdiffstats
path: root/rbutil/mkamsboot/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/mkamsboot/Makefile')
-rw-r--r--rbutil/mkamsboot/Makefile30
1 files changed, 25 insertions, 5 deletions
diff --git a/rbutil/mkamsboot/Makefile b/rbutil/mkamsboot/Makefile
index e3d98f03f0..c5f8dd5e51 100644
--- a/rbutil/mkamsboot/Makefile
+++ b/rbutil/mkamsboot/Makefile
@@ -10,8 +10,8 @@ LIBUCL=../../tools/ucl/src/libucl.a
#
# If anyone reading this wants to improve this makefile, please do!
-BOOTIMAGES = bootimg_clip.o bootimg_e200v2.o
-BOOTHEADERS = bootimg_clip.h bootimg_e200v2.h
+BOOTIMAGES = bootimg_clip.o bootimg_e200v2.o bootimg_m200v2.o
+BOOTHEADERS = bootimg_clip.h bootimg_e200v2.h bootimg_m200v2.h
CLIPFILES = dualboot-clip.o dualboot-clip.elf dualboot-clip.o \
dualboot-clip.bin bootimg_clip.c bootimg_clip.h
@@ -19,6 +19,9 @@ CLIPFILES = dualboot-clip.o dualboot-clip.elf dualboot-clip.o \
E200V2FILES = dualboot-e200v2.o dualboot-e200v2.elf dualboot-e200v2.o \
dualboot-e200v2.bin bootimg_e200v2.c bootimg_e200v2.h
+M200V2FILES = dualboot-m200v2.o dualboot-m200v2.elf dualboot-m200v2.o \
+ dualboot-m200v2.bin bootimg_m200v2.c bootimg_m200v2.h
+
all: mkamsboot
$(LIBUCL):
@@ -64,9 +67,26 @@ dualboot-e200v2.bin: dualboot-e200v2.elf
bootimg_e200v2.c bootimg_e200v2.h: dualboot-e200v2.bin bin2c
./bin2c dualboot-e200v2.bin bootimg_e200v2
-bootimg_e200v2.o: bootimg_e200v2.c
- gcc -c -o bootimg_e200v2.o bootimg_e200v2.c
+# M200V2
+
+bootimg_m200v2.o: bootimg_m200v2.c
+ gcc -c -o bootimg_m200v2.o bootimg_m200v2.c
+dualboot-m200v2.o: dualboot.S
+ arm-elf-gcc -DSANSA_M200V2 -c -o dualboot-m200v2.o dualboot.S
+
+dualboot-m200v2.elf: dualboot-m200v2.o
+ arm-elf-ld -e 0 -Ttext=0 -o dualboot-m200v2.elf dualboot-m200v2.o
+
+dualboot-m200v2.bin: dualboot-m200v2.elf
+ arm-elf-objcopy -O binary dualboot-m200v2.elf dualboot-m200v2.bin
+
+bootimg_m200v2.c bootimg_m200v2.h: dualboot-m200v2.bin bin2c
+ ./bin2c dualboot-m200v2.bin bootimg_m200v2
+
+bootimg_m200v2.o: bootimg_m200v2.c
+ gcc -c -o bootimg_m200v2.o bootimg_m200v2.c
+
# Rules for the ucl unpack function
nrv2e_d8.o: nrv2e_d8.S
arm-elf-gcc -DPURE_THUMB -c -o nrv2e_d8.o nrv2e_d8.S
@@ -91,4 +111,4 @@ bin2c: bin2c.c
clean:
rm -f mkamsboot mkamsboot.o nrv2e_d8.o nrv2e_d8.elf nrv2e_d8.bin *~ \
bin2c uclimg.c uclimg.h uclimg.o \
- $(BOOTIMAGES) $(CLIPFILES) $(E200V2FILES)
+ $(BOOTIMAGES) $(CLIPFILES) $(E200V2FILES) $(M200V2FILES)