summaryrefslogtreecommitdiff
path: root/rbutil/mkamsboot/mkamsboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/mkamsboot/mkamsboot.c')
-rw-r--r--rbutil/mkamsboot/mkamsboot.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/rbutil/mkamsboot/mkamsboot.c b/rbutil/mkamsboot/mkamsboot.c
index 12c4f10335..a7f6ad65b1 100644
--- a/rbutil/mkamsboot/mkamsboot.c
+++ b/rbutil/mkamsboot/mkamsboot.c
@@ -93,6 +93,7 @@ execution to the uncompressed firmware.
93#include "dualboot_e200v2.h" 93#include "dualboot_e200v2.h"
94#include "dualboot_fuze.h" 94#include "dualboot_fuze.h"
95#include "dualboot_m200v4.h" 95#include "dualboot_m200v4.h"
96#include "dualboot_c200v2.h"
96 97
97/* Win32 compatibility */ 98/* Win32 compatibility */
98#ifndef O_BINARY 99#ifndef O_BINARY
@@ -109,9 +110,9 @@ enum
109 MODEL_FUZE = 0, 110 MODEL_FUZE = 0,
110 MODEL_CLIP, 111 MODEL_CLIP,
111 MODEL_CLIPV2, 112 MODEL_CLIPV2,
112 MODEL_E200, 113 MODEL_E200V2,
113 MODEL_M200, 114 MODEL_M200V4,
114 MODEL_C200 115 MODEL_C200V2,
115}; 116};
116 117
117static const char* model_names[] = 118static const char* model_names[] =
@@ -119,9 +120,9 @@ static const char* model_names[] =
119 "Fuze", 120 "Fuze",
120 "Clip", 121 "Clip",
121 "Clip V2", 122 "Clip V2",
122 "E200", 123 "e200 v2",
123 "M200", 124 "m200 v4",
124 "C200" 125 "c200 v2"
125}; 126};
126 127
127static const unsigned char* bootloaders[] = 128static const unsigned char* bootloaders[] =
@@ -131,7 +132,7 @@ static const unsigned char* bootloaders[] =
131 NULL, 132 NULL,
132 dualboot_e200v2, 133 dualboot_e200v2,
133 dualboot_m200v4, 134 dualboot_m200v4,
134 NULL 135 dualboot_c200v2,
135}; 136};
136 137
137static const int bootloader_sizes[] = 138static const int bootloader_sizes[] =
@@ -141,7 +142,7 @@ static const int bootloader_sizes[] =
141 0, 142 0,
142 sizeof(dualboot_e200v2), 143 sizeof(dualboot_e200v2),
143 sizeof(dualboot_m200v4), 144 sizeof(dualboot_m200v4),
144 0 145 sizeof(dualboot_c200v2),
145}; 146};
146 147
147/* Model names used in the Rockbox header in ".sansa" files - these match the 148/* Model names used in the Rockbox header in ".sansa" files - these match the
@@ -152,8 +153,8 @@ static const char* rb_model_names[] =
152 "clip", 153 "clip",
153 NULL, 154 NULL,
154 "e2v2", 155 "e2v2",
155 "m2v2", 156 "m2v4",
156 NULL 157 "c2v2",
157}; 158};
158 159
159/* Model numbers used to initialise the checksum in the Rockbox header in 160/* Model numbers used to initialise the checksum in the Rockbox header in
@@ -165,7 +166,7 @@ static const int rb_model_num[] =
165 0, 166 0,
166 41, 167 41,
167 42, 168 42,
168 0 169 44
169}; 170};
170 171
171struct md5sums { 172struct md5sums {
@@ -180,19 +181,19 @@ struct md5sums {
180static struct md5sums sansasums[] = { 181static struct md5sums sansasums[] = {
181 /* NOTE: Different regional versions of the firmware normally only 182 /* NOTE: Different regional versions of the firmware normally only
182 differ in the filename - the md5sums are identical */ 183 differ in the filename - the md5sums are identical */
183 { MODEL_E200, "3.01.11", 1, "e622ca8cb6df423f54b8b39628a1f0a3" }, 184 { MODEL_E200V2, "3.01.11", 1, "e622ca8cb6df423f54b8b39628a1f0a3" },
184 { MODEL_E200, "3.01.14", 1, "2c1d0383fc3584b2cc83ba8cc2243af6" }, 185 { MODEL_E200V2, "3.01.14", 1, "2c1d0383fc3584b2cc83ba8cc2243af6" },
185 { MODEL_E200, "3.01.16", 1, "12563ad71b25a1034cf2092d1e0218c4" }, 186 { MODEL_E200V2, "3.01.16", 1, "12563ad71b25a1034cf2092d1e0218c4" },
186 187
187 { MODEL_FUZE, "1.01.11", 1, "cac8ffa03c599330ac02c4d41de66166" }, 188 { MODEL_FUZE, "1.01.11", 1, "cac8ffa03c599330ac02c4d41de66166" },
188 { MODEL_FUZE, "1.01.15", 1, "df0e2c1612727f722c19a3c764cff7f2" }, 189 { MODEL_FUZE, "1.01.15", 1, "df0e2c1612727f722c19a3c764cff7f2" },
189 { MODEL_FUZE, "1.01.22", 1, "5aff5486fe8dd64239cc71eac470af98" }, 190 { MODEL_FUZE, "1.01.22", 1, "5aff5486fe8dd64239cc71eac470af98" },
190 191
191 { MODEL_C200, "3.02.05", 1, "b6378ebd720b0ade3fad4dc7ab61c1a5" }, 192 { MODEL_C200V2, "3.02.05", 1, "b6378ebd720b0ade3fad4dc7ab61c1a5" },
192 193
193 { MODEL_M200, "4.00.45", 1, "82e3194310d1514e3bbcd06e84c4add3" }, 194 { MODEL_M200V4, "4.00.45", 1, "82e3194310d1514e3bbcd06e84c4add3" },
194 { MODEL_M200, "4.01.08-A", 1, "fc9dd6116001b3e6a150b898f1b091f0" }, 195 { MODEL_M200V4, "4.01.08-A", 1, "fc9dd6116001b3e6a150b898f1b091f0" },
195 { MODEL_M200, "4.01.08-E", 1, "d3fb7d8ec8624ee65bc99f8dab0e2369" }, 196 { MODEL_M200V4, "4.01.08-E", 1, "d3fb7d8ec8624ee65bc99f8dab0e2369" },
196 197
197 { MODEL_CLIP, "1.01.17", 1, "12caad785d506219d73f538772afd99e" }, 198 { MODEL_CLIP, "1.01.17", 1, "12caad785d506219d73f538772afd99e" },
198 { MODEL_CLIP, "1.01.18", 1, "d720b266bd5afa38a198986ef0508a45" }, 199 { MODEL_CLIP, "1.01.18", 1, "d720b266bd5afa38a198986ef0508a45" },
@@ -267,11 +268,11 @@ static int get_model(int model_id)
267 case 0x22: 268 case 0x22:
268 return MODEL_CLIP; 269 return MODEL_CLIP;
269 case 0x23: 270 case 0x23:
270 return MODEL_C200; 271 return MODEL_C200V2;
271 case 0x24: 272 case 0x24:
272 return MODEL_E200; 273 return MODEL_E200V2;
273 case 0x25: 274 case 0x25:
274 return MODEL_M200; 275 return MODEL_M200V4;
275 case 0x27: 276 case 0x27:
276 return MODEL_CLIPV2; 277 return MODEL_CLIPV2;
277 } 278 }