summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-09-28 17:46:27 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-09-28 17:46:27 +0000
commit1a253d1de57c45b837d315cccb83e6f7d87208b9 (patch)
tree3a1bc40381385b37c94ea22d8d422330e8075542 /tools
parent197c24c5d331703b8b1d743f5699263cd623df38 (diff)
downloadrockbox-1a253d1de57c45b837d315cccb83e6f7d87208b9.tar.gz
rockbox-1a253d1de57c45b837d315cccb83e6f7d87208b9.zip
MkZenBoot:
* Add warning for big endian players * Remove FRESC keys * Add support for Zen Mozaic git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18658 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rw-r--r--tools/mkzenboot.c45
1 files changed, 25 insertions, 20 deletions
diff --git a/tools/mkzenboot.c b/tools/mkzenboot.c
index e37708e1d1..44f11e532a 100644
--- a/tools/mkzenboot.c
+++ b/tools/mkzenboot.c
@@ -783,10 +783,6 @@ static const char null_key_v2[] = "CTL:N0MAD|PDE0.DPMP.";
783static const char null_key_v3[] = "CTL:N0MAD|PDE0.DPFP."; 783static const char null_key_v3[] = "CTL:N0MAD|PDE0.DPFP.";
784static const char null_key_v4[] = "CTL:Z3N07|PDE0.DPMP."; 784static const char null_key_v4[] = "CTL:Z3N07|PDE0.DPMP.";
785 785
786static const char fresc_key_v1[] = "Copyright (C) CTL. -"
787 " zN0MAD iz v~p0wderful!";
788static const char fresc_key_v2[] = ""; /* Unknown atm */
789
790static const char tl_zvm_key[] = "1sN0TM3D az u~may th1nk*" 786static const char tl_zvm_key[] = "1sN0TM3D az u~may th1nk*"
791 "Creative Zen Vision:M"; 787 "Creative Zen Vision:M";
792static const char tl_zvm60_key[] = "1sN0TM3D az u~may th1nk*" 788static const char tl_zvm60_key[] = "1sN0TM3D az u~may th1nk*"
@@ -796,6 +792,8 @@ static const char tl_zen_key[] = "1sN0TM3D az u~may th1nk*"
796 "Creative ZEN"; 792 "Creative ZEN";
797static const char tl_zenxf_key[] = "1sN0TM3D az u~may th1nk*" 793static const char tl_zenxf_key[] = "1sN0TM3D az u~may th1nk*"
798 "Creative ZEN X-Fi"; 794 "Creative ZEN X-Fi";
795static const char tl_zenmo_key[] = "1sN0TM3D az u~may th1nk*"
796 "Creative ZEN Mozaic";
799static const char tl_zv_key[] = "1sN0TM3D az u~may th1nk*" 797static const char tl_zv_key[] = "1sN0TM3D az u~may th1nk*"
800 "Creative Zen Vision"; 798 "Creative Zen Vision";
801static const char tl_zvw_key[] = "1sN0TM3D az u~may th1nk*" 799static const char tl_zvw_key[] = "1sN0TM3D az u~may th1nk*"
@@ -822,27 +820,27 @@ struct player_info_t
822{ 820{
823 const char* name; 821 const char* name;
824 const char* null_key; /* HMAC-SHA1 key */ 822 const char* null_key; /* HMAC-SHA1 key */
825 const char* fresc_key; /* BlowFish key */
826 const char* tl_key; /* BlowFish key */ 823 const char* tl_key; /* BlowFish key */
827 bool big_endian; 824 bool big_endian;
828}; 825};
829 826
830static struct player_info_t players[] = { 827static struct player_info_t players[] = {
831 {"Zen Vision:M", null_key_v2, fresc_key_v1, tl_zvm_key, false}, 828 {"Zen Vision:M", null_key_v2, tl_zvm_key, false},
832 {"Zen Vision:M 60GB", null_key_v2, fresc_key_v1, tl_zvm60_key, false}, 829 {"Zen Vision:M 60GB", null_key_v2, tl_zvm60_key, false},
833 {"ZEN", null_key_v4, fresc_key_v2, tl_zen_key, false}, 830 {"ZEN", null_key_v4, tl_zen_key, false},
834 {"ZEN X-Fi", null_key_v4, fresc_key_v2, tl_zenxf_key, false}, 831 {"ZEN X-Fi", null_key_v4, tl_zenxf_key, false},
835 {"Zen Vision", null_key_v2, fresc_key_v1, tl_zv_key, false}, 832 {"ZEN Mozaic", null_key_v4, tl_zenmo_key, false},
836 {"Zen Vision W", null_key_v2, fresc_key_v1, tl_zvw_key, false}, 833 {"Zen Vision", null_key_v2, tl_zv_key, false},
837 {"Zen Micro", null_key_v1, fresc_key_v1, tl_zm_key, true}, 834 {"Zen Vision W", null_key_v2, tl_zvw_key, false},
838 {"Zen MicroPhoto", null_key_v1, fresc_key_v1, tl_zmp_key, true}, 835 {"Zen Micro", null_key_v1, tl_zm_key, true},
839 {"Zen Sleek", null_key_v1, fresc_key_v1, tl_zs_key, true}, 836 {"Zen MicroPhoto", null_key_v1, tl_zmp_key, true},
840 {"Zen SleekPhoto", null_key_v1, fresc_key_v1, tl_zsp_key, true}, 837 {"Zen Sleek", null_key_v1, tl_zs_key, true},
841 {"Zen Touch", null_key_v1, fresc_key_v1, tl_zt_key, true}, 838 {"Zen SleekPhoto", null_key_v1, tl_zsp_key, true},
842 {"Zen Xtra", null_key_v1, fresc_key_v1, tl_zx_key, true}, 839 {"Zen Touch", null_key_v1, tl_zt_key, true},
843 {"Zen V", null_key_v3, fresc_key_v1, tl_zenv_key, false}, 840 {"Zen Xtra", null_key_v1, tl_zx_key, true},
844 {"Zen V Plus", null_key_v3, fresc_key_v1, tl_zenvp_key, false}, 841 {"Zen V", null_key_v3, tl_zenv_key, false},
845 {"Zen V Video", null_key_v3, fresc_key_v1, tl_zenvv_key, false}, 842 {"Zen V Plus", null_key_v3, tl_zenvp_key, false},
843 {"Zen V Video", null_key_v3, tl_zenvv_key, false},
846 {NULL, NULL, NULL, NULL, false} 844 {NULL, NULL, NULL, NULL, false}
847}; 845};
848 846
@@ -856,6 +854,13 @@ int mkboot(const char* infile, const char* bootfile, const char* outfile, struct
856 const char *fw_key; 854 const char *fw_key;
857 uint32_t i, fw_offset, fw_size, data_ptr, data_size, ciff_size, cenc_size, iv[2]; 855 uint32_t i, fw_offset, fw_size, data_ptr, data_size, ciff_size, cenc_size, iv[2];
858 856
857 /* TODO */
858 if(player->big_endian)
859 {
860 log_message("[ERR] Big-endian players are currently unsupported\n");
861 return -255;
862 }
863
859 infd = fopen(infile, "rb"); 864 infd = fopen(infile, "rb");
860 if(infd == NULL) 865 if(infd == NULL)
861 { 866 {