diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2012-05-19 13:55:33 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2012-05-19 16:10:52 +0200 |
commit | e09c1e3d43665d04ae0ce2f288ba695b5abc3622 (patch) | |
tree | 7b89d6f4aabb847002004a65686b363859af0a33 /rbutil/mkimxboot/dualboot | |
parent | b62ec2ba809f093f299111cf263ce51ca4d4a665 (diff) |
mkimxboot: add support for more target and variants
Add creative zen x-fi 2/3 and add a variant mechanism
Change-Id: Ic2ee82a4238a87c2eb5d72b8309650d9a280325f
Diffstat (limited to 'rbutil/mkimxboot/dualboot')
-rw-r--r-- | rbutil/mkimxboot/dualboot/Makefile | 10 | ||||
-rw-r--r-- | rbutil/mkimxboot/dualboot/dualboot.S | 20 |
2 files changed, 28 insertions, 2 deletions
diff --git a/rbutil/mkimxboot/dualboot/Makefile b/rbutil/mkimxboot/dualboot/Makefile index fa5f341b6d..6386b7c622 100644 --- a/rbutil/mkimxboot/dualboot/Makefile +++ b/rbutil/mkimxboot/dualboot/Makefile @@ -4,8 +4,8 @@ CROSS_PREFIX=arm-elf-eabi # adding a new target. mkimxboot.c also needs to be edited to refer to these # new images. -BOOTOBJS = dualboot_fuzeplus.o -BOOTBINS = dualboot_fuzeplus.arm-bin +BOOTOBJS = dualboot_fuzeplus.o dualboot_zenxfi2.o dualboot_zenxfi3.o +BOOTBINS = dualboot_fuzeplus.arm-bin dualboot_zenxfi2.arm-bin dualboot_zenxfi3.arm-bin all: ../dualboot.h ../dualboot.c @@ -14,6 +14,12 @@ all: ../dualboot.h ../dualboot.c dualboot_fuzeplus.o: dualboot.S $(CROSS_PREFIX)-$(CC) -mcpu=arm926ej-s -DSANSA_FUZEPLUS -c -o dualboot_fuzeplus.o dualboot.S +dualboot_zenxfi2.o: dualboot.S + $(CROSS_PREFIX)-$(CC) -mcpu=arm926ej-s -DCREATIVE_ZENXFI2 -c -o dualboot_zenxfi2.o dualboot.S + +dualboot_zenxfi3.o: dualboot.S + $(CROSS_PREFIX)-$(CC) -mcpu=arm926ej-s -DCREATIVE_ZENXFI3 -c -o dualboot_zenxfi3.o dualboot.S + # Rules for the ARM code embedded in mkamsboot - assemble, link, then extract # the binary code and finally convert to .h for building in mkamsboot diff --git a/rbutil/mkimxboot/dualboot/dualboot.S b/rbutil/mkimxboot/dualboot/dualboot.S index 4002167929..ed91012199 100644 --- a/rbutil/mkimxboot/dualboot/dualboot.S +++ b/rbutil/mkimxboot/dualboot/dualboot.S @@ -65,6 +65,26 @@ power_down: ldr r1, =0x3E770001 @ unlock key + power down str r1, [r0] b power_down +#elif defined(CREATIVE_ZENXFI2) + /* If select key is hold, return so that the OF can boot */ + ldr r2, =0x80018600 @ HW_PINCTRL_DIN0 + ldr r2, [r2] + tst r2, #0x4000 @ bit 14, active low + moveq r0, #0 @ return 0, continue boot + bxeq lr + str r0, [r1] + mov r0, #1 + bx lr +#elif defined(CREATIVE_ZENXFI3) + /* If volume down key is hold, return so that the OF can boot */ + ldr r2, =0x80018620 @ HW_PINCTRL_DIN2 + ldr r2, [r2] + tst r2, #0x80 @ bit 7, active low + moveq r0, #0 @ return 0, continue boot + bxeq lr + str r0, [r1] + mov r0, #1 + bx lr #else #error No target defined ! #endif |