From 4da8a441d103c40ecc9c1f84cb5bef49ca8c1e8f Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Tue, 22 Oct 2013 00:20:18 +0200 Subject: [PATCH] tools/scramble: add support for a couple more Creative devices This is mostly for consistency, this tool will be unused by the newer targets. Also update the usage() display to mention -no-ciff Change-Id: I4500f5fdce771ad3c53701a0bbaace916e88759d --- tools/creative.c | 6 +++++- tools/creative.h | 4 +++- tools/scramble.c | 10 +++++++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/tools/creative.c b/tools/creative.c index 5c4a236a52..a8548444ff 100644 --- a/tools/creative.c +++ b/tools/creative.c @@ -140,7 +140,11 @@ static const struct device_info devices[] = /* Creative ZEN V */ {"C\0r\0e\0a\0t\0i\0v\0e\0 \0Z\0E\0N\0 \0V", 42, null_key_v4}, /* Creative ZEN */ - {"C\0r\0e\0a\0t\0i\0v\0e\0 \0Z\0E\0N", 48, null_key_v3} + {"C\0r\0e\0a\0t\0i\0v\0e\0 \0Z\0E\0N", 48, null_key_v3}, + /* Creative ZEN X-Fi */ + {"C\0r\0e\0a\0t\0i\0v\0e\0 \0Z\0E\0N\0 \0X\0-\0F\0i\0", 34, null_key_v4}, + /* Creative ZEN Mozaic */ + {"C\0r\0e\0a\0t\0i\0v\0e\0 \0Z\0E\0N\0 \0M\0o\0z\0a\0i\0c\0", 38, null_key_v4} }; /* diff --git a/tools/creative.h b/tools/creative.h index ee2cf90582..531336aa32 100644 --- a/tools/creative.h +++ b/tools/creative.h @@ -28,7 +28,9 @@ enum ZENVISIONM60 = 1, ZENVISION = 2, ZENV = 3, - ZEN = 4 + ZEN = 4, + ZENXFI = 5, + ZENMOZAIC = 6 }; struct device_info diff --git a/tools/scramble.c b/tools/scramble.c index 7b164e0899..c29634bb6c 100644 --- a/tools/scramble.c +++ b/tools/scramble.c @@ -107,9 +107,9 @@ void usage(void) printf("\t-ipod3g ipod firmware partition format (3rd Gen)\n" "\t-ipod4g ipod firmware partition format (4th Gen, Mini, Nano, Photo/Color)\n" "\t-ipod5g ipod firmware partition format (5th Gen - aka Video)\n" - "\t-creative=X Creative firmware structure format\n" - "\t (X values: zvm, zvm60, zenvision\n" - "\t zenv, zen\n"); + "\t-creative=X [-no-ciff] Creative firmware structure format\n" + "\t (X values: zvm, zvm60, zenvision, zenv, zen,\n" + "\t zenxfi, zenmozaic)\n"); printf("\t-gigabeat Toshiba Gigabeat F/X format\n" "\t-gigabeats Toshiba Gigabeat S format\n" "\t-mi4v2 PortalPlayer .mi4 format (revision 010201)\n" @@ -455,6 +455,10 @@ int main (int argc, char** argv) return zvm_encode(iname, oname, ZENV, creative_enable_ciff); else if(!strcmp(&argv[1][10], "zen")) return zvm_encode(iname, oname, ZEN, creative_enable_ciff); + else if(!strcmp(&argv[1][10], "zenxfi")) + return zvm_encode(iname, oname, ZENXFI, creative_enable_ciff); + else if(!strcmp(&argv[1][10], "zenmozaic")) + return zvm_encode(iname, oname, ZENMOZAIC, creative_enable_ciff); else { fprintf(stderr, "unsupported Creative device: %s\n", &argv[1][10]);