diff options
-rw-r--r-- | rbutil/mkimxboot/dualboot.c | 12 | ||||
-rw-r--r-- | rbutil/mkimxboot/dualboot.h | 2 | ||||
-rw-r--r-- | rbutil/mkimxboot/dualboot/Makefile | 4 | ||||
-rw-r--r-- | rbutil/mkimxboot/dualboot/dualboot.c | 7 | ||||
-rw-r--r-- | rbutil/mkimxboot/mkimxboot.c | 21 | ||||
-rw-r--r-- | rbutil/mkimxboot/mkimxboot.h | 10 |
6 files changed, 51 insertions, 5 deletions
diff --git a/rbutil/mkimxboot/dualboot.c b/rbutil/mkimxboot/dualboot.c index 6f8f5c423d..8b5ca5b2b6 100644 --- a/rbutil/mkimxboot/dualboot.c +++ b/rbutil/mkimxboot/dualboot.c | |||
@@ -33,3 +33,15 @@ unsigned char dualboot_zenxfi3[56] = { | |||
33 | 0x00, 0x00, 0xa0, 0x03, 0x00, 0x00, 0x81, 0x15, 0x01, 0x00, 0xa0, 0x13, 0x1e, 0xff, 0x2f, 0xe1, | 33 | 0x00, 0x00, 0xa0, 0x03, 0x00, 0x00, 0x81, 0x15, 0x01, 0x00, 0xa0, 0x13, 0x1e, 0xff, 0x2f, 0xe1, |
34 | 0x00, 0x40, 0x04, 0x80, 0x00, 0x80, 0x01, 0x80 | 34 | 0x00, 0x40, 0x04, 0x80, 0x00, 0x80, 0x01, 0x80 |
35 | }; | 35 | }; |
36 | unsigned char dualboot_nwze370[52] = { | ||
37 | 0x10, 0x40, 0x2d, 0xe9, 0x00, 0x00, 0x00, 0xeb, 0x10, 0x80, 0xbd, 0xe8, 0x1c, 0x30, 0x9f, 0xe5, | ||
38 | 0xc0, 0x20, 0x93, 0xe5, 0xc0, 0x30, 0x93, 0xe5, 0x03, 0x36, 0x03, 0xe2, 0x01, 0x06, 0x53, 0xe3, | ||
39 | 0x00, 0x00, 0xa0, 0x03, 0x00, 0x00, 0x81, 0x15, 0x01, 0x00, 0xa0, 0x13, 0x1e, 0xff, 0x2f, 0xe1, | ||
40 | 0x00, 0x40, 0x04, 0x80 | ||
41 | }; | ||
42 | unsigned char dualboot_nwze360[52] = { | ||
43 | 0x10, 0x40, 0x2d, 0xe9, 0x00, 0x00, 0x00, 0xeb, 0x10, 0x80, 0xbd, 0xe8, 0x1c, 0x30, 0x9f, 0xe5, | ||
44 | 0xc0, 0x20, 0x93, 0xe5, 0xc0, 0x30, 0x93, 0xe5, 0x03, 0x36, 0x03, 0xe2, 0x01, 0x06, 0x53, 0xe3, | ||
45 | 0x00, 0x00, 0xa0, 0x03, 0x00, 0x00, 0x81, 0x15, 0x01, 0x00, 0xa0, 0x13, 0x1e, 0xff, 0x2f, 0xe1, | ||
46 | 0x00, 0x40, 0x04, 0x80 | ||
47 | }; | ||
diff --git a/rbutil/mkimxboot/dualboot.h b/rbutil/mkimxboot/dualboot.h index 8ebde559f5..9bf271299a 100644 --- a/rbutil/mkimxboot/dualboot.h +++ b/rbutil/mkimxboot/dualboot.h | |||
@@ -3,3 +3,5 @@ | |||
3 | extern unsigned char dualboot_fuzeplus[228]; | 3 | extern unsigned char dualboot_fuzeplus[228]; |
4 | extern unsigned char dualboot_zenxfi2[96]; | 4 | extern unsigned char dualboot_zenxfi2[96]; |
5 | extern unsigned char dualboot_zenxfi3[56]; | 5 | extern unsigned char dualboot_zenxfi3[56]; |
6 | extern unsigned char dualboot_nwze370[52]; | ||
7 | extern unsigned char dualboot_nwze360[52]; | ||
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 - | |||
10 | # 1) add x to the list in TARGETS | 10 | # 1) add x to the list in TARGETS |
11 | # 2) create a variable named OPT_x of the form: | 11 | # 2) create a variable named OPT_x of the form: |
12 | # OPT_x=target specific defines | 12 | # OPT_x=target specific defines |
13 | TARGETS=fuzeplus zenxfi2 zenxfi3 | 13 | TARGETS=fuzeplus zenxfi2 zenxfi3 nwze370 nwze360 |
14 | OPT_fuzeplus=-DSANSA_FUZEPLUS -DIMX233_SUBTARGET=3780 | 14 | OPT_fuzeplus=-DSANSA_FUZEPLUS -DIMX233_SUBTARGET=3780 |
15 | OPT_zenxfi2=-DCREATIVE_ZENXFI2 -DIMX233_SUBTARGET=3780 | 15 | OPT_zenxfi2=-DCREATIVE_ZENXFI2 -DIMX233_SUBTARGET=3780 |
16 | OPT_zenxfi3=-DCREATIVE_ZENXFI3 -DIMX233_SUBTARGET=3780 | 16 | OPT_zenxfi3=-DCREATIVE_ZENXFI3 -DIMX233_SUBTARGET=3780 |
17 | OPT_nwze370=-DSONY_NWZE370 -DIMX233_SUBTARGET=3780 | ||
18 | OPT_nwze360=-DSONY_NWZE360 -DIMX233_SUBTARGET=3780 | ||
17 | 19 | ||
18 | BOOTOBJS=$(patsubst %, dualboot_%.o, $(TARGETS)) | 20 | BOOTOBJS=$(patsubst %, dualboot_%.o, $(TARGETS)) |
19 | BOOTBINS=$(patsubst %, dualboot_%.arm-bin, $(TARGETS)) | 21 | 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) | |||
119 | /* if volume down is hold, boot to OF */ | 119 | /* if volume down is hold, boot to OF */ |
120 | return !read_gpio(2, 7) ? BOOT_OF : BOOT_ROCK; | 120 | return !read_gpio(2, 7) ? BOOT_OF : BOOT_ROCK; |
121 | } | 121 | } |
122 | #elif defined(SONY_NWZE360) || defined(SONY_NWZE370) | ||
123 | static int boot_decision(int context) | ||
124 | { | ||
125 | /* Power button set PSWITCH to 3, all other buttons to 1. So any | ||
126 | * button press will boot OF */ | ||
127 | return read_pswitch() == 1 ? BOOT_OF : BOOT_ROCK; | ||
128 | } | ||
122 | #else | 129 | #else |
123 | #warning You should define a target specific boot decision function | 130 | #warning You should define a target specific boot decision function |
124 | static int boot_decision(int context) | 131 | static int boot_decision(int context) |
diff --git a/rbutil/mkimxboot/mkimxboot.c b/rbutil/mkimxboot/mkimxboot.c index 12b029ec9d..efa8907df4 100644 --- a/rbutil/mkimxboot/mkimxboot.c +++ b/rbutil/mkimxboot/mkimxboot.c | |||
@@ -160,6 +160,18 @@ static const struct imx_md5sum_t imx_sums[] = | |||
160 | [VARIANT_ZENSTYLE_RECOVERY] = {610272, 148576}, | 160 | [VARIANT_ZENSTYLE_RECOVERY] = {610272, 148576}, |
161 | } | 161 | } |
162 | }, | 162 | }, |
163 | /** Sony NWZ-E370 */ | ||
164 | { | ||
165 | /* Version 1.00.00 */ | ||
166 | MODEL_NWZE370, "a615fdb70b3e1bfb0355a5bc2bf237ab", "1.00.00", | ||
167 | { [VARIANT_DEFAULT] = {0, 16056320 } } | ||
168 | }, | ||
169 | /** Sony NWZ-E360 */ | ||
170 | { | ||
171 | /* Version 1.00.00 */ | ||
172 | MODEL_NWZE360, "d0047f8a87d456a0032297b3c802a1ff", "1.00.00", | ||
173 | { [VARIANT_DEFAULT] = {0, 20652032 } } | ||
174 | } | ||
163 | }; | 175 | }; |
164 | 176 | ||
165 | static struct crypto_key_t zero_key = | 177 | static struct crypto_key_t zero_key = |
@@ -180,6 +192,10 @@ static const struct imx_model_desc_t imx_models[] = | |||
180 | 1, &zero_key, 0, 0x40000000 }, | 192 | 1, &zero_key, 0, 0x40000000 }, |
181 | [MODEL_ZENSTYLE] = {"Zen Style 100/300", NULL, 0, "", -1, | 193 | [MODEL_ZENSTYLE] = {"Zen Style 100/300", NULL, 0, "", -1, |
182 | 1, &zero_key, 0, 0x40000000 }, | 194 | 1, &zero_key, 0, 0x40000000 }, |
195 | [MODEL_NWZE370] = {"NWZ-E370", dualboot_nwze370, sizeof(dualboot_nwze370), "e370", 88, | ||
196 | 1, &zero_key, 0, 0x40000000 }, | ||
197 | [MODEL_NWZE360] = {"NWZ-E360", dualboot_nwze360, sizeof(dualboot_nwze360), "e360", 89, | ||
198 | 1, &zero_key, 0, 0x40000000 }, | ||
183 | }; | 199 | }; |
184 | 200 | ||
185 | #define NR_IMX_SUMS (sizeof(imx_sums) / sizeof(imx_sums[0])) | 201 | #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, | |||
384 | /* The ZEN X-Fi3 uses the standard ____, hSst, pSay sections, patch after third | 400 | /* The ZEN X-Fi3 uses the standard ____, hSst, pSay sections, patch after third |
385 | * call in ____ section. Although sections names use the S variant, they are standard. */ | 401 | * call in ____ section. Although sections names use the S variant, they are standard. */ |
386 | return patch_std_zero_host_play(3, model, type, sb_file, boot_fw); | 402 | return patch_std_zero_host_play(3, model, type, sb_file, boot_fw); |
403 | case MODEL_NWZE360: | ||
404 | case MODEL_NWZE370: | ||
405 | /* The NWZ-E360/E370 uses the standard ____, host, play sections, patch after first | ||
406 | * call in ____ section. */ | ||
407 | return patch_std_zero_host_play(1, model, type, sb_file, boot_fw); | ||
387 | case MODEL_ZENXFI2: | 408 | case MODEL_ZENXFI2: |
388 | /* The ZEN X-Fi2 has two types of firmware: recovery and normal. | 409 | /* The ZEN X-Fi2 has two types of firmware: recovery and normal. |
389 | * Normal uses the standard ___, host, play sections and recovery only ____ */ | 410 | * Normal uses the standard ___, host, play sections and recovery only ____ */ |
diff --git a/rbutil/mkimxboot/mkimxboot.h b/rbutil/mkimxboot/mkimxboot.h index 4440f200ec..87d4f09c97 100644 --- a/rbutil/mkimxboot/mkimxboot.h +++ b/rbutil/mkimxboot/mkimxboot.h | |||
@@ -57,10 +57,12 @@ enum imx_model_t | |||
57 | { | 57 | { |
58 | MODEL_UNKNOWN = -1, | 58 | MODEL_UNKNOWN = -1, |
59 | MODEL_FUZEPLUS = 0, | 59 | MODEL_FUZEPLUS = 0, |
60 | MODEL_ZENXFI2 = 1, | 60 | MODEL_ZENXFI2, |
61 | MODEL_ZENXFI3 = 2, | 61 | MODEL_ZENXFI3, |
62 | MODEL_ZENXFISTYLE = 3, | 62 | MODEL_ZENXFISTYLE, |
63 | MODEL_ZENSTYLE = 4, /* Style 100 and Style 300 */ | 63 | MODEL_ZENSTYLE, /* Style 100 and Style 300 */ |
64 | MODEL_NWZE370, | ||
65 | MODEL_NWZE360, | ||
64 | /* new models go here */ | 66 | /* new models go here */ |
65 | 67 | ||
66 | NUM_MODELS | 68 | NUM_MODELS |