mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-07 13:45:03 -05:00
Initial commit for the ZEN X-Fi Style
Change-Id: Ib25a357a7bafd2ef25f273cadff70fafbd8d4661
This commit is contained in:
parent
b3abcb807b
commit
69d0dae55b
15 changed files with 666 additions and 45 deletions
|
|
@ -89,3 +89,14 @@ unsigned char dualboot_nwze360[416] = {
|
|||
0x3d, 0x59, 0x85, 0xe2, 0x09, 0x5d, 0x85, 0xe2, 0x03, 0x80, 0xa0, 0xe1, 0xda, 0xff, 0xff, 0xea,
|
||||
0x00, 0x40, 0x04, 0x80, 0x00, 0x00, 0x05, 0x80, 0x01, 0x00, 0xff, 0xff, 0x00, 0xc0, 0x01, 0x80
|
||||
};
|
||||
unsigned char dualboot_zenxfistyle[136] = {
|
||||
0x10, 0x40, 0x2d, 0xe9, 0x00, 0x00, 0x00, 0xeb, 0x10, 0x80, 0xbd, 0xe8, 0x6c, 0x30, 0x9f, 0xe5,
|
||||
0xc0, 0x30, 0x93, 0xe5, 0x68, 0x30, 0x9f, 0xe5, 0x02, 0x21, 0xa0, 0xe3, 0x08, 0x20, 0x83, 0xe5,
|
||||
0x03, 0x21, 0x82, 0xe2, 0x08, 0x20, 0x83, 0xe5, 0xff, 0x24, 0x82, 0xe2, 0x78, 0x20, 0x83, 0xe5,
|
||||
0xc5, 0x24, 0x82, 0xe2, 0x24, 0x20, 0x83, 0xe5, 0x04, 0x20, 0xa0, 0xe3, 0x18, 0x20, 0x83, 0xe5,
|
||||
0x04, 0x20, 0x83, 0xe5, 0x03, 0x20, 0xa0, 0xe1, 0x10, 0x30, 0x92, 0xe5, 0x04, 0x00, 0x13, 0xe3,
|
||||
0xfc, 0xff, 0xff, 0x0a, 0x28, 0x30, 0x9f, 0xe5, 0x70, 0x30, 0x93, 0xe5, 0xff, 0x34, 0xc3, 0xe3,
|
||||
0x3f, 0x37, 0xc3, 0xe3, 0xcb, 0x3f, 0x43, 0xe2, 0x03, 0x30, 0x43, 0xe2, 0x63, 0x00, 0x53, 0xe3,
|
||||
0x00, 0x00, 0xa0, 0x93, 0x00, 0x00, 0x81, 0x85, 0x01, 0x00, 0xa0, 0x83, 0x1e, 0xff, 0x2f, 0xe1,
|
||||
0x00, 0x40, 0x04, 0x80, 0x00, 0x00, 0x05, 0x80
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,3 +5,4 @@ extern unsigned char dualboot_zenxfi2[96];
|
|||
extern unsigned char dualboot_zenxfi3[56];
|
||||
extern unsigned char dualboot_nwze370[416];
|
||||
extern unsigned char dualboot_nwze360[416];
|
||||
extern unsigned char dualboot_zenxfistyle[136];
|
||||
|
|
|
|||
|
|
@ -10,12 +10,13 @@ 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 nwze370 nwze360
|
||||
TARGETS=fuzeplus zenxfi2 zenxfi3 nwze370 nwze360 zenxfistyle
|
||||
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
|
||||
OPT_zenxfistyle=-DCREATIVE_ZENXFISTYLE -DIMX233_SUBTARGET=3780
|
||||
|
||||
BOOTOBJS=$(patsubst %, dualboot_%.o, $(TARGETS))
|
||||
BOOTBINS=$(patsubst %, dualboot_%.arm-bin, $(TARGETS))
|
||||
|
|
|
|||
|
|
@ -184,6 +184,20 @@ static int boot_decision(int context)
|
|||
}
|
||||
return decision;
|
||||
}
|
||||
#elif defined(CREATIVE_ZENXFISTYLE)
|
||||
static int boot_decision(int context)
|
||||
{
|
||||
setup_lradc(2); // setup LRADC channel 2 to read keys
|
||||
/* make a decision */
|
||||
int val = read_lradc(2);
|
||||
/* boot to OF if left is hold
|
||||
* NOTE: VDDIO is set to 3.1V initially and the resistor ladder is wired to
|
||||
* VDDIO so these values are not the same as in the main binary which is
|
||||
* calibrated for VDDIO=3.3V */
|
||||
if(val >= 815 && val < 915)
|
||||
return BOOT_OF;
|
||||
return BOOT_ROCK;
|
||||
}
|
||||
#else
|
||||
#warning You should define a target specific boot decision function
|
||||
static int boot_decision(int context)
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ static const struct imx_model_desc_t imx_models[] =
|
|||
1, &zero_key, 0, 0x40000000 },
|
||||
[MODEL_ZENXFI3] = {"Zen X-Fi3", dualboot_zenxfi3, sizeof(dualboot_zenxfi3), "zxf3", 83,
|
||||
1, &zero_key, 0, 0x40000000 },
|
||||
[MODEL_ZENXFISTYLE] = {"Zen X-Fi Style", NULL, 0, "", -1,
|
||||
[MODEL_ZENXFISTYLE] = {"Zen X-Fi Style", dualboot_zenxfistyle, sizeof(dualboot_zenxfistyle), "zxfs", 94,
|
||||
1, &zero_key, 0, 0x40000000 },
|
||||
[MODEL_ZENSTYLE] = {"Zen Style 100/300", NULL, 0, "", -1,
|
||||
1, &zero_key, 0, 0x40000000 },
|
||||
|
|
@ -429,6 +429,10 @@ static enum imx_error_t patch_firmware(enum imx_model_t model,
|
|||
return IMX_DONT_KNOW_HOW_TO_PATCH;
|
||||
}
|
||||
break;
|
||||
case MODEL_ZENXFISTYLE:
|
||||
/* The ZEN X-Fi Style 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);
|
||||
default:
|
||||
return IMX_DONT_KNOW_HOW_TO_PATCH;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue