summaryrefslogtreecommitdiffstats
path: root/rbutil/mkimxboot/dualboot
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-09-25 14:30:35 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-09-25 14:31:39 +0200
commit6ac481e8bcb72066594e64ec70edd2b869c254eb (patch)
tree0c7725c5a655355aaf0b2f0890092bd6fc7976a3 /rbutil/mkimxboot/dualboot
parent9392d036c4ee29c251dd1e89cf8ced653972b6fd (diff)
downloadrockbox-6ac481e8bcb72066594e64ec70edd2b869c254eb.tar.gz
rockbox-6ac481e8bcb72066594e64ec70edd2b869c254eb.zip
Add support for the sony NWZ-E360/E370 to mkimxboot
Change-Id: Ied73591326339d22b4f21d311da9e6b1b9c223ed
Diffstat (limited to 'rbutil/mkimxboot/dualboot')
-rw-r--r--rbutil/mkimxboot/dualboot/Makefile4
-rw-r--r--rbutil/mkimxboot/dualboot/dualboot.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/rbutil/mkimxboot/dualboot/Makefile b/rbutil/mkimxboot/dualboot/Makefile
index 4bad3a4a12..b799636405 100644
--- a/rbutil/mkimxboot/dualboot/Makefile
+++ b/rbutil/mkimxboot/dualboot/Makefile
@@ -10,10 +10,12 @@ CFLAGS=-mcpu=arm926ej-s -std=gnu99 -I. -I$(REGS_PATH) -nostdlib -ffreestanding -
# 1) add x to the list in TARGETS
# 2) create a variable named OPT_x of the form:
# OPT_x=target specific defines
-TARGETS=fuzeplus zenxfi2 zenxfi3
+TARGETS=fuzeplus zenxfi2 zenxfi3 nwze370 nwze360
OPT_fuzeplus=-DSANSA_FUZEPLUS -DIMX233_SUBTARGET=3780
OPT_zenxfi2=-DCREATIVE_ZENXFI2 -DIMX233_SUBTARGET=3780
OPT_zenxfi3=-DCREATIVE_ZENXFI3 -DIMX233_SUBTARGET=3780
+OPT_nwze370=-DSONY_NWZE370 -DIMX233_SUBTARGET=3780
+OPT_nwze360=-DSONY_NWZE360 -DIMX233_SUBTARGET=3780
BOOTOBJS=$(patsubst %, dualboot_%.o, $(TARGETS))
BOOTBINS=$(patsubst %, dualboot_%.arm-bin, $(TARGETS))
diff --git a/rbutil/mkimxboot/dualboot/dualboot.c b/rbutil/mkimxboot/dualboot/dualboot.c
index 301eca87ad..f75673efbe 100644
--- a/rbutil/mkimxboot/dualboot/dualboot.c
+++ b/rbutil/mkimxboot/dualboot/dualboot.c
@@ -119,6 +119,13 @@ static int boot_decision(int context)
/* if volume down is hold, boot to OF */
return !read_gpio(2, 7) ? BOOT_OF : BOOT_ROCK;
}
+#elif defined(SONY_NWZE360) || defined(SONY_NWZE370)
+static int boot_decision(int context)
+{
+ /* Power button set PSWITCH to 3, all other buttons to 1. So any
+ * button press will boot OF */
+ return read_pswitch() == 1 ? BOOT_OF : BOOT_ROCK;
+}
#else
#warning You should define a target specific boot decision function
static int boot_decision(int context)