diff options
Diffstat (limited to 'rbutil/mkamsboot/mkamsboot.c')
-rw-r--r-- | rbutil/mkamsboot/mkamsboot.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/rbutil/mkamsboot/mkamsboot.c b/rbutil/mkamsboot/mkamsboot.c index 8d40a1966c..d983d37853 100644 --- a/rbutil/mkamsboot/mkamsboot.c +++ b/rbutil/mkamsboot/mkamsboot.c | |||
@@ -109,7 +109,7 @@ execution to the uncompressed firmware. | |||
109 | #define O_BINARY 0 | 109 | #define O_BINARY 0 |
110 | #endif | 110 | #endif |
111 | 111 | ||
112 | /* 4 for m200, 2 for e200/c200, 1 or 2 for fuze/clop */ | 112 | /* 4 for m200, 2 for e200/c200, 1 or 2 for fuze/clip, 1 for clip+ */ |
113 | const unsigned short hw_revisions[] = { | 113 | const unsigned short hw_revisions[] = { |
114 | [MODEL_FUZE] = 1, | 114 | [MODEL_FUZE] = 1, |
115 | [MODEL_CLIP] = 1, | 115 | [MODEL_CLIP] = 1, |
@@ -117,9 +117,10 @@ const unsigned short hw_revisions[] = { | |||
117 | [MODEL_E200V2] = 2, | 117 | [MODEL_E200V2] = 2, |
118 | [MODEL_M200V4] = 4, | 118 | [MODEL_M200V4] = 4, |
119 | [MODEL_C200V2] = 2, | 119 | [MODEL_C200V2] = 2, |
120 | [MODEL_CLIPPLUS]= 1, | ||
120 | }; | 121 | }; |
121 | 122 | ||
122 | /* version 2 is used in Clipv2 and Fuzev2 firmwares */ | 123 | /* version 2 is used in Clipv2, Clip+ and Fuzev2 firmwares */ |
123 | const unsigned short fw_revisions[] = { | 124 | const unsigned short fw_revisions[] = { |
124 | [MODEL_FUZE] = 1, | 125 | [MODEL_FUZE] = 1, |
125 | [MODEL_CLIP] = 1, | 126 | [MODEL_CLIP] = 1, |
@@ -127,6 +128,7 @@ const unsigned short fw_revisions[] = { | |||
127 | [MODEL_E200V2] = 1, | 128 | [MODEL_E200V2] = 1, |
128 | [MODEL_M200V4] = 1, | 129 | [MODEL_M200V4] = 1, |
129 | [MODEL_C200V2] = 1, | 130 | [MODEL_C200V2] = 1, |
131 | [MODEL_CLIPPLUS]= 2, | ||
130 | }; | 132 | }; |
131 | 133 | ||
132 | /* Descriptive name of these models */ | 134 | /* Descriptive name of these models */ |
@@ -134,6 +136,7 @@ const char* model_names[] = { | |||
134 | [MODEL_FUZE] = "Fuze", | 136 | [MODEL_FUZE] = "Fuze", |
135 | [MODEL_CLIP] = "Clip", | 137 | [MODEL_CLIP] = "Clip", |
136 | [MODEL_CLIPV2] = "Clip", | 138 | [MODEL_CLIPV2] = "Clip", |
139 | [MODEL_CLIPPLUS]= "Clip+", | ||
137 | [MODEL_E200V2] = "e200", | 140 | [MODEL_E200V2] = "e200", |
138 | [MODEL_M200V4] = "m200", | 141 | [MODEL_M200V4] = "m200", |
139 | [MODEL_C200V2] = "c200", | 142 | [MODEL_C200V2] = "c200", |
@@ -147,6 +150,7 @@ static const unsigned char* bootloaders[] = { | |||
147 | [MODEL_E200V2] = dualboot_e200v2, | 150 | [MODEL_E200V2] = dualboot_e200v2, |
148 | [MODEL_M200V4] = dualboot_m200v4, | 151 | [MODEL_M200V4] = dualboot_m200v4, |
149 | [MODEL_C200V2] = dualboot_c200v2, | 152 | [MODEL_C200V2] = dualboot_c200v2, |
153 | [MODEL_CLIPPLUS]= dualboot_clipplus, | ||
150 | }; | 154 | }; |
151 | 155 | ||
152 | /* Size of dualboot functions for these models */ | 156 | /* Size of dualboot functions for these models */ |
@@ -157,6 +161,7 @@ const int bootloader_sizes[] = { | |||
157 | [MODEL_E200V2] = sizeof(dualboot_e200v2), | 161 | [MODEL_E200V2] = sizeof(dualboot_e200v2), |
158 | [MODEL_M200V4] = sizeof(dualboot_m200v4), | 162 | [MODEL_M200V4] = sizeof(dualboot_m200v4), |
159 | [MODEL_C200V2] = sizeof(dualboot_c200v2), | 163 | [MODEL_C200V2] = sizeof(dualboot_c200v2), |
164 | [MODEL_CLIPPLUS]= sizeof(dualboot_clipplus), | ||
160 | }; | 165 | }; |
161 | 166 | ||
162 | /* Model names used in the Rockbox header in ".sansa" files - these match the | 167 | /* Model names used in the Rockbox header in ".sansa" files - these match the |
@@ -168,6 +173,7 @@ static const char* rb_model_names[] = { | |||
168 | [MODEL_E200V2] = "e2v2", | 173 | [MODEL_E200V2] = "e2v2", |
169 | [MODEL_M200V4] = "m2v4", | 174 | [MODEL_M200V4] = "m2v4", |
170 | [MODEL_C200V2] = "c2v2", | 175 | [MODEL_C200V2] = "c2v2", |
176 | [MODEL_CLIPPLUS]= "cli+", | ||
171 | }; | 177 | }; |
172 | 178 | ||
173 | /* Model numbers used to initialise the checksum in the Rockbox header in | 179 | /* Model numbers used to initialise the checksum in the Rockbox header in |
@@ -178,7 +184,8 @@ static const int rb_model_num[] = { | |||
178 | [MODEL_CLIPV2] = 60, | 184 | [MODEL_CLIPV2] = 60, |
179 | [MODEL_E200V2] = 41, | 185 | [MODEL_E200V2] = 41, |
180 | [MODEL_M200V4] = 42, | 186 | [MODEL_M200V4] = 42, |
181 | [MODEL_C200V2] = 44 | 187 | [MODEL_C200V2] = 44, |
188 | [MODEL_CLIPPLUS]= 66, | ||
182 | }; | 189 | }; |
183 | 190 | ||
184 | /* Checksums of unmodified original firmwares - for safety, and device | 191 | /* Checksums of unmodified original firmwares - for safety, and device |
@@ -212,7 +219,11 @@ static struct md5sums sansasums[] = { | |||
212 | { MODEL_CLIP, "1.01.32", "d835d12342500732ffb9c4ee54abec15" }, | 219 | { MODEL_CLIP, "1.01.32", "d835d12342500732ffb9c4ee54abec15" }, |
213 | 220 | ||
214 | { MODEL_CLIPV2, "2.01.16", "c57fb3fcbe07c2c9b360f060938f80cb" }, | 221 | { MODEL_CLIPV2, "2.01.16", "c57fb3fcbe07c2c9b360f060938f80cb" }, |
215 | { MODEL_CLIPV2, "2.01.32", "0ad3723e52022509089d938d0fbbf8c5" } | 222 | { MODEL_CLIPV2, "2.01.32", "0ad3723e52022509089d938d0fbbf8c5" }, |
223 | |||
224 | #if 0 /* uncomment when Clip+ support is tested */ | ||
225 | { MODEL_CLIPPLUS, "01.02.09", "656d38114774c2001dc18e6726df3c5d" }, | ||
226 | #endif | ||
216 | }; | 227 | }; |
217 | 228 | ||
218 | #define NUM_MD5S (sizeof(sansasums)/sizeof(sansasums[0])) | 229 | #define NUM_MD5S (sizeof(sansasums)/sizeof(sansasums[0])) |
@@ -293,6 +304,8 @@ static int get_model(int model_id) | |||
293 | return MODEL_M200V4; | 304 | return MODEL_M200V4; |
294 | case 0x27: | 305 | case 0x27: |
295 | return MODEL_CLIPV2; | 306 | return MODEL_CLIPV2; |
307 | case 0x28: | ||
308 | return MODEL_CLIPPLUS; | ||
296 | } | 309 | } |
297 | 310 | ||
298 | return MODEL_UNKNOWN; | 311 | return MODEL_UNKNOWN; |