mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
Add support for the sony NWZ-E360/E370 to mkimxboot
Change-Id: Ied73591326339d22b4f21d311da9e6b1b9c223ed
This commit is contained in:
parent
9392d036c4
commit
6ac481e8bc
6 changed files with 51 additions and 5 deletions
|
@ -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, 0x00, 0xa0, 0x03, 0x00, 0x00, 0x81, 0x15, 0x01, 0x00, 0xa0, 0x13, 0x1e, 0xff, 0x2f, 0xe1,
|
||||||
0x00, 0x40, 0x04, 0x80, 0x00, 0x80, 0x01, 0x80
|
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
|
||||||
|
};
|
||||||
|
|
|
@ -3,3 +3,5 @@
|
||||||
extern unsigned char dualboot_fuzeplus[228];
|
extern unsigned char dualboot_fuzeplus[228];
|
||||||
extern unsigned char dualboot_zenxfi2[96];
|
extern unsigned char dualboot_zenxfi2[96];
|
||||||
extern unsigned char dualboot_zenxfi3[56];
|
extern unsigned char dualboot_zenxfi3[56];
|
||||||
|
extern unsigned char dualboot_nwze370[52];
|
||||||
|
extern unsigned char dualboot_nwze360[52];
|
||||||
|
|
|
@ -10,10 +10,12 @@ CFLAGS=-mcpu=arm926ej-s -std=gnu99 -I. -I$(REGS_PATH) -nostdlib -ffreestanding -
|
||||||
# 1) add x to the list in TARGETS
|
# 1) add x to the list in TARGETS
|
||||||
# 2) create a variable named OPT_x of the form:
|
# 2) create a variable named OPT_x of the form:
|
||||||
# OPT_x=target specific defines
|
# OPT_x=target specific defines
|
||||||
TARGETS=fuzeplus zenxfi2 zenxfi3
|
TARGETS=fuzeplus zenxfi2 zenxfi3 nwze370 nwze360
|
||||||
OPT_fuzeplus=-DSANSA_FUZEPLUS -DIMX233_SUBTARGET=3780
|
OPT_fuzeplus=-DSANSA_FUZEPLUS -DIMX233_SUBTARGET=3780
|
||||||
OPT_zenxfi2=-DCREATIVE_ZENXFI2 -DIMX233_SUBTARGET=3780
|
OPT_zenxfi2=-DCREATIVE_ZENXFI2 -DIMX233_SUBTARGET=3780
|
||||||
OPT_zenxfi3=-DCREATIVE_ZENXFI3 -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))
|
BOOTOBJS=$(patsubst %, dualboot_%.o, $(TARGETS))
|
||||||
BOOTBINS=$(patsubst %, dualboot_%.arm-bin, $(TARGETS))
|
BOOTBINS=$(patsubst %, dualboot_%.arm-bin, $(TARGETS))
|
||||||
|
|
|
@ -119,6 +119,13 @@ static int boot_decision(int context)
|
||||||
/* if volume down is hold, boot to OF */
|
/* if volume down is hold, boot to OF */
|
||||||
return !read_gpio(2, 7) ? BOOT_OF : BOOT_ROCK;
|
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
|
#else
|
||||||
#warning You should define a target specific boot decision function
|
#warning You should define a target specific boot decision function
|
||||||
static int boot_decision(int context)
|
static int boot_decision(int context)
|
||||||
|
|
|
@ -160,6 +160,18 @@ static const struct imx_md5sum_t imx_sums[] =
|
||||||
[VARIANT_ZENSTYLE_RECOVERY] = {610272, 148576},
|
[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 =
|
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 },
|
1, &zero_key, 0, 0x40000000 },
|
||||||
[MODEL_ZENSTYLE] = {"Zen Style 100/300", NULL, 0, "", -1,
|
[MODEL_ZENSTYLE] = {"Zen Style 100/300", NULL, 0, "", -1,
|
||||||
1, &zero_key, 0, 0x40000000 },
|
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]))
|
#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
|
/* 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. */
|
* 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);
|
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:
|
case MODEL_ZENXFI2:
|
||||||
/* The ZEN X-Fi2 has two types of firmware: recovery and normal.
|
/* The ZEN X-Fi2 has two types of firmware: recovery and normal.
|
||||||
* Normal uses the standard ___, host, play sections and recovery only ____ */
|
* Normal uses the standard ___, host, play sections and recovery only ____ */
|
||||||
|
|
|
@ -57,10 +57,12 @@ enum imx_model_t
|
||||||
{
|
{
|
||||||
MODEL_UNKNOWN = -1,
|
MODEL_UNKNOWN = -1,
|
||||||
MODEL_FUZEPLUS = 0,
|
MODEL_FUZEPLUS = 0,
|
||||||
MODEL_ZENXFI2 = 1,
|
MODEL_ZENXFI2,
|
||||||
MODEL_ZENXFI3 = 2,
|
MODEL_ZENXFI3,
|
||||||
MODEL_ZENXFISTYLE = 3,
|
MODEL_ZENXFISTYLE,
|
||||||
MODEL_ZENSTYLE = 4, /* Style 100 and Style 300 */
|
MODEL_ZENSTYLE, /* Style 100 and Style 300 */
|
||||||
|
MODEL_NWZE370,
|
||||||
|
MODEL_NWZE360,
|
||||||
/* new models go here */
|
/* new models go here */
|
||||||
|
|
||||||
NUM_MODELS
|
NUM_MODELS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue