diff options
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/mkimxboot/dualboot.c | 11 | ||||
-rw-r--r-- | rbutil/mkimxboot/dualboot.h | 1 | ||||
-rw-r--r-- | rbutil/mkimxboot/dualboot/Makefile | 3 | ||||
-rw-r--r-- | rbutil/mkimxboot/dualboot/dualboot.c | 14 | ||||
-rw-r--r-- | rbutil/mkimxboot/mkimxboot.c | 6 |
5 files changed, 33 insertions, 2 deletions
diff --git a/rbutil/mkimxboot/dualboot.c b/rbutil/mkimxboot/dualboot.c index e2bbdae8a9..b991fe3f6e 100644 --- a/rbutil/mkimxboot/dualboot.c +++ b/rbutil/mkimxboot/dualboot.c | |||
@@ -89,3 +89,14 @@ unsigned char dualboot_nwze360[416] = { | |||
89 | 0x3d, 0x59, 0x85, 0xe2, 0x09, 0x5d, 0x85, 0xe2, 0x03, 0x80, 0xa0, 0xe1, 0xda, 0xff, 0xff, 0xea, | 89 | 0x3d, 0x59, 0x85, 0xe2, 0x09, 0x5d, 0x85, 0xe2, 0x03, 0x80, 0xa0, 0xe1, 0xda, 0xff, 0xff, 0xea, |
90 | 0x00, 0x40, 0x04, 0x80, 0x00, 0x00, 0x05, 0x80, 0x01, 0x00, 0xff, 0xff, 0x00, 0xc0, 0x01, 0x80 | 90 | 0x00, 0x40, 0x04, 0x80, 0x00, 0x00, 0x05, 0x80, 0x01, 0x00, 0xff, 0xff, 0x00, 0xc0, 0x01, 0x80 |
91 | }; | 91 | }; |
92 | unsigned char dualboot_zenxfistyle[136] = { | ||
93 | 0x10, 0x40, 0x2d, 0xe9, 0x00, 0x00, 0x00, 0xeb, 0x10, 0x80, 0xbd, 0xe8, 0x6c, 0x30, 0x9f, 0xe5, | ||
94 | 0xc0, 0x30, 0x93, 0xe5, 0x68, 0x30, 0x9f, 0xe5, 0x02, 0x21, 0xa0, 0xe3, 0x08, 0x20, 0x83, 0xe5, | ||
95 | 0x03, 0x21, 0x82, 0xe2, 0x08, 0x20, 0x83, 0xe5, 0xff, 0x24, 0x82, 0xe2, 0x78, 0x20, 0x83, 0xe5, | ||
96 | 0xc5, 0x24, 0x82, 0xe2, 0x24, 0x20, 0x83, 0xe5, 0x04, 0x20, 0xa0, 0xe3, 0x18, 0x20, 0x83, 0xe5, | ||
97 | 0x04, 0x20, 0x83, 0xe5, 0x03, 0x20, 0xa0, 0xe1, 0x10, 0x30, 0x92, 0xe5, 0x04, 0x00, 0x13, 0xe3, | ||
98 | 0xfc, 0xff, 0xff, 0x0a, 0x28, 0x30, 0x9f, 0xe5, 0x70, 0x30, 0x93, 0xe5, 0xff, 0x34, 0xc3, 0xe3, | ||
99 | 0x3f, 0x37, 0xc3, 0xe3, 0xcb, 0x3f, 0x43, 0xe2, 0x03, 0x30, 0x43, 0xe2, 0x63, 0x00, 0x53, 0xe3, | ||
100 | 0x00, 0x00, 0xa0, 0x93, 0x00, 0x00, 0x81, 0x85, 0x01, 0x00, 0xa0, 0x83, 0x1e, 0xff, 0x2f, 0xe1, | ||
101 | 0x00, 0x40, 0x04, 0x80, 0x00, 0x00, 0x05, 0x80 | ||
102 | }; | ||
diff --git a/rbutil/mkimxboot/dualboot.h b/rbutil/mkimxboot/dualboot.h index 17ee1979fb..65793811c7 100644 --- a/rbutil/mkimxboot/dualboot.h +++ b/rbutil/mkimxboot/dualboot.h | |||
@@ -5,3 +5,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[416]; | 6 | extern unsigned char dualboot_nwze370[416]; |
7 | extern unsigned char dualboot_nwze360[416]; | 7 | extern unsigned char dualboot_nwze360[416]; |
8 | extern unsigned char dualboot_zenxfistyle[136]; | ||
diff --git a/rbutil/mkimxboot/dualboot/Makefile b/rbutil/mkimxboot/dualboot/Makefile index 500263c4bf..28e9643a3a 100644 --- a/rbutil/mkimxboot/dualboot/Makefile +++ b/rbutil/mkimxboot/dualboot/Makefile | |||
@@ -10,12 +10,13 @@ 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 nwze370 nwze360 | 13 | TARGETS=fuzeplus zenxfi2 zenxfi3 nwze370 nwze360 zenxfistyle |
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 | 17 | OPT_nwze370=-DSONY_NWZE370 -DIMX233_SUBTARGET=3780 |
18 | OPT_nwze360=-DSONY_NWZE360 -DIMX233_SUBTARGET=3780 | 18 | OPT_nwze360=-DSONY_NWZE360 -DIMX233_SUBTARGET=3780 |
19 | OPT_zenxfistyle=-DCREATIVE_ZENXFISTYLE -DIMX233_SUBTARGET=3780 | ||
19 | 20 | ||
20 | BOOTOBJS=$(patsubst %, dualboot_%.o, $(TARGETS)) | 21 | BOOTOBJS=$(patsubst %, dualboot_%.o, $(TARGETS)) |
21 | BOOTBINS=$(patsubst %, dualboot_%.arm-bin, $(TARGETS)) | 22 | BOOTBINS=$(patsubst %, dualboot_%.arm-bin, $(TARGETS)) |
diff --git a/rbutil/mkimxboot/dualboot/dualboot.c b/rbutil/mkimxboot/dualboot/dualboot.c index 3cca59bb8a..e841b12d74 100644 --- a/rbutil/mkimxboot/dualboot/dualboot.c +++ b/rbutil/mkimxboot/dualboot/dualboot.c | |||
@@ -184,6 +184,20 @@ static int boot_decision(int context) | |||
184 | } | 184 | } |
185 | return decision; | 185 | return decision; |
186 | } | 186 | } |
187 | #elif defined(CREATIVE_ZENXFISTYLE) | ||
188 | static int boot_decision(int context) | ||
189 | { | ||
190 | setup_lradc(2); // setup LRADC channel 2 to read keys | ||
191 | /* make a decision */ | ||
192 | int val = read_lradc(2); | ||
193 | /* boot to OF if left is hold | ||
194 | * NOTE: VDDIO is set to 3.1V initially and the resistor ladder is wired to | ||
195 | * VDDIO so these values are not the same as in the main binary which is | ||
196 | * calibrated for VDDIO=3.3V */ | ||
197 | if(val >= 815 && val < 915) | ||
198 | return BOOT_OF; | ||
199 | return BOOT_ROCK; | ||
200 | } | ||
187 | #else | 201 | #else |
188 | #warning You should define a target specific boot decision function | 202 | #warning You should define a target specific boot decision function |
189 | static int boot_decision(int context) | 203 | static int boot_decision(int context) |
diff --git a/rbutil/mkimxboot/mkimxboot.c b/rbutil/mkimxboot/mkimxboot.c index 1761fc9cb2..3897216e16 100644 --- a/rbutil/mkimxboot/mkimxboot.c +++ b/rbutil/mkimxboot/mkimxboot.c | |||
@@ -199,7 +199,7 @@ static const struct imx_model_desc_t imx_models[] = | |||
199 | 1, &zero_key, 0, 0x40000000 }, | 199 | 1, &zero_key, 0, 0x40000000 }, |
200 | [MODEL_ZENXFI3] = {"Zen X-Fi3", dualboot_zenxfi3, sizeof(dualboot_zenxfi3), "zxf3", 83, | 200 | [MODEL_ZENXFI3] = {"Zen X-Fi3", dualboot_zenxfi3, sizeof(dualboot_zenxfi3), "zxf3", 83, |
201 | 1, &zero_key, 0, 0x40000000 }, | 201 | 1, &zero_key, 0, 0x40000000 }, |
202 | [MODEL_ZENXFISTYLE] = {"Zen X-Fi Style", NULL, 0, "", -1, | 202 | [MODEL_ZENXFISTYLE] = {"Zen X-Fi Style", dualboot_zenxfistyle, sizeof(dualboot_zenxfistyle), "zxfs", 94, |
203 | 1, &zero_key, 0, 0x40000000 }, | 203 | 1, &zero_key, 0, 0x40000000 }, |
204 | [MODEL_ZENSTYLE] = {"Zen Style 100/300", NULL, 0, "", -1, | 204 | [MODEL_ZENSTYLE] = {"Zen Style 100/300", NULL, 0, "", -1, |
205 | 1, &zero_key, 0, 0x40000000 }, | 205 | 1, &zero_key, 0, 0x40000000 }, |
@@ -429,6 +429,10 @@ static enum imx_error_t patch_firmware(enum imx_model_t model, | |||
429 | return IMX_DONT_KNOW_HOW_TO_PATCH; | 429 | return IMX_DONT_KNOW_HOW_TO_PATCH; |
430 | } | 430 | } |
431 | break; | 431 | break; |
432 | case MODEL_ZENXFISTYLE: | ||
433 | /* The ZEN X-Fi Style uses the standard ____, host, play sections, patch after first | ||
434 | * call in ____ section. */ | ||
435 | return patch_std_zero_host_play(1, model, type, sb_file, boot_fw); | ||
432 | default: | 436 | default: |
433 | return IMX_DONT_KNOW_HOW_TO_PATCH; | 437 | return IMX_DONT_KNOW_HOW_TO_PATCH; |
434 | } | 438 | } |