1
0
Fork 0
forked from len0rd/rockbox

Add support for the sony NWZ-E360/E370 to mkimxboot

Change-Id: Ied73591326339d22b4f21d311da9e6b1b9c223ed
This commit is contained in:
Amaury Pouly 2013-09-25 14:30:35 +02:00
parent 9392d036c4
commit 6ac481e8bc
6 changed files with 51 additions and 5 deletions

View file

@ -33,3 +33,15 @@ unsigned char dualboot_zenxfi3[56] = {
0x00, 0x00, 0xa0, 0x03, 0x00, 0x00, 0x81, 0x15, 0x01, 0x00, 0xa0, 0x13, 0x1e, 0xff, 0x2f, 0xe1,
0x00, 0x40, 0x04, 0x80, 0x00, 0x80, 0x01, 0x80
};
unsigned char dualboot_nwze370[52] = {
0x10, 0x40, 0x2d, 0xe9, 0x00, 0x00, 0x00, 0xeb, 0x10, 0x80, 0xbd, 0xe8, 0x1c, 0x30, 0x9f, 0xe5,
0xc0, 0x20, 0x93, 0xe5, 0xc0, 0x30, 0x93, 0xe5, 0x03, 0x36, 0x03, 0xe2, 0x01, 0x06, 0x53, 0xe3,
0x00, 0x00, 0xa0, 0x03, 0x00, 0x00, 0x81, 0x15, 0x01, 0x00, 0xa0, 0x13, 0x1e, 0xff, 0x2f, 0xe1,
0x00, 0x40, 0x04, 0x80
};
unsigned char dualboot_nwze360[52] = {
0x10, 0x40, 0x2d, 0xe9, 0x00, 0x00, 0x00, 0xeb, 0x10, 0x80, 0xbd, 0xe8, 0x1c, 0x30, 0x9f, 0xe5,
0xc0, 0x20, 0x93, 0xe5, 0xc0, 0x30, 0x93, 0xe5, 0x03, 0x36, 0x03, 0xe2, 0x01, 0x06, 0x53, 0xe3,
0x00, 0x00, 0xa0, 0x03, 0x00, 0x00, 0x81, 0x15, 0x01, 0x00, 0xa0, 0x13, 0x1e, 0xff, 0x2f, 0xe1,
0x00, 0x40, 0x04, 0x80
};

View file

@ -3,3 +3,5 @@
extern unsigned char dualboot_fuzeplus[228];
extern unsigned char dualboot_zenxfi2[96];
extern unsigned char dualboot_zenxfi3[56];
extern unsigned char dualboot_nwze370[52];
extern unsigned char dualboot_nwze360[52];

View file

@ -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))

View file

@ -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)

View file

@ -160,6 +160,18 @@ static const struct imx_md5sum_t imx_sums[] =
[VARIANT_ZENSTYLE_RECOVERY] = {610272, 148576},
}
},
/** Sony NWZ-E370 */
{
/* Version 1.00.00 */
MODEL_NWZE370, "a615fdb70b3e1bfb0355a5bc2bf237ab", "1.00.00",
{ [VARIANT_DEFAULT] = {0, 16056320 } }
},
/** Sony NWZ-E360 */
{
/* Version 1.00.00 */
MODEL_NWZE360, "d0047f8a87d456a0032297b3c802a1ff", "1.00.00",
{ [VARIANT_DEFAULT] = {0, 20652032 } }
}
};
static struct crypto_key_t zero_key =
@ -180,6 +192,10 @@ static const struct imx_model_desc_t imx_models[] =
1, &zero_key, 0, 0x40000000 },
[MODEL_ZENSTYLE] = {"Zen Style 100/300", NULL, 0, "", -1,
1, &zero_key, 0, 0x40000000 },
[MODEL_NWZE370] = {"NWZ-E370", dualboot_nwze370, sizeof(dualboot_nwze370), "e370", 88,
1, &zero_key, 0, 0x40000000 },
[MODEL_NWZE360] = {"NWZ-E360", dualboot_nwze360, sizeof(dualboot_nwze360), "e360", 89,
1, &zero_key, 0, 0x40000000 },
};
#define NR_IMX_SUMS (sizeof(imx_sums) / sizeof(imx_sums[0]))
@ -384,6 +400,11 @@ static enum imx_error_t patch_firmware(enum imx_model_t model,
/* The ZEN X-Fi3 uses the standard ____, hSst, pSay sections, patch after third
* call in ____ section. Although sections names use the S variant, they are standard. */
return patch_std_zero_host_play(3, model, type, sb_file, boot_fw);
case MODEL_NWZE360:
case MODEL_NWZE370:
/* The NWZ-E360/E370 uses the standard ____, host, play sections, patch after first
* call in ____ section. */
return patch_std_zero_host_play(1, model, type, sb_file, boot_fw);
case MODEL_ZENXFI2:
/* The ZEN X-Fi2 has two types of firmware: recovery and normal.
* Normal uses the standard ___, host, play sections and recovery only ____ */

View file

@ -57,10 +57,12 @@ enum imx_model_t
{
MODEL_UNKNOWN = -1,
MODEL_FUZEPLUS = 0,
MODEL_ZENXFI2 = 1,
MODEL_ZENXFI3 = 2,
MODEL_ZENXFISTYLE = 3,
MODEL_ZENSTYLE = 4, /* Style 100 and Style 300 */
MODEL_ZENXFI2,
MODEL_ZENXFI3,
MODEL_ZENXFISTYLE,
MODEL_ZENSTYLE, /* Style 100 and Style 300 */
MODEL_NWZE370,
MODEL_NWZE360,
/* new models go here */
NUM_MODELS