diff options
38 files changed, 5118 insertions, 0 deletions
diff --git a/utils/nwztools/database/README b/utils/nwztools/database/README new file mode 100644 index 0000000000..62d5ca66e8 --- /dev/null +++ b/utils/nwztools/database/README | |||
@@ -0,0 +1,62 @@ | |||
1 | This file explains how the database was created an how to update it. | ||
2 | |||
3 | Model list | ||
4 | ========== | ||
5 | |||
6 | The model list (models.txt) was extract from Sony's mptapp on target. This is | ||
7 | most probably the only reliable way of getting model IDs. It cannot be done | ||
8 | automatically but it is easy to locate the list using a tool like IDA. It is | ||
9 | basically a long list of the following structure: | ||
10 | struct model_info_t | ||
11 | { | ||
12 | const char *name; | ||
13 | uin32_t mid; | ||
14 | }; | ||
15 | Once identified, it is easy to copy it to a file and grep/sed/awk it to produce | ||
16 | the textual list. It depends on which tool you use. I decided to keep this list | ||
17 | because it is an easy format to produce and parse. For consistency, I decided | ||
18 | to use upper case for the model name and lower case for mid. Keep this when | ||
19 | you modify the list to keep the diff minimal. | ||
20 | |||
21 | IMPORTANT NOTE: some players have more than one model ID (ie same name) !! | ||
22 | |||
23 | FORMAT (models.txt): list of pairs <mid>,<name> where <name> is upper case | ||
24 | human name of the player and <mid> is the lower-case hex value of the model ID. | ||
25 | |||
26 | Series list | ||
27 | =========== | ||
28 | |||
29 | The original series list was semi-automatically generated. Unfortunately, Sony | ||
30 | does not use a 100% regular naming scheme. It is thus simpler to modify it by | ||
31 | hand for newer models. To keep consistency, the generator script will make sure | ||
32 | that the series list only refers to device in the model list and that no device | ||
33 | in the model list is not refered to. | ||
34 | |||
35 | FORMAT (series.txt): list of <codename>,<name>,<mid1>,<mid2>,... where <codename> | ||
36 | is the (Rockbox-only) codename of the series (that should match what other tools | ||
37 | use, like upgtools), always in lower case; where <name> is the humand name of the | ||
38 | series, and <midX> is the list of models in the series (given by model IDs because | ||
39 | name are not uniques). | ||
40 | |||
41 | Advise on tooling | ||
42 | ================= | ||
43 | |||
44 | The format of the file was carefully chosen to be easy to use and produce. It | ||
45 | avoids uses spaces are separators because it breaks easily. The "," separator | ||
46 | is a good match in this case and shouldn't pose a problem. In most tools, changing | ||
47 | the separator is easy. For example with awk, you can use the | ||
48 | -F "," | ||
49 | option, or define in the preamble with | ||
50 | BEGIN { FS = ","; } | ||
51 | . Other tools have similar constructs. | ||
52 | |||
53 | NVPs | ||
54 | ==== | ||
55 | |||
56 | See nvps/README | ||
57 | |||
58 | gen_db.py | ||
59 | ========= | ||
60 | |||
61 | This script generates the database (nwz_db.{c,h}) from the various textual files. | ||
62 | The output must NOT be touched by hand. | ||
diff --git a/utils/nwztools/database/check_models_series.sh b/utils/nwztools/database/check_models_series.sh new file mode 100755 index 0000000000..50d574ff66 --- /dev/null +++ b/utils/nwztools/database/check_models_series.sh | |||
@@ -0,0 +1,8 @@ | |||
1 | echo "duplicates in models.txt:" | ||
2 | MODELS=$(cat models.txt | awk -F ',' '{ print($1) }' | sort) | ||
3 | echo "$MODELS" | uniq -d | ||
4 | echo "duplicates in series.txt:" | ||
5 | SERIES_MODELS=$(cat series.txt | awk '{ n=split($0,a,","); for(i=3;i<=n;i++) if(length(a[i]) != 0) print(a[i]); }' | sort) | ||
6 | echo "$SERIES_MODELS" | uniq -d | ||
7 | echo "diff between models.txt and series.txt:" | ||
8 | diff <(echo "$MODELS") <(echo "$SERIES_MODELS") | ||
diff --git a/utils/nwztools/database/gen_db.py b/utils/nwztools/database/gen_db.py new file mode 100755 index 0000000000..61c08f919a --- /dev/null +++ b/utils/nwztools/database/gen_db.py | |||
@@ -0,0 +1,317 @@ | |||
1 | #!/usr/bin/python3 | ||
2 | import glob | ||
3 | import os | ||
4 | import re | ||
5 | import subprocess | ||
6 | |||
7 | # parse models.txt | ||
8 | g_models = [] | ||
9 | with open('models.txt') as fp: | ||
10 | for line in fp: | ||
11 | # we unpack and repack 1) to make the format obvious 2) to catch errors | ||
12 | mid,name = line.rstrip().split(",") | ||
13 | g_models.append({'mid': int(mid, 0), 'name': name}) | ||
14 | # parse series.txt | ||
15 | g_series = [] | ||
16 | with open('series.txt') as fp: | ||
17 | for line in fp: | ||
18 | # we unpack and repack 1) to make the format obvious 2) to catch errors | ||
19 | arr = line.rstrip().split(",") | ||
20 | codename = arr[0] | ||
21 | name = arr[1] | ||
22 | models = arr[2:] | ||
23 | # handle empty list | ||
24 | if len(models) == 1 and models[0] == "": | ||
25 | models = [] | ||
26 | models = [int(mid,0) for mid in models] | ||
27 | g_series.append({'codename': codename, 'name': name, 'models': models}) | ||
28 | # parse all maps in nvp/ | ||
29 | # since most nvps are the same, what we actually do is to compute the md5sum hash | ||
30 | # of all files, to identify groups and then each entry in the name is in fact the | ||
31 | # hash, and we only parse one file per hash group | ||
32 | g_hash_nvp = dict() # hash -> nvp | ||
33 | g_nvp_hash = dict() # codename -> hash | ||
34 | HASH_SIZE=6 | ||
35 | map_files = glob.glob('nvp/nw*.txt') | ||
36 | for line in subprocess.run(["md5sum"] + map_files, stdout = subprocess.PIPE).stdout.decode("utf-8").split("\n"): | ||
37 | if len(line.rstrip()) == 0: | ||
38 | continue | ||
39 | hash, file = line.rstrip().split() | ||
40 | codename = re.search('nvp/(.*)\.txt', file).group(1) | ||
41 | hash = hash[:HASH_SIZE] | ||
42 | # only keep one file | ||
43 | if not (hash in g_hash_nvp): | ||
44 | g_hash_nvp[hash] = set() | ||
45 | g_hash_nvp[hash].add(codename); | ||
46 | g_nvp_hash[codename] = hash | ||
47 | # we have some file nodes (nodes-*) but not necessarily for all series | ||
48 | # so for each hash group, try to find at least one | ||
49 | for hash in g_hash_nvp: | ||
50 | # look at all codename and see if we can find one with a node file | ||
51 | node_codename = "" | ||
52 | for codename in g_hash_nvp[hash]: | ||
53 | if os.path.isfile("nvp/nodes-%s.txt" % codename): | ||
54 | node_codename = codename | ||
55 | break | ||
56 | # if we didn't find one, we just keep the first one | ||
57 | # otherwise keep the one we found | ||
58 | if node_codename == "": | ||
59 | node_codename = g_hash_nvp[hash].pop() | ||
60 | g_hash_nvp[hash] = node_codename | ||
61 | # for each entry in g_hash_nvp, replace the file name by the actual table | ||
62 | # that we parse, and compute all nvp names at the same time | ||
63 | g_nvp_names = set() # set of all nvp names | ||
64 | g_nvp_desc = dict() # name -> set of all description of a node | ||
65 | g_nvp_size = dict() # name -> set of all possible sizes of a node | ||
66 | for hash in g_hash_nvp: | ||
67 | codename = g_hash_nvp[hash] | ||
68 | # extract codename from file | ||
69 | # parse file | ||
70 | map = dict() | ||
71 | with open("nvp/%s.txt" % codename) as fp: | ||
72 | for line in fp: | ||
73 | # we unpack and repack 1) to make the format obvious 2) to catch errors | ||
74 | name,index = line.rstrip().split(",") | ||
75 | # convert node to integer but be careful of leading 0 (ie 010 is actually | ||
76 | # 10 in decimal, it is not in octal) | ||
77 | index = int(index, 10) | ||
78 | map[index] = name | ||
79 | g_nvp_names.add(name) | ||
80 | # parse node map if any | ||
81 | node_map = dict() | ||
82 | if os.path.isfile("nvp/nodes-%s.txt" % codename): | ||
83 | with open("nvp/nodes-%s.txt" % codename) as fp: | ||
84 | for line in fp: | ||
85 | # we unpack and repack 1) to make the format obvious 2) to catch errors | ||
86 | index,size,desc = line.rstrip().split(",") | ||
87 | # convert node to integer but be careful of leading 0 (ie 010 is actually | ||
88 | # 10 in decimal, it is not in octal) | ||
89 | index = int(index, 10) | ||
90 | desc = desc.rstrip() | ||
91 | node_map[index] = {'size': size, 'desc': desc} | ||
92 | # compute final nvp | ||
93 | nvp = dict() | ||
94 | for index in map: | ||
95 | size = 0 | ||
96 | desc = "" | ||
97 | name = map[index] | ||
98 | if index in node_map: | ||
99 | size = node_map[index]["size"] | ||
100 | desc = node_map[index]["desc"] | ||
101 | nvp[name] = index | ||
102 | if not (name in g_nvp_desc): | ||
103 | g_nvp_desc[name] = set() | ||
104 | if len(desc) != 0: | ||
105 | g_nvp_desc[name].add(desc) | ||
106 | if not (name in g_nvp_size): | ||
107 | g_nvp_size[name] = set() | ||
108 | if size != 0: | ||
109 | g_nvp_size[name].add(size) | ||
110 | g_hash_nvp[hash] = nvp | ||
111 | |||
112 | # | ||
113 | # generate header | ||
114 | # | ||
115 | header_begin = \ | ||
116 | """\ | ||
117 | /*************************************************************************** | ||
118 | * __________ __ ___. | ||
119 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
120 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
121 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
122 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \\ | ||
123 | * \/ \/ \/ \/ \/ | ||
124 | * | ||
125 | * Copyright (C) 2016 Amaury Pouly | ||
126 | * | ||
127 | * This program is free software; you can redistribute it and/or | ||
128 | * modify it under the terms of the GNU General Public License | ||
129 | * as published by the Free Software Foundation; either version 2 | ||
130 | * of the License, or (at your option) any later version. | ||
131 | * | ||
132 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
133 | * KIND, either express or implied. | ||
134 | * | ||
135 | ****************************************************************************/ | ||
136 | #ifndef __NWZ_DB_H__ | ||
137 | #define __NWZ_DB_H__ | ||
138 | |||
139 | /** /!\ This file was automatically generated, DO NOT MODIFY IT DIRECTLY /!\ */ | ||
140 | |||
141 | /* List of all known NVP nodes */ | ||
142 | enum nwz_nvp_node_t | ||
143 | { | ||
144 | """ | ||
145 | |||
146 | header_end = \ | ||
147 | """\ | ||
148 | NWZ_NVP_COUNT /* Number of nvp nodes */ | ||
149 | }; | ||
150 | |||
151 | /* Invalid NVP index */ | ||
152 | #define NWZ_NVP_INVALID -1 /* Non-existent entry */ | ||
153 | /* Number of models */ | ||
154 | #define NWZ_MODEL_COUNT %s | ||
155 | /* Number of series */ | ||
156 | #define NWZ_SERIES_COUNT %s | ||
157 | |||
158 | /* NVP node info */ | ||
159 | struct nwz_nvp_info_t | ||
160 | { | ||
161 | const char *name; /* Sony's name: "bti" */ | ||
162 | unsigned long size; /* Size in bytes */ | ||
163 | const char *desc; /* Description: "bootloader image" */ | ||
164 | }; | ||
165 | |||
166 | /* NVP index map (nwz_nvp_node_t -> index) */ | ||
167 | typedef int nwz_nvp_index_t[NWZ_NVP_COUNT]; | ||
168 | |||
169 | /* Model info */ | ||
170 | struct nwz_model_info_t | ||
171 | { | ||
172 | unsigned long mid; /* Model ID: first 4 bytes of the NVP mid entry */ | ||
173 | const char *name; /* Human name: "NWZ-E463" */ | ||
174 | }; | ||
175 | |||
176 | /* Series info */ | ||
177 | struct nwz_series_info_t | ||
178 | { | ||
179 | const char *codename; /* Rockbox codename: nwz-e460 */ | ||
180 | const char *name; /* Human name: "NWZ-E460 Series" */ | ||
181 | int mid_count; /* number of entries in mid_list */ | ||
182 | unsigned long *mid; /* List of model IDs */ | ||
183 | /* Pointer to a name -> index map, nonexistent entries map to NWZ_NVP_INVALID */ | ||
184 | nwz_nvp_index_t *nvp_index; | ||
185 | }; | ||
186 | |||
187 | /* List of all NVP entries, indexed by nwz_nvp_node_t */ | ||
188 | extern struct nwz_nvp_info_t nwz_nvp[NWZ_NVP_COUNT]; | ||
189 | /* List of all models, sorted by increasing values of model ID */ | ||
190 | extern struct nwz_model_info_t nwz_model[NWZ_MODEL_COUNT]; | ||
191 | /* List of all series */ | ||
192 | extern struct nwz_series_info_t nwz_series[NWZ_SERIES_COUNT]; | ||
193 | |||
194 | #endif /* __NWZ_DB_H__ */ | ||
195 | """ | ||
196 | |||
197 | with open("nwz_db.h", "w") as fp: | ||
198 | fp.write(header_begin) | ||
199 | # generate list of all nvp nodes | ||
200 | for name in sorted(g_nvp_names): | ||
201 | # create comment to explain the meaning, gather several meaning together | ||
202 | # if there are more than one | ||
203 | explain = "" | ||
204 | if name in g_nvp_desc: | ||
205 | explain = " | ".join(list(g_nvp_desc[name])) | ||
206 | # overwrite desc set with a single string for later | ||
207 | g_nvp_desc[name] = explain | ||
208 | fp.write(" NWZ_NVP_%s, /* %s */\n" % (name.upper(), explain)) | ||
209 | fp.write(header_end % (len(g_models), len(g_series))) | ||
210 | |||
211 | # | ||
212 | # generate tables | ||
213 | # | ||
214 | impl_begin = \ | ||
215 | """\ | ||
216 | /*************************************************************************** | ||
217 | * __________ __ ___. | ||
218 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
219 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
220 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
221 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \\ | ||
222 | * \/ \/ \/ \/ \/ | ||
223 | * | ||
224 | * Copyright (C) 2016 Amaury Pouly | ||
225 | * | ||
226 | * This program is free software; you can redistribute it and/or | ||
227 | * modify it under the terms of the GNU General Public License | ||
228 | * as published by the Free Software Foundation; either version 2 | ||
229 | * of the License, or (at your option) any later version. | ||
230 | * | ||
231 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
232 | * KIND, either express or implied. | ||
233 | * | ||
234 | ****************************************************************************/ | ||
235 | |||
236 | /** /!\ This file was automatically generated, DO NOT MODIFY IT DIRECTLY /!\ */ | ||
237 | |||
238 | #include "nwz_db.h" | ||
239 | |||
240 | struct nwz_model_info_t nwz_model[NWZ_MODEL_COUNT] = | ||
241 | { | ||
242 | """ | ||
243 | |||
244 | def by_mid(model): | ||
245 | return model["mid"] | ||
246 | |||
247 | def by_name(nvp_entry): | ||
248 | return nvp_entry["name"] | ||
249 | |||
250 | def codename_to_c(codename): | ||
251 | return re.sub('[^a-zA-Z0-9]', '_', codename, 0) | ||
252 | |||
253 | with open("nwz_db.c", "w") as fp: | ||
254 | fp.write(impl_begin) | ||
255 | # generate model list (sort by mid) | ||
256 | for model in sorted(g_models, key = by_mid): | ||
257 | fp.write(" { %s, \"%s\" },\n" % (hex(model["mid"]), model["name"])) | ||
258 | fp.write("};\n") | ||
259 | # generate nvps | ||
260 | for hash in g_hash_nvp: | ||
261 | nvp = g_hash_nvp[hash] | ||
262 | fp.write("\nstatic int nvp_index_%s[NWZ_NVP_COUNT] =\n" % hash) | ||
263 | fp.write("{\n") | ||
264 | for name in sorted(g_nvp_names): | ||
265 | index = "NWZ_NVP_INVALID" | ||
266 | if name in nvp: | ||
267 | index = nvp[name] | ||
268 | fp.write(" [NWZ_NVP_%s] = %s,\n" % (name.upper(), index)) | ||
269 | fp.write("};\n") | ||
270 | # generate nvp info | ||
271 | fp.write("\nstruct nwz_nvp_info_t nwz_nvp[NWZ_NVP_COUNT] =\n") | ||
272 | fp.write("{\n") | ||
273 | for name in sorted(g_nvp_names): | ||
274 | size = 0 | ||
275 | if name in g_nvp_size: | ||
276 | size_set = g_nvp_size[name] | ||
277 | if len(size_set) == 0: | ||
278 | size = 0 | ||
279 | elif len(size_set) == 1: | ||
280 | size = next(iter(size_set)) | ||
281 | else: | ||
282 | print("Warning: nvp node \"%s\" has several possible sizes: %s" | ||
283 | % (name, size_set)) | ||
284 | size = 0 | ||
285 | desc = "" | ||
286 | if name in g_nvp_desc: | ||
287 | desc = g_nvp_desc[name] | ||
288 | fp.write(" [NWZ_NVP_%s] = { \"%s\", %s, \"%s\" },\n" % (name.upper(), | ||
289 | name, size, desc)) | ||
290 | fp.write("};\n") | ||
291 | # generate list of models for each series | ||
292 | for series in g_series: | ||
293 | c_codename = codename_to_c(series["codename"]) | ||
294 | list = [hex(mid) for mid in series["models"]] | ||
295 | limit = 3 | ||
296 | c_list = "" | ||
297 | while len(list) != 0: | ||
298 | if len(list) <= limit: | ||
299 | c_list = c_list + ", ".join(list) | ||
300 | list = [] | ||
301 | else: | ||
302 | c_list = c_list + ", ".join(list[:limit]) + ",\n " | ||
303 | list = list[limit:] | ||
304 | limit = 6 | ||
305 | fp.write("\nstatic unsigned long models_%s[] = { %s };\n" % (c_codename, c_list)) | ||
306 | # generate series list | ||
307 | fp.write("\nstruct nwz_series_info_t nwz_series[NWZ_SERIES_COUNT] =\n{\n") | ||
308 | for series in g_series: | ||
309 | name = series["name"] | ||
310 | codename = series["codename"] | ||
311 | c_codename = codename_to_c(codename) | ||
312 | nvp = "0" | ||
313 | if codename in g_nvp_hash: | ||
314 | nvp = "&nvp_index_%s" % g_nvp_hash[codename] | ||
315 | fp.write(" { \"%s\", \"%s\", %s, models_%s, %s },\n" % (codename, | ||
316 | name, len(series["models"]), c_codename, nvp)) | ||
317 | fp.write("};\n") | ||
diff --git a/utils/nwztools/database/models.txt b/utils/nwztools/database/models.txt new file mode 100644 index 0000000000..89a372f1bd --- /dev/null +++ b/utils/nwztools/database/models.txt | |||
@@ -0,0 +1,181 @@ | |||
1 | 0x10000,NWZ-A815 | ||
2 | 0x10001,NWZ-A816 | ||
3 | 0x10002,NWZ-A818 | ||
4 | 0x1000000,NW-S615F | ||
5 | 0x1000001,NW-S616F | ||
6 | 0x1010000,NW-S715F | ||
7 | 0x1010001,NW-S716F | ||
8 | 0x1010002,NW-S718F | ||
9 | 0x1020000,NWZ-S615F | ||
10 | 0x1020001,NWZ-S616F | ||
11 | 0x1020002,NWZ-S618F | ||
12 | 0x1030000,NWZ-S515 | ||
13 | 0x1030001,NWZ-S516 | ||
14 | 0x1040000,NWZ-S715F | ||
15 | 0x1040001,NWZ-S716F | ||
16 | 0x1040002,NWZ-S718F | ||
17 | 0x2000001,NW-A916 | ||
18 | 0x2000002,NW-A918 | ||
19 | 0x2000004,NW-A919 | ||
20 | 0x3000001,NWZ-A826 | ||
21 | 0x3000002,NWZ-A828 | ||
22 | 0x3000004,NWZ-A829 | ||
23 | 0x3010001,NW-A826 | ||
24 | 0x3010002,NW-A828 | ||
25 | 0x3010004,NW-A829 | ||
26 | 0x3020001,NWZ-A726B | ||
27 | 0x3020002,NWZ-A728B | ||
28 | 0x3020004,NWZ-A729B | ||
29 | 0x3030001,NWZ-A726 | ||
30 | 0x3030002,NWZ-A728 | ||
31 | 0x3030004,NWZ-A729 | ||
32 | 0x4000001,NW-S636F | ||
33 | 0x4000002,NW-S638F | ||
34 | 0x4000004,NW-S639F | ||
35 | 0x4010001,NW-S736F | ||
36 | 0x4010002,NW-S738F | ||
37 | 0x4010004,NW-S739F | ||
38 | 0x4020001,NWZ-S636F | ||
39 | 0x4020002,NWZ-S638F | ||
40 | 0x4020004,NWZ-S639F | ||
41 | 0x4030001,NWZ-S736F | ||
42 | 0x4030002,NWZ-S738F | ||
43 | 0x4030004,NWZ-S739F | ||
44 | 0x5000002,NW-X1040 | ||
45 | 0x5000004,NW-X1050 | ||
46 | 0x5000005,NW-X1060 | ||
47 | 0x5010002,NWZ-NONAME | ||
48 | 0x5010004,NWZ-NONAME | ||
49 | 0x5010005,NWZ-NONAME | ||
50 | 0x5020002,NWZ-X1040 | ||
51 | 0x5020004,NWZ-X1050 | ||
52 | 0x5020005,NWZ-X1060 | ||
53 | 0x5040002,NWZ-X1041 | ||
54 | 0x5040004,NWZ-X1051 | ||
55 | 0x5040005,NWZ-X1061 | ||
56 | 0x6010002,NW-S644 | ||
57 | 0x6010004,NW-S645 | ||
58 | 0x6010005,NW-S646 | ||
59 | 0x6020002,NWZ-S744 | ||
60 | 0x6020004,NWZ-S745 | ||
61 | 0x6020005,NWZ-S746 | ||
62 | 0x6030002,NW-S744 | ||
63 | 0x6030004,NW-S745 | ||
64 | 0x6030005,NW-S746 | ||
65 | 0x7000004,NWZ-A845 | ||
66 | 0x7000005,NWZ-A846 | ||
67 | 0x7000006,NWZ-A847 | ||
68 | 0x7010004,NW-A845 | ||
69 | 0x7010005,NW-A846 | ||
70 | 0x7010006,NW-A847 | ||
71 | 0x9000002,NW-S754 | ||
72 | 0x9000004,NW-S755 | ||
73 | 0x9000005,NW-S756 | ||
74 | 0x8000000,NW-E052 | ||
75 | 0x8000001,NW-E053 | ||
76 | 0x8000002,NW-E054 | ||
77 | 0xb000001,NWZ-E453 | ||
78 | 0xb000002,NWZ-E454 | ||
79 | 0xb000004,NWZ-E455 | ||
80 | 0xc000001,NWZ-E353 | ||
81 | 0xc000002,NWZ-E354 | ||
82 | 0xc000004,NWZ-E355 | ||
83 | 0xd000001,NWZ-E553 | ||
84 | 0xd000002,NWZ-E554 | ||
85 | 0xd000004,NWZ-E555 | ||
86 | 0xd000005,NWZ-E556 | ||
87 | 0xe000004,NWZ-A855 | ||
88 | 0xe000005,NWZ-A856 | ||
89 | 0xe000006,NWZ-A857 | ||
90 | 0xf000002,NWZ-S754 | ||
91 | 0xf000004,NWZ-S755 | ||
92 | 0x10000000,NWZ-E052 | ||
93 | 0x10000001,NWZ-E053 | ||
94 | 0x11000001,NW-A863 | ||
95 | 0x11000002,NW-A864 | ||
96 | 0x11000004,NW-A865 | ||
97 | 0x11000005,NW-A866 | ||
98 | 0x11000006,NW-A867 | ||
99 | 0x11010001,NWZ-A863 | ||
100 | 0x11010002,NWZ-A864 | ||
101 | 0x11010004,NWZ-A865 | ||
102 | 0x11010005,NWZ-A866 | ||
103 | 0x11010006,NWZ-A867 | ||
104 | 0x11020001,NWZ-A863 | ||
105 | 0x11020002,NWZ-A864 | ||
106 | 0x11020004,NWZ-A865 | ||
107 | 0x11020005,NWZ-A866 | ||
108 | 0x11020006,NWZ-A867 | ||
109 | 0x12000001,NW-S763 | ||
110 | 0x12000002,NW-S764 | ||
111 | 0x12000004,NW-S765 | ||
112 | 0x12000005,NW-S766 | ||
113 | 0x12000006,NW-S767 | ||
114 | 0x12010001,NWZ-S763 | ||
115 | 0x12010002,NWZ-S764 | ||
116 | 0x12010004,NWZ-S765 | ||
117 | 0x12010005,NWZ-S766 | ||
118 | 0x12010006,NWZ-S767 | ||
119 | 0x13000001,NWZ-E463 | ||
120 | 0x13000002,NWZ-E464 | ||
121 | 0x13000004,NWZ-E465 | ||
122 | 0x14000000,NW-E062 | ||
123 | 0x14000001,NW-E063 | ||
124 | 0x14000002,NW-E064 | ||
125 | 0x14000004,NW-E065 | ||
126 | 0x14000005,NW-E066 | ||
127 | 0x15000001,NWZ-E473 | ||
128 | 0x15000002,NWZ-E474 | ||
129 | 0x15000004,NWZ-E475 | ||
130 | 0x15000005,NWZ-E476 | ||
131 | 0x15010001,NWZ-E573 | ||
132 | 0x15010002,NWZ-E574 | ||
133 | 0x15010004,NWZ-E575 | ||
134 | 0x15010005,NWZ-E576 | ||
135 | 0x16000001,NW-S773 | ||
136 | 0x16000002,NW-S774 | ||
137 | 0x16000004,NW-S775 | ||
138 | 0x16000005,NW-S776 | ||
139 | 0x16010001,NWZ-S773 | ||
140 | 0x16010002,NWZ-S774 | ||
141 | 0x16010004,NWZ-S775 | ||
142 | 0x16010005,NWZ-S776 | ||
143 | 0x19000001,NW-S783 | ||
144 | 0x19000002,NW-S784 | ||
145 | 0x19000004,NW-S785 | ||
146 | 0x19000005,NW-S786 | ||
147 | 0x19010001,NW-E083 | ||
148 | 0x19010002,NW-E084 | ||
149 | 0x19010004,NW-E085 | ||
150 | 0x19010005,NW-E086 | ||
151 | 0x19020001,NWZ-E583 | ||
152 | 0x19020002,NWZ-E584 | ||
153 | 0x19020004,NWZ-E585 | ||
154 | 0x19020005,NWZ-E586 | ||
155 | 0x1a000001,NW-A13 | ||
156 | 0x1a000002,NW-A14 | ||
157 | 0x1a000004,NW-A15 | ||
158 | 0x1a000005,NW-A16 | ||
159 | 0x1a000006,NW-A17 | ||
160 | 0x1a010001,NWZ-A13 | ||
161 | 0x1a010002,NWZ-A14 | ||
162 | 0x1a010004,NWZ-A15 | ||
163 | 0x1a010005,NWZ-A16 | ||
164 | 0x1a010006,NWZ-A17 | ||
165 | 0x1b000001,NW-S13 | ||
166 | 0x1b000002,NW-S14 | ||
167 | 0x1b000004,NW-S15 | ||
168 | 0x1b000005,NW-S16 | ||
169 | 0x1b000006,NW-S17 | ||
170 | 0x1c000001,NW-ZX103 | ||
171 | 0x1c000002,NW-ZX104 | ||
172 | 0x1c000004,NW-ZX105 | ||
173 | 0x1c000005,NW-ZX106 | ||
174 | 0x1c000006,NW-ZX107 | ||
175 | 0x1c000007,NW-ZX100 | ||
176 | 0x1d000001,NW-A23 | ||
177 | 0x1d000002,NW-A24 | ||
178 | 0x1d000004,NW-A25 | ||
179 | 0x1d000005,NW-A26 | ||
180 | 0x1d000006,NW-A27 | ||
181 | 0x1d000007,NW-A28 | ||
diff --git a/utils/nwztools/database/nvp/Makefile b/utils/nwztools/database/nvp/Makefile new file mode 100644 index 0000000000..d12bcb3451 --- /dev/null +++ b/utils/nwztools/database/nvp/Makefile | |||
@@ -0,0 +1,26 @@ | |||
1 | DEFINES= | ||
2 | CC=gcc | ||
3 | CXX=g++ | ||
4 | LD=g++ | ||
5 | PROFILE= | ||
6 | CFLAGS=-g $(PROFILE) -std=c99 -W -Wall $(DEFINES) `xml2-config --cflags` | ||
7 | CXXFLAGS=-g $(PROFILE) -W -Wall $(DEFINES) `xml2-config --cflags` | ||
8 | LDFLAGS=$(PROFILE) `xml2-config --libs` | ||
9 | BINS=nvptool | ||
10 | |||
11 | all: $(BINS) | ||
12 | |||
13 | %.o: %.c | ||
14 | $(CC) $(CFLAGS) -c -o $@ $< | ||
15 | |||
16 | %.o: %.cpp | ||
17 | $(CXX) $(CXXFLAGS) -c -o $@ $< | ||
18 | |||
19 | nvptool: nvptool.o | ||
20 | $(LD) -o $@ $^ $(LDFLAGS) | ||
21 | |||
22 | clean: | ||
23 | rm -fr *.o | ||
24 | |||
25 | veryclean: | ||
26 | rm -rf $(BINS) | ||
diff --git a/utils/nwztools/database/nvp/README b/utils/nwztools/database/nvp/README new file mode 100644 index 0000000000..cb403291c8 --- /dev/null +++ b/utils/nwztools/database/nvp/README | |||
@@ -0,0 +1,67 @@ | |||
1 | The NVP map varies a lot from players to players, it is inconceivable to build | ||
2 | it by hand. The approach taken is to extract it from the kernel of each player. | ||
3 | Since Sony provides the kernel of all players, it is 'only' a matter of | ||
4 | downloading all of them. A bit of back story on the NVP: it is non-volatile | ||
5 | area of the flash that is divided in regions and then "sectors" (unrelated to | ||
6 | hard drive sectors). Each "sector" stores the data of a "node". The ABI | ||
7 | between the NVP driver and the userspace is an index: the userspace gives the | ||
8 | index of a node, and then drives looksup its table to see where it is and what | ||
9 | is its size. The index map changes over time so Sony introduces standard "names" | ||
10 | for its entries, those are 3-letters acronym (for example "fup" or "bti" or "shp") | ||
11 | that have a corresponding index. For some reason, the driver also contains a | ||
12 | description of the nodes, in english (so "bti" stands for "boot image"). | ||
13 | |||
14 | parse_nvp_header.sh | ||
15 | =================== | ||
16 | |||
17 | This script is given a file name, a kernel directory or a kernel tgz and it will | ||
18 | try to extract the mapping automatically. It produces a list of pairs | ||
19 | <node>,<name> | ||
20 | where <node> is the index of the node (that's the only thing that is usable on | ||
21 | a running device) and <name> is the standard name of the node. Note that is | ||
22 | some kind of acronym (like 'fup') and the description needs to be generated | ||
23 | separatly (see other section). | ||
24 | |||
25 | parse_all_nvp_headers.sh | ||
26 | ======================== | ||
27 | |||
28 | This scripts expects a directory to have the following structure: | ||
29 | dir/ | ||
30 | nwz-a10/ | ||
31 | linux-kernel-*.tgz | ||
32 | nwz-e460/ | ||
33 | linxu-kernel-*.tgz | ||
34 | ... | ||
35 | Each sudirectory must the series name (as used in ../series.txt) and the kernel | ||
36 | must be a tgz (end in .tgz and not .tar.gz) of the form linux-kernel-*.tgz. Usually | ||
37 | the variable bit will be the version but some kernels have unknown versions. It | ||
38 | will then run parse_nvp_header.sh on each of them and store the result in a | ||
39 | file called <series name>.txt | ||
40 | |||
41 | NOTE: the kernel can be symlinks to other files | ||
42 | |||
43 | nvptool | ||
44 | ======= | ||
45 | |||
46 | The kernel headers do no contain the description of the nvp node names. | ||
47 | This one can be extract from the icx_nvp[_emmc].ko driver on target using complicated | ||
48 | elf parsing done by nvptool. Technically nvptoo can find much more information | ||
49 | like the node -> humanname mapping as well and the actual sector on the disk but | ||
50 | since we can already extract it easily from the headers, we only extract description | ||
51 | names from it. | ||
52 | |||
53 | parse_all_nvp_nodes.sh | ||
54 | ====================== | ||
55 | |||
56 | This scripts expects a directory to have the following structure: | ||
57 | dir/ | ||
58 | nwz-a10/ | ||
59 | rootfs.tgz | ||
60 | nwz-e460/ | ||
61 | rootfs.tgz | ||
62 | ... | ||
63 | Each sudirectory must the series name (as used in ../series.txt) and the rootfs | ||
64 | must be a tar. It will then extract the relevant icx_nvp driver from it and run | ||
65 | nvptool on it to produce a file called nodes-<series name>.txt | ||
66 | |||
67 | NOTE: the rootfs can be symlinks to other files | ||
diff --git a/utils/nwztools/database/nvp/nodes-nwz-a10.txt b/utils/nwztools/database/nvp/nodes-nwz-a10.txt new file mode 100644 index 0000000000..2beb185b6c --- /dev/null +++ b/utils/nwztools/database/nvp/nodes-nwz-a10.txt | |||
@@ -0,0 +1,89 @@ | |||
1 | 1,4,system information | ||
2 | 2,32,u-boot password | ||
3 | 3,4,firmware update flag | ||
4 | 4,4,beep ok flag | ||
5 | 5,4,hold mode | ||
6 | 6,16,rtc alarm | ||
7 | 7,64,model id | ||
8 | 8,5,product code | ||
9 | 9,16,serial number | ||
10 | 10,8,update file name | ||
11 | 11,64,key and signature | ||
12 | 12,32,ship information | ||
13 | 13,4,test mode flag | ||
14 | 14,4,getty mode flag | ||
15 | 15,16,fm parameter | ||
16 | 16,64,sound driver parameter | ||
17 | 17,64,noise cancel driver parameter | ||
18 | 18,512,bluetooth pskey | ||
19 | 77,4,wifi protected setup | ||
20 | 85,4,battery calibration | ||
21 | 19,2048,bluetooth parameter | ||
22 | 20,512,btmw factory pair info | ||
23 | 21,512,btmw factory scdb | ||
24 | 22,4,btmw log mode flag | ||
25 | 78,4,application debug mode flag | ||
26 | 79,4,browser log mode flag | ||
27 | 80,4,time out to sleep | ||
28 | 81,4,europe vol regulation flag | ||
29 | 82,4,function information | ||
30 | 83,4,service id | ||
31 | 84,4,marlin key | ||
32 | 86,4,MSC only mode flag | ||
33 | 89,4,SD Card export flag | ||
34 | 23,704,aad/empr key | ||
35 | 24,160,aad icv | ||
36 | 25,520,empr icv | ||
37 | 26,4,key mode (debug/release) | ||
38 | 27,64,random data | ||
39 | 28,8224,slacker id file | ||
40 | 29,64,starfish id | ||
41 | 30,33024,marlin device key | ||
42 | 31,20,secure clock | ||
43 | 32,16,slacker time | ||
44 | 33,64,marlin time | ||
45 | 34,16384,EKB 0 | ||
46 | 35,16384,EKB 1 | ||
47 | 36,1024,EMPR 0 | ||
48 | 37,1024,EMPR 1 | ||
49 | 38,1024,EMPR 2 | ||
50 | 39,1024,EMPR 3 | ||
51 | 40,1024,EMPR 4 | ||
52 | 41,1024,EMPR 5 | ||
53 | 42,1024,EMPR 6 | ||
54 | 43,1024,EMPR 7 | ||
55 | 44,1024,EMPR 8 | ||
56 | 45,1024,EMPR 9 | ||
57 | 46,1024,EMPR 10 | ||
58 | 47,1024,EMPR 11 | ||
59 | 48,1024,EMPR 12 | ||
60 | 49,1024,EMPR 13 | ||
61 | 50,1024,EMPR 14 | ||
62 | 51,1024,EMPR 15 | ||
63 | 52,1024,EMPR 16 | ||
64 | 53,1024,EMPR 17 | ||
65 | 54,1024,EMPR 18 | ||
66 | 55,1024,EMPR 19 | ||
67 | 56,1024,EMPR 20 | ||
68 | 57,1024,EMPR 21 | ||
69 | 58,1024,EMPR 22 | ||
70 | 59,1024,EMPR 23 | ||
71 | 60,1024,EMPR 24 | ||
72 | 61,1024,EMPR 25 | ||
73 | 62,1024,EMPR 26 | ||
74 | 63,1024,EMPR 27 | ||
75 | 64,1024,EMPR 28 | ||
76 | 65,1024,EMPR 29 | ||
77 | 66,1024,EMPR 30 | ||
78 | 67,1024,EMPR 31 | ||
79 | 68,4,color variation | ||
80 | 69,4,speaker ship info | ||
81 | 70,8,middleware parameter | ||
82 | 71,4,quick shutdown flag | ||
83 | 72,262144,boot image | ||
84 | 73,262144,hold image | ||
85 | 74,262144,low battery image | ||
86 | 75,262144,update image | ||
87 | 76,262144,update error image | ||
88 | 87,262144,precharge image | ||
89 | 88,262144,dead battery image | ||
diff --git a/utils/nwztools/database/nvp/nodes-nwz-a20.txt b/utils/nwztools/database/nvp/nodes-nwz-a20.txt new file mode 100644 index 0000000000..2beb185b6c --- /dev/null +++ b/utils/nwztools/database/nvp/nodes-nwz-a20.txt | |||
@@ -0,0 +1,89 @@ | |||
1 | 1,4,system information | ||
2 | 2,32,u-boot password | ||
3 | 3,4,firmware update flag | ||
4 | 4,4,beep ok flag | ||
5 | 5,4,hold mode | ||
6 | 6,16,rtc alarm | ||
7 | 7,64,model id | ||
8 | 8,5,product code | ||
9 | 9,16,serial number | ||
10 | 10,8,update file name | ||
11 | 11,64,key and signature | ||
12 | 12,32,ship information | ||
13 | 13,4,test mode flag | ||
14 | 14,4,getty mode flag | ||
15 | 15,16,fm parameter | ||
16 | 16,64,sound driver parameter | ||
17 | 17,64,noise cancel driver parameter | ||
18 | 18,512,bluetooth pskey | ||
19 | 77,4,wifi protected setup | ||
20 | 85,4,battery calibration | ||
21 | 19,2048,bluetooth parameter | ||
22 | 20,512,btmw factory pair info | ||
23 | 21,512,btmw factory scdb | ||
24 | 22,4,btmw log mode flag | ||
25 | 78,4,application debug mode flag | ||
26 | 79,4,browser log mode flag | ||
27 | 80,4,time out to sleep | ||
28 | 81,4,europe vol regulation flag | ||
29 | 82,4,function information | ||
30 | 83,4,service id | ||
31 | 84,4,marlin key | ||
32 | 86,4,MSC only mode flag | ||
33 | 89,4,SD Card export flag | ||
34 | 23,704,aad/empr key | ||
35 | 24,160,aad icv | ||
36 | 25,520,empr icv | ||
37 | 26,4,key mode (debug/release) | ||
38 | 27,64,random data | ||
39 | 28,8224,slacker id file | ||
40 | 29,64,starfish id | ||
41 | 30,33024,marlin device key | ||
42 | 31,20,secure clock | ||
43 | 32,16,slacker time | ||
44 | 33,64,marlin time | ||
45 | 34,16384,EKB 0 | ||
46 | 35,16384,EKB 1 | ||
47 | 36,1024,EMPR 0 | ||
48 | 37,1024,EMPR 1 | ||
49 | 38,1024,EMPR 2 | ||
50 | 39,1024,EMPR 3 | ||
51 | 40,1024,EMPR 4 | ||
52 | 41,1024,EMPR 5 | ||
53 | 42,1024,EMPR 6 | ||
54 | 43,1024,EMPR 7 | ||
55 | 44,1024,EMPR 8 | ||
56 | 45,1024,EMPR 9 | ||
57 | 46,1024,EMPR 10 | ||
58 | 47,1024,EMPR 11 | ||
59 | 48,1024,EMPR 12 | ||
60 | 49,1024,EMPR 13 | ||
61 | 50,1024,EMPR 14 | ||
62 | 51,1024,EMPR 15 | ||
63 | 52,1024,EMPR 16 | ||
64 | 53,1024,EMPR 17 | ||
65 | 54,1024,EMPR 18 | ||
66 | 55,1024,EMPR 19 | ||
67 | 56,1024,EMPR 20 | ||
68 | 57,1024,EMPR 21 | ||
69 | 58,1024,EMPR 22 | ||
70 | 59,1024,EMPR 23 | ||
71 | 60,1024,EMPR 24 | ||
72 | 61,1024,EMPR 25 | ||
73 | 62,1024,EMPR 26 | ||
74 | 63,1024,EMPR 27 | ||
75 | 64,1024,EMPR 28 | ||
76 | 65,1024,EMPR 29 | ||
77 | 66,1024,EMPR 30 | ||
78 | 67,1024,EMPR 31 | ||
79 | 68,4,color variation | ||
80 | 69,4,speaker ship info | ||
81 | 70,8,middleware parameter | ||
82 | 71,4,quick shutdown flag | ||
83 | 72,262144,boot image | ||
84 | 73,262144,hold image | ||
85 | 74,262144,low battery image | ||
86 | 75,262144,update image | ||
87 | 76,262144,update error image | ||
88 | 87,262144,precharge image | ||
89 | 88,262144,dead battery image | ||
diff --git a/utils/nwztools/database/nvp/nodes-nwz-a820.txt b/utils/nwztools/database/nvp/nodes-nwz-a820.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/utils/nwztools/database/nvp/nodes-nwz-a820.txt | |||
diff --git a/utils/nwztools/database/nvp/nodes-nwz-a860.txt b/utils/nwztools/database/nvp/nodes-nwz-a860.txt new file mode 100644 index 0000000000..4a998d839a --- /dev/null +++ b/utils/nwztools/database/nvp/nodes-nwz-a860.txt | |||
@@ -0,0 +1,89 @@ | |||
1 | 24,4,system information | ||
2 | 23,32,u-boot password | ||
3 | 9,4,firmware update flag | ||
4 | 10,4,beep ok flag | ||
5 | 34,16,rtc alarm | ||
6 | 80,4,hold mode | ||
7 | 16,64,model id | ||
8 | 4,16,serial number | ||
9 | 11,32,ship information | ||
10 | 68,4,color variation | ||
11 | 26,5,product code | ||
12 | 29,8,update file name | ||
13 | 32,64,key and signature | ||
14 | 17,4,test mode flag | ||
15 | 18,4,getty mode flag | ||
16 | 70,4,disable iptable flag | ||
17 | 30,64,sound driver parameter | ||
18 | 31,64,noise cancel driver parameter | ||
19 | 77,6,wifi mac address | ||
20 | 75,4,wifi protected setup | ||
21 | 82,16,fm parameter | ||
22 | 83,4,speaker ship info | ||
23 | 84,4,mass storage class mode | ||
24 | 25,4,exception monitor mode | ||
25 | 27,4,battery calibration | ||
26 | 86,512,bluetooth pskey | ||
27 | 5,4096,application parameter | ||
28 | 7,20,secure clock | ||
29 | 12,160,aad icv | ||
30 | 13,520,empr key | ||
31 | 76,16,slacker time | ||
32 | 21,4,key mode (debug/release) | ||
33 | 71,64,marlin time | ||
34 | 72,16384,marlin crl | ||
35 | 89,512,btmw factory pair info | ||
36 | 88,512,btmw factory scdb | ||
37 | 87,4,btmw log mode flag | ||
38 | 85,4,europe vol regulation flag | ||
39 | 8,8,middleware parameter | ||
40 | 22,4,quick shutdown flag | ||
41 | 69,4,time out to sleep | ||
42 | 78,4,application debug mode flag | ||
43 | 79,4,browser log mode flag | ||
44 | 3,704,aad key | ||
45 | 28,64,wmt key | ||
46 | 81,8224,slacker id file | ||
47 | 73,33024,marlin device key | ||
48 | 33,64,starfish id | ||
49 | 35,2048,bluetooth address | ||
50 | 14,16384,EKB 0 | ||
51 | 15,16384,EKB 1 | ||
52 | 74,24576,marlin user key | ||
53 | 36,1024,EMPR 0 | ||
54 | 37,1024,EMPR 1 | ||
55 | 38,1024,EMPR 2 | ||
56 | 39,1024,EMPR 3 | ||
57 | 40,1024,EMPR 4 | ||
58 | 41,1024,EMPR 5 | ||
59 | 42,1024,EMPR 6 | ||
60 | 43,1024,EMPR 7 | ||
61 | 44,1024,EMPR 8 | ||
62 | 45,1024,EMPR 9 | ||
63 | 46,1024,EMPR 10 | ||
64 | 47,1024,EMPR 11 | ||
65 | 48,1024,EMPR 12 | ||
66 | 49,1024,EMPR 13 | ||
67 | 50,1024,EMPR 14 | ||
68 | 51,1024,EMPR 15 | ||
69 | 52,1024,EMPR 16 | ||
70 | 53,1024,EMPR 17 | ||
71 | 54,1024,EMPR 18 | ||
72 | 55,1024,EMPR 19 | ||
73 | 56,1024,EMPR 20 | ||
74 | 57,1024,EMPR 21 | ||
75 | 58,1024,EMPR 22 | ||
76 | 59,1024,EMPR 23 | ||
77 | 60,1024,EMPR 24 | ||
78 | 61,1024,EMPR 25 | ||
79 | 62,1024,EMPR 26 | ||
80 | 63,1024,EMPR 27 | ||
81 | 64,1024,EMPR 28 | ||
82 | 65,1024,EMPR 29 | ||
83 | 66,1024,EMPR 30 | ||
84 | 67,1024,EMPR 31 | ||
85 | 1,262144,boot image | ||
86 | 2,262144,hold image | ||
87 | 20,262144,low battery image | ||
88 | 19,262144,update image | ||
89 | 6,262144,update error image | ||
diff --git a/utils/nwztools/database/nvp/nodes-nwz-e450.txt b/utils/nwztools/database/nvp/nodes-nwz-e450.txt new file mode 100644 index 0000000000..438488acbc --- /dev/null +++ b/utils/nwztools/database/nvp/nodes-nwz-e450.txt | |||
@@ -0,0 +1,78 @@ | |||
1 | 24,4,system information | ||
2 | 23,32,u-boot password | ||
3 | 9,4,firmware update flag | ||
4 | 10,4,beep ok flag | ||
5 | 34,16,rtc alarm | ||
6 | 80,4,hold mode | ||
7 | 16,64,model id | ||
8 | 4,16,serial number | ||
9 | 11,32,ship information | ||
10 | 68,4,color variation | ||
11 | 26,5,product code | ||
12 | 29,8,update file name | ||
13 | 32,64,key and signature | ||
14 | 17,4,test mode flag | ||
15 | 18,4,getty mode flag | ||
16 | 70,4,disable iptable flag | ||
17 | 30,64,sound driver parameter | ||
18 | 31,64,noise cancel driver parameter | ||
19 | 77,6,wifi mac address | ||
20 | 75,4,wifi protected setup | ||
21 | 82,16,fm parameter | ||
22 | 83,4,speaker ship info | ||
23 | 84,4,mass storage class mode | ||
24 | 25,4,exception monitor mode | ||
25 | 5,4096,application parameter | ||
26 | 35,2048,bluetooth parameter | ||
27 | 8,8,middleware parameter | ||
28 | 22,4,quick shutdown flag | ||
29 | 69,4,time out to sleep | ||
30 | 78,4,application debug mode flag | ||
31 | 79,4,browser log mode flag | ||
32 | 7,20,secure clock | ||
33 | 3,704,aad key | ||
34 | 12,160,aad icv | ||
35 | 13,520,empr key | ||
36 | 28,64,random data | ||
37 | 76,16,slacker time | ||
38 | 21,4,key mode (debug/release) | ||
39 | 81,8224,slacker id file | ||
40 | 14,16384,EKB 0 | ||
41 | 15,16384,EKB 1 | ||
42 | 36,1024,EMPR 0 | ||
43 | 37,1024,EMPR 1 | ||
44 | 38,1024,EMPR 2 | ||
45 | 39,1024,EMPR 3 | ||
46 | 40,1024,EMPR 4 | ||
47 | 41,1024,EMPR 5 | ||
48 | 42,1024,EMPR 6 | ||
49 | 43,1024,EMPR 7 | ||
50 | 44,1024,EMPR 8 | ||
51 | 45,1024,EMPR 9 | ||
52 | 46,1024,EMPR 10 | ||
53 | 47,1024,EMPR 11 | ||
54 | 48,1024,EMPR 12 | ||
55 | 49,1024,EMPR 13 | ||
56 | 50,1024,EMPR 14 | ||
57 | 51,1024,EMPR 15 | ||
58 | 52,1024,EMPR 16 | ||
59 | 53,1024,EMPR 17 | ||
60 | 54,1024,EMPR 18 | ||
61 | 55,1024,EMPR 19 | ||
62 | 56,1024,EMPR 20 | ||
63 | 57,1024,EMPR 21 | ||
64 | 58,1024,EMPR 22 | ||
65 | 59,1024,EMPR 23 | ||
66 | 60,1024,EMPR 24 | ||
67 | 61,1024,EMPR 25 | ||
68 | 62,1024,EMPR 26 | ||
69 | 63,1024,EMPR 27 | ||
70 | 64,1024,EMPR 28 | ||
71 | 65,1024,EMPR 29 | ||
72 | 66,1024,EMPR 30 | ||
73 | 67,1024,EMPR 31 | ||
74 | 1,262144,boot image | ||
75 | 2,262144,hold image | ||
76 | 20,262144,low battery image | ||
77 | 19,262144,update image | ||
78 | 6,262144,update error image | ||
diff --git a/utils/nwztools/database/nvp/nodes-nwz-e460.txt b/utils/nwztools/database/nvp/nodes-nwz-e460.txt new file mode 100644 index 0000000000..4a998d839a --- /dev/null +++ b/utils/nwztools/database/nvp/nodes-nwz-e460.txt | |||
@@ -0,0 +1,89 @@ | |||
1 | 24,4,system information | ||
2 | 23,32,u-boot password | ||
3 | 9,4,firmware update flag | ||
4 | 10,4,beep ok flag | ||
5 | 34,16,rtc alarm | ||
6 | 80,4,hold mode | ||
7 | 16,64,model id | ||
8 | 4,16,serial number | ||
9 | 11,32,ship information | ||
10 | 68,4,color variation | ||
11 | 26,5,product code | ||
12 | 29,8,update file name | ||
13 | 32,64,key and signature | ||
14 | 17,4,test mode flag | ||
15 | 18,4,getty mode flag | ||
16 | 70,4,disable iptable flag | ||
17 | 30,64,sound driver parameter | ||
18 | 31,64,noise cancel driver parameter | ||
19 | 77,6,wifi mac address | ||
20 | 75,4,wifi protected setup | ||
21 | 82,16,fm parameter | ||
22 | 83,4,speaker ship info | ||
23 | 84,4,mass storage class mode | ||
24 | 25,4,exception monitor mode | ||
25 | 27,4,battery calibration | ||
26 | 86,512,bluetooth pskey | ||
27 | 5,4096,application parameter | ||
28 | 7,20,secure clock | ||
29 | 12,160,aad icv | ||
30 | 13,520,empr key | ||
31 | 76,16,slacker time | ||
32 | 21,4,key mode (debug/release) | ||
33 | 71,64,marlin time | ||
34 | 72,16384,marlin crl | ||
35 | 89,512,btmw factory pair info | ||
36 | 88,512,btmw factory scdb | ||
37 | 87,4,btmw log mode flag | ||
38 | 85,4,europe vol regulation flag | ||
39 | 8,8,middleware parameter | ||
40 | 22,4,quick shutdown flag | ||
41 | 69,4,time out to sleep | ||
42 | 78,4,application debug mode flag | ||
43 | 79,4,browser log mode flag | ||
44 | 3,704,aad key | ||
45 | 28,64,wmt key | ||
46 | 81,8224,slacker id file | ||
47 | 73,33024,marlin device key | ||
48 | 33,64,starfish id | ||
49 | 35,2048,bluetooth address | ||
50 | 14,16384,EKB 0 | ||
51 | 15,16384,EKB 1 | ||
52 | 74,24576,marlin user key | ||
53 | 36,1024,EMPR 0 | ||
54 | 37,1024,EMPR 1 | ||
55 | 38,1024,EMPR 2 | ||
56 | 39,1024,EMPR 3 | ||
57 | 40,1024,EMPR 4 | ||
58 | 41,1024,EMPR 5 | ||
59 | 42,1024,EMPR 6 | ||
60 | 43,1024,EMPR 7 | ||
61 | 44,1024,EMPR 8 | ||
62 | 45,1024,EMPR 9 | ||
63 | 46,1024,EMPR 10 | ||
64 | 47,1024,EMPR 11 | ||
65 | 48,1024,EMPR 12 | ||
66 | 49,1024,EMPR 13 | ||
67 | 50,1024,EMPR 14 | ||
68 | 51,1024,EMPR 15 | ||
69 | 52,1024,EMPR 16 | ||
70 | 53,1024,EMPR 17 | ||
71 | 54,1024,EMPR 18 | ||
72 | 55,1024,EMPR 19 | ||
73 | 56,1024,EMPR 20 | ||
74 | 57,1024,EMPR 21 | ||
75 | 58,1024,EMPR 22 | ||
76 | 59,1024,EMPR 23 | ||
77 | 60,1024,EMPR 24 | ||
78 | 61,1024,EMPR 25 | ||
79 | 62,1024,EMPR 26 | ||
80 | 63,1024,EMPR 27 | ||
81 | 64,1024,EMPR 28 | ||
82 | 65,1024,EMPR 29 | ||
83 | 66,1024,EMPR 30 | ||
84 | 67,1024,EMPR 31 | ||
85 | 1,262144,boot image | ||
86 | 2,262144,hold image | ||
87 | 20,262144,low battery image | ||
88 | 19,262144,update image | ||
89 | 6,262144,update error image | ||
diff --git a/utils/nwztools/database/nvp/nodes-nwz-e580.txt b/utils/nwztools/database/nvp/nodes-nwz-e580.txt new file mode 100644 index 0000000000..021cc9178d --- /dev/null +++ b/utils/nwztools/database/nvp/nodes-nwz-e580.txt | |||
@@ -0,0 +1,88 @@ | |||
1 | 1,4,system information | ||
2 | 2,32,u-boot password | ||
3 | 3,4,firmware update flag | ||
4 | 4,4,beep ok flag | ||
5 | 5,4,hold mode | ||
6 | 6,16,rtc alarm | ||
7 | 7,64,model id | ||
8 | 8,5,product code | ||
9 | 9,16,serial number | ||
10 | 10,8,update file name | ||
11 | 11,64,key and signature | ||
12 | 12,32,ship information | ||
13 | 13,4,test mode flag | ||
14 | 14,4,getty mode flag | ||
15 | 15,16,fm parameter | ||
16 | 16,64,sound driver parameter | ||
17 | 17,64,noise cancel driver parameter | ||
18 | 18,512,bluetooth pskey | ||
19 | 77,4,wifi protected setup | ||
20 | 85,4,battery calibration | ||
21 | 19,2048,bluetooth parameter | ||
22 | 20,512,btmw factory pair info | ||
23 | 21,512,btmw factory scdb | ||
24 | 22,4,btmw log mode flag | ||
25 | 78,4,application debug mode flag | ||
26 | 79,4,browser log mode flag | ||
27 | 80,4,time out to sleep | ||
28 | 81,4,europe vol regulation flag | ||
29 | 82,4,function information | ||
30 | 83,4,service id | ||
31 | 84,4,marlin key | ||
32 | 86,4,MSC only mode flag | ||
33 | 23,704,aad/empr key | ||
34 | 24,160,aad icv | ||
35 | 25,520,empr icv | ||
36 | 26,4,key mode (debug/release) | ||
37 | 27,64,random data | ||
38 | 28,8224,slacker id file | ||
39 | 29,64,starfish id | ||
40 | 30,33024,marlin device key | ||
41 | 31,20,secure clock | ||
42 | 32,16,slacker time | ||
43 | 33,64,marlin time | ||
44 | 34,16384,EKB 0 | ||
45 | 35,16384,EKB 1 | ||
46 | 36,1024,EMPR 0 | ||
47 | 37,1024,EMPR 1 | ||
48 | 38,1024,EMPR 2 | ||
49 | 39,1024,EMPR 3 | ||
50 | 40,1024,EMPR 4 | ||
51 | 41,1024,EMPR 5 | ||
52 | 42,1024,EMPR 6 | ||
53 | 43,1024,EMPR 7 | ||
54 | 44,1024,EMPR 8 | ||
55 | 45,1024,EMPR 9 | ||
56 | 46,1024,EMPR 10 | ||
57 | 47,1024,EMPR 11 | ||
58 | 48,1024,EMPR 12 | ||
59 | 49,1024,EMPR 13 | ||
60 | 50,1024,EMPR 14 | ||
61 | 51,1024,EMPR 15 | ||
62 | 52,1024,EMPR 16 | ||
63 | 53,1024,EMPR 17 | ||
64 | 54,1024,EMPR 18 | ||
65 | 55,1024,EMPR 19 | ||
66 | 56,1024,EMPR 20 | ||
67 | 57,1024,EMPR 21 | ||
68 | 58,1024,EMPR 22 | ||
69 | 59,1024,EMPR 23 | ||
70 | 60,1024,EMPR 24 | ||
71 | 61,1024,EMPR 25 | ||
72 | 62,1024,EMPR 26 | ||
73 | 63,1024,EMPR 27 | ||
74 | 64,1024,EMPR 28 | ||
75 | 65,1024,EMPR 29 | ||
76 | 66,1024,EMPR 30 | ||
77 | 67,1024,EMPR 31 | ||
78 | 68,4,color variation | ||
79 | 69,4,speaker ship info | ||
80 | 70,8,middleware parameter | ||
81 | 71,4,quick shutdown flag | ||
82 | 72,262144,boot image | ||
83 | 73,262144,hold image | ||
84 | 74,262144,low battery image | ||
85 | 75,262144,update image | ||
86 | 76,262144,update error image | ||
87 | 87,262144,precharge image | ||
88 | 88,262144,dead battery image | ||
diff --git a/utils/nwztools/database/nvp/nodes-nwz-zx100.txt b/utils/nwztools/database/nvp/nodes-nwz-zx100.txt new file mode 100644 index 0000000000..2beb185b6c --- /dev/null +++ b/utils/nwztools/database/nvp/nodes-nwz-zx100.txt | |||
@@ -0,0 +1,89 @@ | |||
1 | 1,4,system information | ||
2 | 2,32,u-boot password | ||
3 | 3,4,firmware update flag | ||
4 | 4,4,beep ok flag | ||
5 | 5,4,hold mode | ||
6 | 6,16,rtc alarm | ||
7 | 7,64,model id | ||
8 | 8,5,product code | ||
9 | 9,16,serial number | ||
10 | 10,8,update file name | ||
11 | 11,64,key and signature | ||
12 | 12,32,ship information | ||
13 | 13,4,test mode flag | ||
14 | 14,4,getty mode flag | ||
15 | 15,16,fm parameter | ||
16 | 16,64,sound driver parameter | ||
17 | 17,64,noise cancel driver parameter | ||
18 | 18,512,bluetooth pskey | ||
19 | 77,4,wifi protected setup | ||
20 | 85,4,battery calibration | ||
21 | 19,2048,bluetooth parameter | ||
22 | 20,512,btmw factory pair info | ||
23 | 21,512,btmw factory scdb | ||
24 | 22,4,btmw log mode flag | ||
25 | 78,4,application debug mode flag | ||
26 | 79,4,browser log mode flag | ||
27 | 80,4,time out to sleep | ||
28 | 81,4,europe vol regulation flag | ||
29 | 82,4,function information | ||
30 | 83,4,service id | ||
31 | 84,4,marlin key | ||
32 | 86,4,MSC only mode flag | ||
33 | 89,4,SD Card export flag | ||
34 | 23,704,aad/empr key | ||
35 | 24,160,aad icv | ||
36 | 25,520,empr icv | ||
37 | 26,4,key mode (debug/release) | ||
38 | 27,64,random data | ||
39 | 28,8224,slacker id file | ||
40 | 29,64,starfish id | ||
41 | 30,33024,marlin device key | ||
42 | 31,20,secure clock | ||
43 | 32,16,slacker time | ||
44 | 33,64,marlin time | ||
45 | 34,16384,EKB 0 | ||
46 | 35,16384,EKB 1 | ||
47 | 36,1024,EMPR 0 | ||
48 | 37,1024,EMPR 1 | ||
49 | 38,1024,EMPR 2 | ||
50 | 39,1024,EMPR 3 | ||
51 | 40,1024,EMPR 4 | ||
52 | 41,1024,EMPR 5 | ||
53 | 42,1024,EMPR 6 | ||
54 | 43,1024,EMPR 7 | ||
55 | 44,1024,EMPR 8 | ||
56 | 45,1024,EMPR 9 | ||
57 | 46,1024,EMPR 10 | ||
58 | 47,1024,EMPR 11 | ||
59 | 48,1024,EMPR 12 | ||
60 | 49,1024,EMPR 13 | ||
61 | 50,1024,EMPR 14 | ||
62 | 51,1024,EMPR 15 | ||
63 | 52,1024,EMPR 16 | ||
64 | 53,1024,EMPR 17 | ||
65 | 54,1024,EMPR 18 | ||
66 | 55,1024,EMPR 19 | ||
67 | 56,1024,EMPR 20 | ||
68 | 57,1024,EMPR 21 | ||
69 | 58,1024,EMPR 22 | ||
70 | 59,1024,EMPR 23 | ||
71 | 60,1024,EMPR 24 | ||
72 | 61,1024,EMPR 25 | ||
73 | 62,1024,EMPR 26 | ||
74 | 63,1024,EMPR 27 | ||
75 | 64,1024,EMPR 28 | ||
76 | 65,1024,EMPR 29 | ||
77 | 66,1024,EMPR 30 | ||
78 | 67,1024,EMPR 31 | ||
79 | 68,4,color variation | ||
80 | 69,4,speaker ship info | ||
81 | 70,8,middleware parameter | ||
82 | 71,4,quick shutdown flag | ||
83 | 72,262144,boot image | ||
84 | 73,262144,hold image | ||
85 | 74,262144,low battery image | ||
86 | 75,262144,update image | ||
87 | 76,262144,update error image | ||
88 | 87,262144,precharge image | ||
89 | 88,262144,dead battery image | ||
diff --git a/utils/nwztools/database/nvp/nvptool.cpp b/utils/nwztools/database/nvp/nvptool.cpp new file mode 100644 index 0000000000..1371e93b87 --- /dev/null +++ b/utils/nwztools/database/nvp/nvptool.cpp | |||
@@ -0,0 +1,754 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2016 Amaury Pouly | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #include <cstdio> | ||
23 | #include <stdint.h> | ||
24 | #include <cstdlib> | ||
25 | #include <cstring> | ||
26 | #include <getopt.h> | ||
27 | #include <cstdarg> | ||
28 | #include <string> | ||
29 | #include <fstream> | ||
30 | #include <elf.h> | ||
31 | |||
32 | bool g_verbose = false; | ||
33 | bool g_unsafe = false; | ||
34 | |||
35 | uint8_t *read_file(const std::string& path, size_t& size) | ||
36 | { | ||
37 | std::ifstream fin(path.c_str(), std::ios::binary); | ||
38 | if(!fin) | ||
39 | { | ||
40 | printf("Error: cannot open '%s'\n", path.c_str()); | ||
41 | return 0; | ||
42 | } | ||
43 | fin.seekg(0, std::ios::end); | ||
44 | size = fin.tellg(); | ||
45 | fin.seekg(0, std::ios::beg); | ||
46 | uint8_t *buf = new uint8_t[size]; | ||
47 | fin.read((char *)buf, size); | ||
48 | return buf; | ||
49 | } | ||
50 | |||
51 | bool write_file(const std::string& path, uint8_t *buf, size_t size) | ||
52 | { | ||
53 | std::ofstream fout(path.c_str(), std::ios::binary); | ||
54 | if(!fout) | ||
55 | { | ||
56 | printf("Error: cannot open '%s'\n", path.c_str()); | ||
57 | return false; | ||
58 | } | ||
59 | fout.write((char *)buf, size); | ||
60 | fout.close(); | ||
61 | return true; | ||
62 | } | ||
63 | |||
64 | /* ELF code */ | ||
65 | uint8_t *g_elf_buf; | ||
66 | size_t g_elf_size; | ||
67 | Elf32_Shdr *g_elf_symtab; | ||
68 | Elf32_Shdr *g_elf_symtab_strtab; | ||
69 | Elf32_Shdr *g_elf_shstrtab; | ||
70 | |||
71 | Elf32_Ehdr *elf_ehdr() | ||
72 | { | ||
73 | return (Elf32_Ehdr *)g_elf_buf; | ||
74 | } | ||
75 | |||
76 | #define NTH_SHDR_OFF(n) \ | ||
77 | (elf_ehdr()->e_shoff + elf_ehdr()->e_shentsize * (n)) | ||
78 | |||
79 | Elf32_Shdr *elf_shdr(size_t index) | ||
80 | { | ||
81 | if(index >= elf_ehdr()->e_shnum) | ||
82 | { | ||
83 | printf("Warning: section index is out of bounds\n"); | ||
84 | return nullptr; | ||
85 | } | ||
86 | return (Elf32_Shdr *)(g_elf_buf + NTH_SHDR_OFF(index)); | ||
87 | } | ||
88 | |||
89 | size_t elf_shnum() | ||
90 | { | ||
91 | return elf_ehdr()->e_shnum; | ||
92 | } | ||
93 | |||
94 | const char *elf_get_str(Elf32_Shdr *strtab, Elf32_Word index) | ||
95 | { | ||
96 | /* sanity checks */ | ||
97 | if(strtab->sh_type != SHT_STRTAB) | ||
98 | { | ||
99 | printf("Warning: string access to a non-string-table section\n"); | ||
100 | return nullptr; | ||
101 | } | ||
102 | if(strtab->sh_offset + strtab->sh_size > g_elf_size) | ||
103 | { | ||
104 | printf("Warning: string table section does not fit in the file\n"); | ||
105 | return nullptr; | ||
106 | } | ||
107 | if(index >= strtab->sh_size) | ||
108 | { | ||
109 | printf("Warning: string access to string table is out of bounds\n"); | ||
110 | return nullptr; | ||
111 | } | ||
112 | char *buf = (char *)(g_elf_buf + strtab->sh_offset); | ||
113 | if(buf[strtab->sh_size - 1] != 0) | ||
114 | { | ||
115 | printf("Warning: string table is not zero terminated\n"); | ||
116 | return nullptr; | ||
117 | } | ||
118 | return buf + index; | ||
119 | } | ||
120 | |||
121 | const char *elf_get_section_name(size_t index) | ||
122 | { | ||
123 | Elf32_Shdr *shdr = elf_shdr(index); | ||
124 | return shdr ? elf_get_str(g_elf_shstrtab, shdr->sh_name) : nullptr; | ||
125 | } | ||
126 | |||
127 | const char *elf_get_symbol_name(Elf32_Sym *sym) | ||
128 | { | ||
129 | if(ELF32_ST_TYPE(sym->st_info) == STT_SECTION) | ||
130 | return elf_get_section_name(sym->st_shndx); | ||
131 | else | ||
132 | return elf_get_str(g_elf_symtab_strtab, sym->st_name); | ||
133 | } | ||
134 | |||
135 | Elf32_Sym *elf_get_symbol_by_name(const char *name) | ||
136 | { | ||
137 | Elf32_Sym *sym = (Elf32_Sym *)(g_elf_buf + g_elf_symtab->sh_offset); | ||
138 | size_t nr_syms = g_elf_symtab->sh_size / sizeof(Elf32_Sym); | ||
139 | for(size_t i = 0; i < nr_syms; i++) | ||
140 | { | ||
141 | const char *s = elf_get_symbol_name(&sym[i]); | ||
142 | if(s != nullptr && strcmp(name, s) == 0) | ||
143 | return &sym[i]; | ||
144 | } | ||
145 | return nullptr; | ||
146 | } | ||
147 | |||
148 | Elf32_Sym *elf_get_symbol_by_address(size_t shndx, Elf32_Word address) | ||
149 | { | ||
150 | Elf32_Sym *sym = (Elf32_Sym *)(g_elf_buf + g_elf_symtab->sh_offset); | ||
151 | size_t nr_syms = g_elf_symtab->sh_size / sizeof(Elf32_Sym); | ||
152 | for(size_t i = 0; i < nr_syms; i++) | ||
153 | { | ||
154 | if(sym[i].st_shndx == shndx && sym[i].st_value == address) | ||
155 | return &sym[i]; | ||
156 | } | ||
157 | return nullptr; | ||
158 | } | ||
159 | |||
160 | Elf32_Sym *elf_get_symbol_by_index(size_t index) | ||
161 | { | ||
162 | Elf32_Sym *sym = (Elf32_Sym *)(g_elf_buf + g_elf_symtab->sh_offset); | ||
163 | size_t nr_syms = g_elf_symtab->sh_size / sizeof(Elf32_Sym); | ||
164 | if(index >= nr_syms) | ||
165 | return nullptr; | ||
166 | return &sym[index]; | ||
167 | } | ||
168 | |||
169 | void *elf_get_section_ptr(size_t shndx, Elf32_Word address, size_t size) | ||
170 | { | ||
171 | Elf32_Shdr *shdr = elf_shdr(shndx); | ||
172 | if(shdr == nullptr) | ||
173 | return nullptr; | ||
174 | if(address + size > shdr->sh_size) | ||
175 | return nullptr; | ||
176 | if(shdr->sh_offset + shdr->sh_size > g_elf_size) | ||
177 | return nullptr; | ||
178 | return g_elf_buf + shdr->sh_offset + address; | ||
179 | } | ||
180 | |||
181 | /* make sure the string has a final zero in the section, optionally check characters | ||
182 | * are printable */ | ||
183 | const char *elf_get_string_ptr_safe(size_t shndx, Elf32_Word offset, bool want_print = true) | ||
184 | { | ||
185 | Elf32_Shdr *shdr = elf_shdr(shndx); | ||
186 | if(shdr == nullptr) | ||
187 | return nullptr; | ||
188 | /* address must be in the section */ | ||
189 | if(offset >= shdr->sh_size) | ||
190 | return nullptr; | ||
191 | /* determine maximum size */ | ||
192 | size_t max_sz = shdr->sh_size - offset; | ||
193 | const char *ptr = (const char *)(g_elf_buf + shdr->sh_offset + offset); | ||
194 | for(size_t i = 0; i < max_sz; i++) | ||
195 | { | ||
196 | if(ptr[i] == 0) /* found final 0, everything is fine */ | ||
197 | return ptr; | ||
198 | if(want_print && !isprint(ptr[i])) | ||
199 | return nullptr; | ||
200 | } | ||
201 | return nullptr; | ||
202 | } | ||
203 | |||
204 | size_t elf_find_reloc_section(size_t shndx) | ||
205 | { | ||
206 | /* find the relocation section */ | ||
207 | for(size_t i = 0; i < elf_ehdr()->e_shnum; i++) | ||
208 | { | ||
209 | Elf32_Shdr *shdr = elf_shdr(i); | ||
210 | if(shdr->sh_type != SHT_REL && shdr->sh_type != SHT_RELA) | ||
211 | continue; | ||
212 | if(shdr->sh_info != shndx) | ||
213 | continue; | ||
214 | return i; | ||
215 | } | ||
216 | return 0; | ||
217 | } | ||
218 | |||
219 | void *elf_get_symbol_ptr(Elf32_Sym *sym, size_t size) | ||
220 | { | ||
221 | /* NOTE: also works for STT_SECTION since offset will be 0 */ | ||
222 | return elf_get_section_ptr(sym->st_shndx, sym->st_value, size); | ||
223 | } | ||
224 | |||
225 | /* take the position of a 32-bit address in the section and apply relocation if | ||
226 | * any */ | ||
227 | void *elf_reloc_addr32(size_t shndx, Elf32_Word offset) | ||
228 | { | ||
229 | /* read value */ | ||
230 | uint32_t *val = (uint32_t *)elf_get_section_ptr(shndx, offset, 4); | ||
231 | if(val == nullptr) | ||
232 | return 0; /* invalid */ | ||
233 | /* find reloc section if any */ | ||
234 | size_t relshndx = elf_find_reloc_section(shndx); | ||
235 | if(relshndx == 0) | ||
236 | return g_elf_buf + *val; /* no relocation applies */ | ||
237 | Elf32_Shdr *shdr = elf_shdr(relshndx); | ||
238 | /* find relocation that applies */ | ||
239 | if(shdr->sh_type == SHT_RELA) | ||
240 | { | ||
241 | printf("Warning: unsupported RELA relocation type\n"); | ||
242 | return 0; | ||
243 | } | ||
244 | Elf32_Rel *rel = (Elf32_Rel *)elf_get_section_ptr(relshndx, 0, shdr->sh_size); | ||
245 | if(rel == nullptr) | ||
246 | { | ||
247 | printf("Warning: invalid relocation section\n"); | ||
248 | return 0; | ||
249 | } | ||
250 | size_t sym_count = shdr->sh_size / sizeof(Elf32_Rel); | ||
251 | for(size_t i = 0; i < sym_count; i++) | ||
252 | { | ||
253 | /* for relocatable files, r_offset is the offset in the section */ | ||
254 | if(rel[i].r_offset != offset) | ||
255 | continue; | ||
256 | /* find symbol, ignore shdr->sh_link and assume it is g_elf_symtab | ||
257 | * since the file should have only one symbol table anyway */ | ||
258 | Elf32_Sym *sym = elf_get_symbol_by_index(ELF32_R_SYM(rel[i].r_info)); | ||
259 | /* found it! */ | ||
260 | if(g_verbose) | ||
261 | { | ||
262 | printf("[section %zu (%s) offset %#x reloc val %#x type %d sym %d (%s)]\n", | ||
263 | shndx, elf_get_section_name(shndx), offset, *val, | ||
264 | ELF32_R_TYPE(rel[i].r_info), ELF32_R_SYM(rel[i].r_info), | ||
265 | sym ? elf_get_symbol_name(sym) : "<undef>"); | ||
266 | } | ||
267 | /* apply reloc */ | ||
268 | if(ELF32_R_TYPE(rel[i].r_info) == R_ARM_ABS32) | ||
269 | { | ||
270 | if(sym == nullptr) | ||
271 | { | ||
272 | printf("Warning: R_ARM_ABS32 reloc with invalid symbol reference\n"); | ||
273 | return 0; | ||
274 | } | ||
275 | return *val + (uint8_t *)elf_get_symbol_ptr(sym, 0); | ||
276 | } | ||
277 | else | ||
278 | { | ||
279 | printf("Warning: unsupported relocation type %d\n", ELF32_R_TYPE(rel[i].r_info)); | ||
280 | return 0; | ||
281 | } | ||
282 | } | ||
283 | /* no reloc applies */ | ||
284 | if(g_verbose) | ||
285 | { | ||
286 | printf("[section %zu (%s) offset %#x no reloc found]\n", shndx, | ||
287 | elf_get_section_name(shndx), offset); | ||
288 | } | ||
289 | return g_elf_buf + *val; /* no relocation applies */ | ||
290 | } | ||
291 | |||
292 | size_t elf_map_virt_addr(uint32_t address, Elf32_Word& out_off) | ||
293 | { | ||
294 | /* for relocatable file, this is trivial */ | ||
295 | for(size_t i = 0; i < elf_ehdr()->e_shnum; i++) | ||
296 | { | ||
297 | Elf32_Shdr *shdr = elf_shdr(i); | ||
298 | if(shdr->sh_offset <= address && address < shdr->sh_offset + shdr->sh_size) | ||
299 | { | ||
300 | out_off = address - shdr->sh_offset; | ||
301 | if(g_verbose) | ||
302 | { | ||
303 | printf("[map %#x to section %zi (%s) at %#x]\n", address, i, | ||
304 | elf_get_section_name(i), out_off); | ||
305 | } | ||
306 | return i; | ||
307 | } | ||
308 | } | ||
309 | return 0; /* section 0 is always invalid */ | ||
310 | } | ||
311 | |||
312 | size_t elf_map_ptr(void *ptr, Elf32_Word& out_off) | ||
313 | { | ||
314 | uint32_t addr = (uint32_t)((uint8_t *)ptr - g_elf_buf); | ||
315 | return elf_map_virt_addr(addr, out_off); | ||
316 | } | ||
317 | |||
318 | /* same as elf_reloc_addr32 but find section automatically from pointer */ | ||
319 | void *elf_reloc_addr32_ptr(uint32_t *val) | ||
320 | { | ||
321 | Elf32_Word off; | ||
322 | size_t sec = elf_map_ptr((void *)val, off); | ||
323 | /* if it does not belong to any section, don't do anything */ | ||
324 | if(sec == 0) | ||
325 | { | ||
326 | printf("Warning: reloc addr pointer not in any section\n"); | ||
327 | return g_elf_buf + *val; | ||
328 | } | ||
329 | return elf_reloc_addr32(sec, off); | ||
330 | } | ||
331 | |||
332 | Elf32_Sym *elf_get_symbol_by_ptr(void *ptr) | ||
333 | { | ||
334 | Elf32_Word off; | ||
335 | size_t sec = elf_map_ptr(ptr, off); | ||
336 | return sec ? elf_get_symbol_by_address(sec, off) : nullptr; | ||
337 | } | ||
338 | |||
339 | /* check if a string is safe */ | ||
340 | bool elf_is_str_ptr_safe(const char *str) | ||
341 | { | ||
342 | Elf32_Word name_off; | ||
343 | /* find the section it belongs to */ | ||
344 | size_t name_shndx = elf_map_ptr((void *)str, name_off); | ||
345 | if(name_shndx == 0) | ||
346 | return false; | ||
347 | /* check the string fit in the section */ | ||
348 | return elf_get_string_ptr_safe(name_shndx, name_off) != nullptr; | ||
349 | } | ||
350 | |||
351 | bool elf_is_ptr_safe(void *ptr, size_t sz) | ||
352 | { | ||
353 | Elf32_Word ptr_off; | ||
354 | /* find the section it belongs to */ | ||
355 | size_t ptr_shndx = elf_map_ptr((void *)ptr, ptr_off); | ||
356 | if(ptr_shndx == 0) | ||
357 | return false; | ||
358 | /* check the string fit in the section */ | ||
359 | return elf_get_section_ptr(ptr_shndx, ptr_off, sz) != nullptr; | ||
360 | } | ||
361 | |||
362 | bool elf_init() | ||
363 | { | ||
364 | if(g_elf_size < sizeof(Elf32_Ehdr)) | ||
365 | { | ||
366 | printf("Invalid ELF file: too small\n"); | ||
367 | return false; | ||
368 | } | ||
369 | Elf32_Ehdr *ehdr = elf_ehdr(); | ||
370 | if(ehdr->e_ident[EI_MAG0] != ELFMAG0 || | ||
371 | ehdr->e_ident[EI_MAG1] != ELFMAG1 || | ||
372 | ehdr->e_ident[EI_MAG2] != ELFMAG2 || | ||
373 | ehdr->e_ident[EI_MAG3] != ELFMAG3) | ||
374 | { | ||
375 | printf("Invalid ELF file: invalid ident\n"); | ||
376 | return false; | ||
377 | } | ||
378 | /* we only support relocatable files */ | ||
379 | if(ehdr->e_type != ET_REL) | ||
380 | { | ||
381 | printf("Unsupported ELF file: this is not a relocatable file\n"); | ||
382 | return false; | ||
383 | } | ||
384 | if(ehdr->e_ident[EI_CLASS] != ELFCLASS32 || ehdr->e_machine != EM_ARM) | ||
385 | { | ||
386 | printf("Unsupported ELF file: this is not a 32-bit ARM ELF file\n"); | ||
387 | return false; | ||
388 | } | ||
389 | /* go through sections */ | ||
390 | if(ehdr->e_shoff == 0) | ||
391 | { | ||
392 | printf("Invalid ELF file: no sections\n"); | ||
393 | return false; | ||
394 | } | ||
395 | if(ehdr->e_shentsize < sizeof(Elf32_Shdr)) | ||
396 | { | ||
397 | printf("Invalid ELF file: section entry size too small\n"); | ||
398 | return false; | ||
399 | } | ||
400 | if(NTH_SHDR_OFF(ehdr->e_shnum) > g_elf_size) | ||
401 | { | ||
402 | printf("Invalid ELF file: sections header does not fit in the file\n"); | ||
403 | return false; | ||
404 | } | ||
405 | for(size_t i = 0; i < ehdr->e_shnum; i++) | ||
406 | { | ||
407 | Elf32_Shdr *shdr = (Elf32_Shdr *)(g_elf_buf + NTH_SHDR_OFF(i)); | ||
408 | if(shdr->sh_type == SHT_SYMTAB) | ||
409 | g_elf_symtab = shdr; | ||
410 | } | ||
411 | /* handle symbol table */ | ||
412 | if(g_elf_symtab) | ||
413 | { | ||
414 | if(g_elf_symtab->sh_offset + g_elf_symtab->sh_size > g_elf_size) | ||
415 | { | ||
416 | printf("Invalid ELF file: symtab does not file in the file\n"); | ||
417 | return false; | ||
418 | } | ||
419 | g_elf_symtab_strtab = elf_shdr(g_elf_symtab->sh_link); | ||
420 | if(g_elf_symtab_strtab == nullptr) | ||
421 | { | ||
422 | printf("Invalid ELF file: symtab's strtab is not valid\n"); | ||
423 | } | ||
424 | if(g_elf_symtab_strtab->sh_type != SHT_STRTAB) | ||
425 | { | ||
426 | printf("Invalid ELF file: symtab's strtab is not a string table\n"); | ||
427 | return false; | ||
428 | } | ||
429 | } | ||
430 | /* handle section string table */ | ||
431 | if(ehdr->e_shstrndx != SHN_UNDEF) | ||
432 | { | ||
433 | g_elf_shstrtab = elf_shdr(ehdr->e_shstrndx); | ||
434 | if(g_elf_shstrtab == nullptr) | ||
435 | { | ||
436 | printf("Invalid ELF file: section string table is invalid\n"); | ||
437 | return false; | ||
438 | } | ||
439 | } | ||
440 | |||
441 | return true; | ||
442 | } | ||
443 | |||
444 | /* main code */ | ||
445 | |||
446 | void usage() | ||
447 | { | ||
448 | printf("usage: nvptool [options] inputs...\n"); | ||
449 | printf("options:\n"); | ||
450 | printf(" -h/--help Display help\n"); | ||
451 | printf(" -x/--extract Extract nvp map from icx_nvp_emmc.ko\n"); | ||
452 | printf(" -o/--output Set output file\n"); | ||
453 | printf(" -v/--verbose Enable debug output\n"); | ||
454 | printf(" -u/--unsafe Perform potentially unsafe operations\n"); | ||
455 | exit(1); | ||
456 | } | ||
457 | |||
458 | struct zone_info_v1_t | ||
459 | { | ||
460 | uint32_t node; | ||
461 | uint32_t start; | ||
462 | uint32_t count; | ||
463 | uint32_t size; | ||
464 | uint32_t semaphore[4]; /* a 16-byte structure, useless for us */ | ||
465 | uint32_t name; /* pointer to string */ | ||
466 | } __attribute__((packed)); | ||
467 | |||
468 | struct zone_info_v2_t | ||
469 | { | ||
470 | uint32_t node; | ||
471 | uint32_t start; | ||
472 | uint32_t count; | ||
473 | uint32_t size; | ||
474 | uint32_t semaphore[3]; /* a 12-byte structure, useless for us */ | ||
475 | uint32_t name; /* pointer to string */ | ||
476 | } __attribute__((packed)); | ||
477 | |||
478 | struct area_info_v1_t | ||
479 | { | ||
480 | uint32_t type; /* 1 = large, 2 = small */ | ||
481 | uint32_t zoneinfo; /* pointer to zone_info_t[] */ | ||
482 | uint32_t zonecount; | ||
483 | uint32_t semaphore[4]; /* a 16-byte structure, useless for us */ | ||
484 | uint32_t name; /* pointer to string */ | ||
485 | } __attribute__((packed)); | ||
486 | |||
487 | struct area_info_v2_t | ||
488 | { | ||
489 | uint32_t type; /* 1 = large, 2 = small */ | ||
490 | uint32_t zoneinfo; /* pointer to zone_info_t[] */ | ||
491 | uint32_t zonecount; | ||
492 | uint32_t semaphore[3]; /* a 16-byte structure, useless for us */ | ||
493 | uint32_t name; /* pointer to string */ | ||
494 | } __attribute__((packed)); | ||
495 | |||
496 | int guess_version(void *area_info_ptr) | ||
497 | { | ||
498 | /* the "semaphore" part is always filled with zeroes, so simply check if there | ||
499 | * are 3 or 4 of them */ | ||
500 | area_info_v1_t *ai_v1 = (area_info_v1_t *)area_info_ptr; | ||
501 | if(ai_v1->semaphore[3] == 0) | ||
502 | return 1; /* v1: semaphore has 4 fields */ | ||
503 | else | ||
504 | return 2; /* v2: semaphore has 3 fields */ | ||
505 | } | ||
506 | |||
507 | int do_extract(const char *output, int argc, char **argv) | ||
508 | { | ||
509 | if(argc != 1) | ||
510 | { | ||
511 | printf("You need to specify exactly one input file to extract from.\n"); | ||
512 | return 3; | ||
513 | } | ||
514 | FILE *fout = NULL; | ||
515 | if(output) | ||
516 | { | ||
517 | fout = fopen(output, "w"); | ||
518 | if(fout == NULL) | ||
519 | { | ||
520 | printf("Cannot open output file '%s'\n", output); | ||
521 | return 4; | ||
522 | } | ||
523 | } | ||
524 | /* read elf file */ | ||
525 | g_elf_buf = read_file(argv[0], g_elf_size); | ||
526 | if(g_elf_buf == nullptr) | ||
527 | { | ||
528 | printf("Cannot open input file '%s'\n", argv[0]); | ||
529 | return 1; | ||
530 | } | ||
531 | if(!elf_init()) | ||
532 | { | ||
533 | printf("This is not a valid ELF file\n"); | ||
534 | return 1; | ||
535 | } | ||
536 | if(g_elf_symtab == nullptr) | ||
537 | { | ||
538 | printf("This ELF file does not have a symbol table\n"); | ||
539 | return 1; | ||
540 | } | ||
541 | /* look for symbol 'AreaInfo' */ | ||
542 | Elf32_Sym *sym_AreaInfo = elf_get_symbol_by_name("AreaInfo"); | ||
543 | if(sym_AreaInfo == nullptr) | ||
544 | { | ||
545 | printf("Cannot find symbol 'AreaInfo'\n"); | ||
546 | return 1; | ||
547 | } | ||
548 | printf("AreaInfo:\n"); | ||
549 | if(g_verbose) | ||
550 | { | ||
551 | printf("[%u bytes at address %#x in section %u (%s)]\n", | ||
552 | (unsigned)sym_AreaInfo->st_size, (unsigned)sym_AreaInfo->st_value, | ||
553 | (unsigned)sym_AreaInfo->st_shndx, elf_get_section_name(sym_AreaInfo->st_shndx)); | ||
554 | } | ||
555 | /* guess version */ | ||
556 | int ver = guess_version(elf_get_symbol_ptr(sym_AreaInfo, sizeof(area_info_v1_t))); | ||
557 | if(g_verbose) | ||
558 | printf("[guessed version: %d]\n", ver); | ||
559 | size_t sizeof_area_info = (ver == 1) ? sizeof(area_info_v1_t) : sizeof(area_info_v2_t); | ||
560 | size_t sizeof_zone_info = (ver == 1) ? sizeof(zone_info_v1_t) : sizeof(zone_info_v2_t); | ||
561 | /* sanity check AreaInfo */ | ||
562 | size_t area_count = sym_AreaInfo->st_size / sizeof_area_info; | ||
563 | if(!g_unsafe && (sym_AreaInfo->st_size % sizeof_area_info) != 0) | ||
564 | { | ||
565 | printf("AreaInfo size (%u) is a not a multiple of area_info_t size (%zu).\n", | ||
566 | (unsigned)sym_AreaInfo->st_size, sizeof_area_info); | ||
567 | printf("Use unsafe option to override this check\n"); | ||
568 | return 1; | ||
569 | } | ||
570 | area_info_v1_t *AreaInfo_v1 = (area_info_v1_t *)elf_get_symbol_ptr(sym_AreaInfo, | ||
571 | sym_AreaInfo->st_size); | ||
572 | area_info_v2_t *AreaInfo_v2 = (area_info_v2_t *)AreaInfo_v1; | ||
573 | if(AreaInfo_v1 == nullptr) | ||
574 | { | ||
575 | printf("Symbol does not point to a valid address\n"); | ||
576 | return 1; | ||
577 | } | ||
578 | for(size_t i = 0; i < area_count; i++) | ||
579 | { | ||
580 | uint32_t type; | ||
581 | uint32_t *zoneinfo_ptr; | ||
582 | uint32_t zonecount; | ||
583 | uint32_t *name_ptr; | ||
584 | |||
585 | if(ver == 1) | ||
586 | { | ||
587 | type = AreaInfo_v1[i].type; | ||
588 | zoneinfo_ptr = &AreaInfo_v1[i].zoneinfo; | ||
589 | zonecount = AreaInfo_v1[i].zonecount; | ||
590 | name_ptr = &AreaInfo_v1[i].name; | ||
591 | } | ||
592 | else | ||
593 | { | ||
594 | type = AreaInfo_v2[i].type; | ||
595 | zoneinfo_ptr = &AreaInfo_v2[i].zoneinfo; | ||
596 | zonecount = AreaInfo_v2[i].zonecount; | ||
597 | name_ptr = &AreaInfo_v2[i].name; | ||
598 | } | ||
599 | |||
600 | if(g_verbose) | ||
601 | { | ||
602 | printf(" [type=%u info=%#x count=%u name=%#x]\n", type, *zoneinfo_ptr, | ||
603 | zonecount, *name_ptr); | ||
604 | } | ||
605 | /* translate name address */ | ||
606 | const char *name = (const char *)elf_reloc_addr32_ptr(name_ptr); | ||
607 | if(name == nullptr || !elf_is_str_ptr_safe(name)) | ||
608 | { | ||
609 | printf(" Entry name is not a string\n"); | ||
610 | continue; | ||
611 | } | ||
612 | /* skip reserved entries */ | ||
613 | if(*zoneinfo_ptr == 0) | ||
614 | { | ||
615 | printf(" %s\n", name); | ||
616 | continue; | ||
617 | } | ||
618 | /* relocate the zoneinfo pointer */ | ||
619 | void *Zone = elf_reloc_addr32_ptr(zoneinfo_ptr);; | ||
620 | if(Zone == nullptr) | ||
621 | { | ||
622 | printf(" %s\n", name); | ||
623 | printf(" Zone info pointer is not valid\n"); | ||
624 | continue; | ||
625 | } | ||
626 | /* in safe mode, make sure the zone info pointer is a symbol */ | ||
627 | Elf32_Sym *zoneinfo_sym = elf_get_symbol_by_ptr((void *)Zone); | ||
628 | const char *zoneinfo_sym_name = "<no symbol>"; | ||
629 | if(zoneinfo_sym) | ||
630 | zoneinfo_sym_name = elf_get_symbol_name(zoneinfo_sym); | ||
631 | printf(" %s (%s)\n", name, zoneinfo_sym_name); | ||
632 | if(!g_unsafe && !zoneinfo_sym) | ||
633 | { | ||
634 | printf(" Zone info pointer does not correspond to any symbol.\n"); | ||
635 | printf(" Use unsafe option to override this check\n"); | ||
636 | continue; | ||
637 | } | ||
638 | /* if we have the symbol, make sure the claimed size match */ | ||
639 | if(!g_unsafe && zoneinfo_sym) | ||
640 | { | ||
641 | if(zoneinfo_sym->st_size != sizeof_zone_info * zonecount) | ||
642 | { | ||
643 | printf(" Zone info symbol size (%u) does not match expected size (%zu)\n", | ||
644 | (unsigned)zoneinfo_sym->st_size, sizeof_zone_info * zonecount); | ||
645 | printf(" Use unsafe option to override this check\n"); | ||
646 | continue; | ||
647 | } | ||
648 | } | ||
649 | /* sanity check */ | ||
650 | if(!elf_is_ptr_safe((void *)Zone, sizeof_zone_info * zonecount)) | ||
651 | { | ||
652 | printf(" Zone info pointer is not valid\n"); | ||
653 | continue; | ||
654 | } | ||
655 | /* read zone */ | ||
656 | zone_info_v1_t *Zone_v1 = (zone_info_v1_t *)Zone; | ||
657 | zone_info_v2_t *Zone_v2 = (zone_info_v2_t *)Zone; | ||
658 | for(size_t j = 0; j < zonecount; j++) | ||
659 | { | ||
660 | uint32_t node, start, count, size; | ||
661 | uint32_t *name_ptr; | ||
662 | |||
663 | if(ver == 1) | ||
664 | { | ||
665 | node = Zone_v1[j].node; | ||
666 | start = Zone_v1[j].start; | ||
667 | count = Zone_v1[j].count; | ||
668 | size = Zone_v1[j].size; | ||
669 | name_ptr = &Zone_v1[j].name; | ||
670 | } | ||
671 | else | ||
672 | { | ||
673 | node = Zone_v2[j].node; | ||
674 | start = Zone_v2[j].start; | ||
675 | count = Zone_v2[j].count; | ||
676 | size = Zone_v2[j].size; | ||
677 | name_ptr = &Zone_v2[j].name; | ||
678 | } | ||
679 | |||
680 | if(g_verbose) | ||
681 | { | ||
682 | printf(" [node=%u start=%#x count=%u size=%u name=%#x]\n", | ||
683 | node, start, count, size, *name_ptr); | ||
684 | } | ||
685 | /* translate name address */ | ||
686 | const char *name = (const char *)elf_reloc_addr32_ptr(name_ptr); | ||
687 | if(name == nullptr || !elf_is_str_ptr_safe(name)) | ||
688 | { | ||
689 | printf(" Entry name is not a string\n"); | ||
690 | continue; | ||
691 | } | ||
692 | printf(" %s: node %03u, size %u\n", name, node, size); | ||
693 | if(fout) | ||
694 | fprintf(fout, "%u,%u,%s\n", node, size, name); | ||
695 | } | ||
696 | } | ||
697 | if(fout) | ||
698 | fclose(fout); | ||
699 | /* success */ | ||
700 | return 0; | ||
701 | } | ||
702 | |||
703 | int main(int argc, char **argv) | ||
704 | { | ||
705 | const char *output = NULL; | ||
706 | bool extract = false; | ||
707 | |||
708 | if(argc <= 1) | ||
709 | usage(); | ||
710 | |||
711 | while(1) | ||
712 | { | ||
713 | static struct option long_options[] = | ||
714 | { | ||
715 | {"help", no_argument, 0, 'h'}, | ||
716 | {"extract", no_argument, 0, 'x'}, | ||
717 | {"output", required_argument, 0, 'o'}, | ||
718 | {"verbose", no_argument, 0, 'v'}, | ||
719 | {"unsafe", no_argument, 0, 'u'}, | ||
720 | {0, 0, 0, 0} | ||
721 | }; | ||
722 | |||
723 | int c = getopt_long(argc, argv, "hxo:vu", long_options, NULL); | ||
724 | if(c == -1) | ||
725 | break; | ||
726 | switch(c) | ||
727 | { | ||
728 | case -1: | ||
729 | break; | ||
730 | case 'h': | ||
731 | usage(); | ||
732 | break; | ||
733 | case 'o': | ||
734 | output = optarg; | ||
735 | break; | ||
736 | case 'x': | ||
737 | extract = true; | ||
738 | break; | ||
739 | case 'v': | ||
740 | g_verbose = true; | ||
741 | break; | ||
742 | case 'u': | ||
743 | g_unsafe = true; | ||
744 | break; | ||
745 | default: | ||
746 | abort(); | ||
747 | } | ||
748 | } | ||
749 | |||
750 | if(extract) | ||
751 | return do_extract(output, argc - optind, argv + optind); | ||
752 | printf("You need to specify an operation. Run nvptool -h for help\n"); | ||
753 | return 1; | ||
754 | } | ||
diff --git a/utils/nwztools/database/nvp/nw-a30.txt b/utils/nwztools/database/nvp/nw-a30.txt new file mode 100644 index 0000000000..dd058fb15e --- /dev/null +++ b/utils/nwztools/database/nvp/nw-a30.txt | |||
@@ -0,0 +1,92 @@ | |||
1 | dbg,000 | ||
2 | syi,001 | ||
3 | ubp,002 | ||
4 | fup,003 | ||
5 | prk,004 | ||
6 | hld,005 | ||
7 | rtc,006 | ||
8 | mid,007 | ||
9 | pcd,008 | ||
10 | ser,009 | ||
11 | ufn,010 | ||
12 | kas,011 | ||
13 | shp,012 | ||
14 | tst,013 | ||
15 | gty,014 | ||
16 | fmp,015 | ||
17 | sdp,016 | ||
18 | ncp,017 | ||
19 | psk,018 | ||
20 | nvr,077 | ||
21 | she,084 | ||
22 | btc,085 | ||
23 | ins,089 | ||
24 | ctr,090 | ||
25 | sku,091 | ||
26 | bpr,019 | ||
27 | bfp,020 | ||
28 | bfd,021 | ||
29 | bml,022 | ||
30 | apd,078 | ||
31 | blf,079 | ||
32 | slp,080 | ||
33 | vrt,081 | ||
34 | fni,082 | ||
35 | sid,083 | ||
36 | mso,086 | ||
37 | cng,023 | ||
38 | lyr,024 | ||
39 | dbv,025 | ||
40 | fur,026 | ||
41 | ums,027 | ||
42 | skd,028 | ||
43 | ups,029 | ||
44 | mdk,030 | ||
45 | fvi,031 | ||
46 | mac,032 | ||
47 | fpi,033 | ||
48 | tr0,034 | ||
49 | tr1,035 | ||
50 | e00,036 | ||
51 | e01,037 | ||
52 | e02,038 | ||
53 | e03,039 | ||
54 | e04,040 | ||
55 | e05,041 | ||
56 | e06,042 | ||
57 | e07,043 | ||
58 | e08,044 | ||
59 | e09,045 | ||
60 | e10,046 | ||
61 | e11,047 | ||
62 | e12,048 | ||
63 | e13,049 | ||
64 | e14,050 | ||
65 | e15,051 | ||
66 | e16,052 | ||
67 | e17,053 | ||
68 | e18,054 | ||
69 | e19,055 | ||
70 | e20,056 | ||
71 | e21,057 | ||
72 | e22,058 | ||
73 | e23,059 | ||
74 | e24,060 | ||
75 | e25,061 | ||
76 | e26,062 | ||
77 | e27,063 | ||
78 | e28,064 | ||
79 | e29,065 | ||
80 | e30,066 | ||
81 | e31,067 | ||
82 | clv,068 | ||
83 | sps,069 | ||
84 | rbt,070 | ||
85 | edw,071 | ||
86 | bti,072 | ||
87 | hdi,073 | ||
88 | lbi,074 | ||
89 | fui,075 | ||
90 | eri,076 | ||
91 | pci,087 | ||
92 | dbi,088 | ||
diff --git a/utils/nwztools/database/nvp/nw-e060.txt b/utils/nwztools/database/nvp/nw-e060.txt new file mode 100644 index 0000000000..f3b5e8738a --- /dev/null +++ b/utils/nwztools/database/nvp/nw-e060.txt | |||
@@ -0,0 +1,90 @@ | |||
1 | dbg,000 | ||
2 | bti,001 | ||
3 | hdi,002 | ||
4 | cng,003 | ||
5 | ser,004 | ||
6 | app,005 | ||
7 | eri,006 | ||
8 | dcc,007 | ||
9 | mdl,008 | ||
10 | fup,009 | ||
11 | bok,010 | ||
12 | shp,011 | ||
13 | dba,012 | ||
14 | dbv,013 | ||
15 | tr0,014 | ||
16 | tr1,015 | ||
17 | mid,016 | ||
18 | tst,017 | ||
19 | gty,018 | ||
20 | fui,019 | ||
21 | lbi,020 | ||
22 | dor,021 | ||
23 | edw,022 | ||
24 | ubp,023 | ||
25 | syi,024 | ||
26 | exm,025 | ||
27 | pcd,026 | ||
28 | btc,027 | ||
29 | rnd,028 | ||
30 | ufn,029 | ||
31 | sdp,030 | ||
32 | ncp,031 | ||
33 | kas,032 | ||
34 | sfi,033 | ||
35 | rtc,034 | ||
36 | bpr,035 | ||
37 | e00,036 | ||
38 | e01,037 | ||
39 | e02,038 | ||
40 | e03,039 | ||
41 | e04,040 | ||
42 | e05,041 | ||
43 | e06,042 | ||
44 | e07,043 | ||
45 | e08,044 | ||
46 | e09,045 | ||
47 | e10,046 | ||
48 | e11,047 | ||
49 | e12,048 | ||
50 | e13,049 | ||
51 | e14,050 | ||
52 | e15,051 | ||
53 | e16,052 | ||
54 | e17,053 | ||
55 | e18,054 | ||
56 | e19,055 | ||
57 | e20,056 | ||
58 | e21,057 | ||
59 | e22,058 | ||
60 | e23,059 | ||
61 | e24,060 | ||
62 | e25,061 | ||
63 | e26,062 | ||
64 | e27,063 | ||
65 | e28,064 | ||
66 | e29,065 | ||
67 | e30,066 | ||
68 | e31,067 | ||
69 | clv,068 | ||
70 | slp,069 | ||
71 | ipt,070 | ||
72 | mtm,071 | ||
73 | mcr,072 | ||
74 | mdk,073 | ||
75 | muk,074 | ||
76 | pts,075 | ||
77 | skt,076 | ||
78 | mac,077 | ||
79 | apd,078 | ||
80 | blf,079 | ||
81 | hld,080 | ||
82 | skd,081 | ||
83 | fmp,082 | ||
84 | sps,083 | ||
85 | msc,084 | ||
86 | vrt,085 | ||
87 | psk,086 | ||
88 | bml,087 | ||
89 | bfd,088 | ||
90 | bfp,089 | ||
diff --git a/utils/nwztools/database/nvp/nw-e080.txt b/utils/nwztools/database/nvp/nw-e080.txt new file mode 100644 index 0000000000..95d2025905 --- /dev/null +++ b/utils/nwztools/database/nvp/nw-e080.txt | |||
@@ -0,0 +1,89 @@ | |||
1 | dbg,000 | ||
2 | syi,001 | ||
3 | ubp,002 | ||
4 | fup,003 | ||
5 | bok,004 | ||
6 | hld,005 | ||
7 | rtc,006 | ||
8 | mid,007 | ||
9 | pcd,008 | ||
10 | ser,009 | ||
11 | ufn,010 | ||
12 | kas,011 | ||
13 | shp,012 | ||
14 | tst,013 | ||
15 | gty,014 | ||
16 | fmp,015 | ||
17 | sdp,016 | ||
18 | ncp,017 | ||
19 | psk,018 | ||
20 | pts,077 | ||
21 | bpr,019 | ||
22 | bfp,020 | ||
23 | bfd,021 | ||
24 | bml,022 | ||
25 | apd,078 | ||
26 | blf,079 | ||
27 | slp,080 | ||
28 | vrt,081 | ||
29 | fni,082 | ||
30 | sid,083 | ||
31 | mlk,084 | ||
32 | mso,086 | ||
33 | cng,023 | ||
34 | dba,024 | ||
35 | dbv,025 | ||
36 | dor,026 | ||
37 | rnd,027 | ||
38 | skd,028 | ||
39 | sfi,029 | ||
40 | mdk,030 | ||
41 | dcc,031 | ||
42 | skt,032 | ||
43 | mtm,033 | ||
44 | tr0,034 | ||
45 | tr1,035 | ||
46 | e00,036 | ||
47 | e01,037 | ||
48 | e02,038 | ||
49 | e03,039 | ||
50 | e04,040 | ||
51 | e05,041 | ||
52 | e06,042 | ||
53 | e07,043 | ||
54 | e08,044 | ||
55 | e09,045 | ||
56 | e10,046 | ||
57 | e11,047 | ||
58 | e12,048 | ||
59 | e13,049 | ||
60 | e14,050 | ||
61 | e15,051 | ||
62 | e16,052 | ||
63 | e17,053 | ||
64 | e18,054 | ||
65 | e19,055 | ||
66 | e20,056 | ||
67 | e21,057 | ||
68 | e22,058 | ||
69 | e23,059 | ||
70 | e24,060 | ||
71 | e25,061 | ||
72 | e26,062 | ||
73 | e27,063 | ||
74 | e28,064 | ||
75 | e29,065 | ||
76 | e30,066 | ||
77 | e31,067 | ||
78 | clv,068 | ||
79 | sps,069 | ||
80 | mdl,070 | ||
81 | edw,071 | ||
82 | bti,072 | ||
83 | hdi,073 | ||
84 | lbi,074 | ||
85 | fui,075 | ||
86 | eri,076 | ||
87 | btc,085 | ||
88 | pci,087 | ||
89 | dbi,088 | ||
diff --git a/utils/nwztools/database/nvp/nw-s780.txt b/utils/nwztools/database/nvp/nw-s780.txt new file mode 100644 index 0000000000..95d2025905 --- /dev/null +++ b/utils/nwztools/database/nvp/nw-s780.txt | |||
@@ -0,0 +1,89 @@ | |||
1 | dbg,000 | ||
2 | syi,001 | ||
3 | ubp,002 | ||
4 | fup,003 | ||
5 | bok,004 | ||
6 | hld,005 | ||
7 | rtc,006 | ||
8 | mid,007 | ||
9 | pcd,008 | ||
10 | ser,009 | ||
11 | ufn,010 | ||
12 | kas,011 | ||
13 | shp,012 | ||
14 | tst,013 | ||
15 | gty,014 | ||
16 | fmp,015 | ||
17 | sdp,016 | ||
18 | ncp,017 | ||
19 | psk,018 | ||
20 | pts,077 | ||
21 | bpr,019 | ||
22 | bfp,020 | ||
23 | bfd,021 | ||
24 | bml,022 | ||
25 | apd,078 | ||
26 | blf,079 | ||
27 | slp,080 | ||
28 | vrt,081 | ||
29 | fni,082 | ||
30 | sid,083 | ||
31 | mlk,084 | ||
32 | mso,086 | ||
33 | cng,023 | ||
34 | dba,024 | ||
35 | dbv,025 | ||
36 | dor,026 | ||
37 | rnd,027 | ||
38 | skd,028 | ||
39 | sfi,029 | ||
40 | mdk,030 | ||
41 | dcc,031 | ||
42 | skt,032 | ||
43 | mtm,033 | ||
44 | tr0,034 | ||
45 | tr1,035 | ||
46 | e00,036 | ||
47 | e01,037 | ||
48 | e02,038 | ||
49 | e03,039 | ||
50 | e04,040 | ||
51 | e05,041 | ||
52 | e06,042 | ||
53 | e07,043 | ||
54 | e08,044 | ||
55 | e09,045 | ||
56 | e10,046 | ||
57 | e11,047 | ||
58 | e12,048 | ||
59 | e13,049 | ||
60 | e14,050 | ||
61 | e15,051 | ||
62 | e16,052 | ||
63 | e17,053 | ||
64 | e18,054 | ||
65 | e19,055 | ||
66 | e20,056 | ||
67 | e21,057 | ||
68 | e22,058 | ||
69 | e23,059 | ||
70 | e24,060 | ||
71 | e25,061 | ||
72 | e26,062 | ||
73 | e27,063 | ||
74 | e28,064 | ||
75 | e29,065 | ||
76 | e30,066 | ||
77 | e31,067 | ||
78 | clv,068 | ||
79 | sps,069 | ||
80 | mdl,070 | ||
81 | edw,071 | ||
82 | bti,072 | ||
83 | hdi,073 | ||
84 | lbi,074 | ||
85 | fui,075 | ||
86 | eri,076 | ||
87 | btc,085 | ||
88 | pci,087 | ||
89 | dbi,088 | ||
diff --git a/utils/nwztools/database/nvp/nwz-a10.txt b/utils/nwztools/database/nvp/nwz-a10.txt new file mode 100644 index 0000000000..e7ed5a0bd4 --- /dev/null +++ b/utils/nwztools/database/nvp/nwz-a10.txt | |||
@@ -0,0 +1,90 @@ | |||
1 | dbg,000 | ||
2 | syi,001 | ||
3 | ubp,002 | ||
4 | fup,003 | ||
5 | bok,004 | ||
6 | hld,005 | ||
7 | rtc,006 | ||
8 | mid,007 | ||
9 | pcd,008 | ||
10 | ser,009 | ||
11 | ufn,010 | ||
12 | kas,011 | ||
13 | shp,012 | ||
14 | tst,013 | ||
15 | gty,014 | ||
16 | fmp,015 | ||
17 | sdp,016 | ||
18 | ncp,017 | ||
19 | psk,018 | ||
20 | pts,077 | ||
21 | btc,085 | ||
22 | bpr,019 | ||
23 | bfp,020 | ||
24 | bfd,021 | ||
25 | bml,022 | ||
26 | apd,078 | ||
27 | blf,079 | ||
28 | slp,080 | ||
29 | vrt,081 | ||
30 | fni,082 | ||
31 | sid,083 | ||
32 | mlk,084 | ||
33 | mso,086 | ||
34 | sdc,089 | ||
35 | cng,023 | ||
36 | dba,024 | ||
37 | dbv,025 | ||
38 | dor,026 | ||
39 | rnd,027 | ||
40 | skd,028 | ||
41 | sfi,029 | ||
42 | mdk,030 | ||
43 | dcc,031 | ||
44 | skt,032 | ||
45 | mtm,033 | ||
46 | tr0,034 | ||
47 | tr1,035 | ||
48 | e00,036 | ||
49 | e01,037 | ||
50 | e02,038 | ||
51 | e03,039 | ||
52 | e04,040 | ||
53 | e05,041 | ||
54 | e06,042 | ||
55 | e07,043 | ||
56 | e08,044 | ||
57 | e09,045 | ||
58 | e10,046 | ||
59 | e11,047 | ||
60 | e12,048 | ||
61 | e13,049 | ||
62 | e14,050 | ||
63 | e15,051 | ||
64 | e16,052 | ||
65 | e17,053 | ||
66 | e18,054 | ||
67 | e19,055 | ||
68 | e20,056 | ||
69 | e21,057 | ||
70 | e22,058 | ||
71 | e23,059 | ||
72 | e24,060 | ||
73 | e25,061 | ||
74 | e26,062 | ||
75 | e27,063 | ||
76 | e28,064 | ||
77 | e29,065 | ||
78 | e30,066 | ||
79 | e31,067 | ||
80 | clv,068 | ||
81 | sps,069 | ||
82 | mdl,070 | ||
83 | edw,071 | ||
84 | bti,072 | ||
85 | hdi,073 | ||
86 | lbi,074 | ||
87 | fui,075 | ||
88 | eri,076 | ||
89 | pci,087 | ||
90 | dbi,088 | ||
diff --git a/utils/nwztools/database/nvp/nwz-a20.txt b/utils/nwztools/database/nvp/nwz-a20.txt new file mode 100644 index 0000000000..e7ed5a0bd4 --- /dev/null +++ b/utils/nwztools/database/nvp/nwz-a20.txt | |||
@@ -0,0 +1,90 @@ | |||
1 | dbg,000 | ||
2 | syi,001 | ||
3 | ubp,002 | ||
4 | fup,003 | ||
5 | bok,004 | ||
6 | hld,005 | ||
7 | rtc,006 | ||
8 | mid,007 | ||
9 | pcd,008 | ||
10 | ser,009 | ||
11 | ufn,010 | ||
12 | kas,011 | ||
13 | shp,012 | ||
14 | tst,013 | ||
15 | gty,014 | ||
16 | fmp,015 | ||
17 | sdp,016 | ||
18 | ncp,017 | ||
19 | psk,018 | ||
20 | pts,077 | ||
21 | btc,085 | ||
22 | bpr,019 | ||
23 | bfp,020 | ||
24 | bfd,021 | ||
25 | bml,022 | ||
26 | apd,078 | ||
27 | blf,079 | ||
28 | slp,080 | ||
29 | vrt,081 | ||
30 | fni,082 | ||
31 | sid,083 | ||
32 | mlk,084 | ||
33 | mso,086 | ||
34 | sdc,089 | ||
35 | cng,023 | ||
36 | dba,024 | ||
37 | dbv,025 | ||
38 | dor,026 | ||
39 | rnd,027 | ||
40 | skd,028 | ||
41 | sfi,029 | ||
42 | mdk,030 | ||
43 | dcc,031 | ||
44 | skt,032 | ||
45 | mtm,033 | ||
46 | tr0,034 | ||
47 | tr1,035 | ||
48 | e00,036 | ||
49 | e01,037 | ||
50 | e02,038 | ||
51 | e03,039 | ||
52 | e04,040 | ||
53 | e05,041 | ||
54 | e06,042 | ||
55 | e07,043 | ||
56 | e08,044 | ||
57 | e09,045 | ||
58 | e10,046 | ||
59 | e11,047 | ||
60 | e12,048 | ||
61 | e13,049 | ||
62 | e14,050 | ||
63 | e15,051 | ||
64 | e16,052 | ||
65 | e17,053 | ||
66 | e18,054 | ||
67 | e19,055 | ||
68 | e20,056 | ||
69 | e21,057 | ||
70 | e22,058 | ||
71 | e23,059 | ||
72 | e24,060 | ||
73 | e25,061 | ||
74 | e26,062 | ||
75 | e27,063 | ||
76 | e28,064 | ||
77 | e29,065 | ||
78 | e30,066 | ||
79 | e31,067 | ||
80 | clv,068 | ||
81 | sps,069 | ||
82 | mdl,070 | ||
83 | edw,071 | ||
84 | bti,072 | ||
85 | hdi,073 | ||
86 | lbi,074 | ||
87 | fui,075 | ||
88 | eri,076 | ||
89 | pci,087 | ||
90 | dbi,088 | ||
diff --git a/utils/nwztools/database/nvp/nwz-a850.txt b/utils/nwztools/database/nvp/nwz-a850.txt new file mode 100644 index 0000000000..d5f5a05cc0 --- /dev/null +++ b/utils/nwztools/database/nvp/nwz-a850.txt | |||
@@ -0,0 +1,79 @@ | |||
1 | dbg,000 | ||
2 | bti,001 | ||
3 | hdi,002 | ||
4 | cng,003 | ||
5 | ser,004 | ||
6 | app,005 | ||
7 | eri,006 | ||
8 | dcc,007 | ||
9 | mdl,008 | ||
10 | fup,009 | ||
11 | bok,010 | ||
12 | shp,011 | ||
13 | dba,012 | ||
14 | dbv,013 | ||
15 | tr0,014 | ||
16 | tr1,015 | ||
17 | mid,016 | ||
18 | tst,017 | ||
19 | gty,018 | ||
20 | fui,019 | ||
21 | lbi,020 | ||
22 | dor,021 | ||
23 | edw,022 | ||
24 | ubp,023 | ||
25 | syi,024 | ||
26 | exm,025 | ||
27 | pcd,026 | ||
28 | rnd,028 | ||
29 | ufn,029 | ||
30 | sdp,030 | ||
31 | ncp,031 | ||
32 | kas,032 | ||
33 | rtc,034 | ||
34 | bpr,035 | ||
35 | e00,036 | ||
36 | e01,037 | ||
37 | e02,038 | ||
38 | e03,039 | ||
39 | e04,040 | ||
40 | e05,041 | ||
41 | e06,042 | ||
42 | e07,043 | ||
43 | e08,044 | ||
44 | e09,045 | ||
45 | e10,046 | ||
46 | e11,047 | ||
47 | e12,048 | ||
48 | e13,049 | ||
49 | e14,050 | ||
50 | e15,051 | ||
51 | e16,052 | ||
52 | e17,053 | ||
53 | e18,054 | ||
54 | e19,055 | ||
55 | e20,056 | ||
56 | e21,057 | ||
57 | e22,058 | ||
58 | e23,059 | ||
59 | e24,060 | ||
60 | e25,061 | ||
61 | e26,062 | ||
62 | e27,063 | ||
63 | e28,064 | ||
64 | e29,065 | ||
65 | e30,066 | ||
66 | e31,067 | ||
67 | clv,068 | ||
68 | slp,069 | ||
69 | ipt,070 | ||
70 | pts,075 | ||
71 | skt,076 | ||
72 | mac,077 | ||
73 | apd,078 | ||
74 | blf,079 | ||
75 | hld,080 | ||
76 | skd,081 | ||
77 | fmp,082 | ||
78 | sps,083 | ||
79 | msc,084 | ||
diff --git a/utils/nwztools/database/nvp/nwz-a860.txt b/utils/nwztools/database/nvp/nwz-a860.txt new file mode 100644 index 0000000000..f3b5e8738a --- /dev/null +++ b/utils/nwztools/database/nvp/nwz-a860.txt | |||
@@ -0,0 +1,90 @@ | |||
1 | dbg,000 | ||
2 | bti,001 | ||
3 | hdi,002 | ||
4 | cng,003 | ||
5 | ser,004 | ||
6 | app,005 | ||
7 | eri,006 | ||
8 | dcc,007 | ||
9 | mdl,008 | ||
10 | fup,009 | ||
11 | bok,010 | ||
12 | shp,011 | ||
13 | dba,012 | ||
14 | dbv,013 | ||
15 | tr0,014 | ||
16 | tr1,015 | ||
17 | mid,016 | ||
18 | tst,017 | ||
19 | gty,018 | ||
20 | fui,019 | ||
21 | lbi,020 | ||
22 | dor,021 | ||
23 | edw,022 | ||
24 | ubp,023 | ||
25 | syi,024 | ||
26 | exm,025 | ||
27 | pcd,026 | ||
28 | btc,027 | ||
29 | rnd,028 | ||
30 | ufn,029 | ||
31 | sdp,030 | ||
32 | ncp,031 | ||
33 | kas,032 | ||
34 | sfi,033 | ||
35 | rtc,034 | ||
36 | bpr,035 | ||
37 | e00,036 | ||
38 | e01,037 | ||
39 | e02,038 | ||
40 | e03,039 | ||
41 | e04,040 | ||
42 | e05,041 | ||
43 | e06,042 | ||
44 | e07,043 | ||
45 | e08,044 | ||
46 | e09,045 | ||
47 | e10,046 | ||
48 | e11,047 | ||
49 | e12,048 | ||
50 | e13,049 | ||
51 | e14,050 | ||
52 | e15,051 | ||
53 | e16,052 | ||
54 | e17,053 | ||
55 | e18,054 | ||
56 | e19,055 | ||
57 | e20,056 | ||
58 | e21,057 | ||
59 | e22,058 | ||
60 | e23,059 | ||
61 | e24,060 | ||
62 | e25,061 | ||
63 | e26,062 | ||
64 | e27,063 | ||
65 | e28,064 | ||
66 | e29,065 | ||
67 | e30,066 | ||
68 | e31,067 | ||
69 | clv,068 | ||
70 | slp,069 | ||
71 | ipt,070 | ||
72 | mtm,071 | ||
73 | mcr,072 | ||
74 | mdk,073 | ||
75 | muk,074 | ||
76 | pts,075 | ||
77 | skt,076 | ||
78 | mac,077 | ||
79 | apd,078 | ||
80 | blf,079 | ||
81 | hld,080 | ||
82 | skd,081 | ||
83 | fmp,082 | ||
84 | sps,083 | ||
85 | msc,084 | ||
86 | vrt,085 | ||
87 | psk,086 | ||
88 | bml,087 | ||
89 | bfd,088 | ||
90 | bfp,089 | ||
diff --git a/utils/nwztools/database/nvp/nwz-e350.txt b/utils/nwztools/database/nvp/nwz-e350.txt new file mode 100644 index 0000000000..d5f5a05cc0 --- /dev/null +++ b/utils/nwztools/database/nvp/nwz-e350.txt | |||
@@ -0,0 +1,79 @@ | |||
1 | dbg,000 | ||
2 | bti,001 | ||
3 | hdi,002 | ||
4 | cng,003 | ||
5 | ser,004 | ||
6 | app,005 | ||
7 | eri,006 | ||
8 | dcc,007 | ||
9 | mdl,008 | ||
10 | fup,009 | ||
11 | bok,010 | ||
12 | shp,011 | ||
13 | dba,012 | ||
14 | dbv,013 | ||
15 | tr0,014 | ||
16 | tr1,015 | ||
17 | mid,016 | ||
18 | tst,017 | ||
19 | gty,018 | ||
20 | fui,019 | ||
21 | lbi,020 | ||
22 | dor,021 | ||
23 | edw,022 | ||
24 | ubp,023 | ||
25 | syi,024 | ||
26 | exm,025 | ||
27 | pcd,026 | ||
28 | rnd,028 | ||
29 | ufn,029 | ||
30 | sdp,030 | ||
31 | ncp,031 | ||
32 | kas,032 | ||
33 | rtc,034 | ||
34 | bpr,035 | ||
35 | e00,036 | ||
36 | e01,037 | ||
37 | e02,038 | ||
38 | e03,039 | ||
39 | e04,040 | ||
40 | e05,041 | ||
41 | e06,042 | ||
42 | e07,043 | ||
43 | e08,044 | ||
44 | e09,045 | ||
45 | e10,046 | ||
46 | e11,047 | ||
47 | e12,048 | ||
48 | e13,049 | ||
49 | e14,050 | ||
50 | e15,051 | ||
51 | e16,052 | ||
52 | e17,053 | ||
53 | e18,054 | ||
54 | e19,055 | ||
55 | e20,056 | ||
56 | e21,057 | ||
57 | e22,058 | ||
58 | e23,059 | ||
59 | e24,060 | ||
60 | e25,061 | ||
61 | e26,062 | ||
62 | e27,063 | ||
63 | e28,064 | ||
64 | e29,065 | ||
65 | e30,066 | ||
66 | e31,067 | ||
67 | clv,068 | ||
68 | slp,069 | ||
69 | ipt,070 | ||
70 | pts,075 | ||
71 | skt,076 | ||
72 | mac,077 | ||
73 | apd,078 | ||
74 | blf,079 | ||
75 | hld,080 | ||
76 | skd,081 | ||
77 | fmp,082 | ||
78 | sps,083 | ||
79 | msc,084 | ||
diff --git a/utils/nwztools/database/nvp/nwz-e450.txt b/utils/nwztools/database/nvp/nwz-e450.txt new file mode 100644 index 0000000000..d5f5a05cc0 --- /dev/null +++ b/utils/nwztools/database/nvp/nwz-e450.txt | |||
@@ -0,0 +1,79 @@ | |||
1 | dbg,000 | ||
2 | bti,001 | ||
3 | hdi,002 | ||
4 | cng,003 | ||
5 | ser,004 | ||
6 | app,005 | ||
7 | eri,006 | ||
8 | dcc,007 | ||
9 | mdl,008 | ||
10 | fup,009 | ||
11 | bok,010 | ||
12 | shp,011 | ||
13 | dba,012 | ||
14 | dbv,013 | ||
15 | tr0,014 | ||
16 | tr1,015 | ||
17 | mid,016 | ||
18 | tst,017 | ||
19 | gty,018 | ||
20 | fui,019 | ||
21 | lbi,020 | ||
22 | dor,021 | ||
23 | edw,022 | ||
24 | ubp,023 | ||
25 | syi,024 | ||
26 | exm,025 | ||
27 | pcd,026 | ||
28 | rnd,028 | ||
29 | ufn,029 | ||
30 | sdp,030 | ||
31 | ncp,031 | ||
32 | kas,032 | ||
33 | rtc,034 | ||
34 | bpr,035 | ||
35 | e00,036 | ||
36 | e01,037 | ||
37 | e02,038 | ||
38 | e03,039 | ||
39 | e04,040 | ||
40 | e05,041 | ||
41 | e06,042 | ||
42 | e07,043 | ||
43 | e08,044 | ||
44 | e09,045 | ||
45 | e10,046 | ||
46 | e11,047 | ||
47 | e12,048 | ||
48 | e13,049 | ||
49 | e14,050 | ||
50 | e15,051 | ||
51 | e16,052 | ||
52 | e17,053 | ||
53 | e18,054 | ||
54 | e19,055 | ||
55 | e20,056 | ||
56 | e21,057 | ||
57 | e22,058 | ||
58 | e23,059 | ||
59 | e24,060 | ||
60 | e25,061 | ||
61 | e26,062 | ||
62 | e27,063 | ||
63 | e28,064 | ||
64 | e29,065 | ||
65 | e30,066 | ||
66 | e31,067 | ||
67 | clv,068 | ||
68 | slp,069 | ||
69 | ipt,070 | ||
70 | pts,075 | ||
71 | skt,076 | ||
72 | mac,077 | ||
73 | apd,078 | ||
74 | blf,079 | ||
75 | hld,080 | ||
76 | skd,081 | ||
77 | fmp,082 | ||
78 | sps,083 | ||
79 | msc,084 | ||
diff --git a/utils/nwztools/database/nvp/nwz-e460.txt b/utils/nwztools/database/nvp/nwz-e460.txt new file mode 100644 index 0000000000..f3b5e8738a --- /dev/null +++ b/utils/nwztools/database/nvp/nwz-e460.txt | |||
@@ -0,0 +1,90 @@ | |||
1 | dbg,000 | ||
2 | bti,001 | ||
3 | hdi,002 | ||
4 | cng,003 | ||
5 | ser,004 | ||
6 | app,005 | ||
7 | eri,006 | ||
8 | dcc,007 | ||
9 | mdl,008 | ||
10 | fup,009 | ||
11 | bok,010 | ||
12 | shp,011 | ||
13 | dba,012 | ||
14 | dbv,013 | ||
15 | tr0,014 | ||
16 | tr1,015 | ||
17 | mid,016 | ||
18 | tst,017 | ||
19 | gty,018 | ||
20 | fui,019 | ||
21 | lbi,020 | ||
22 | dor,021 | ||
23 | edw,022 | ||
24 | ubp,023 | ||
25 | syi,024 | ||
26 | exm,025 | ||
27 | pcd,026 | ||
28 | btc,027 | ||
29 | rnd,028 | ||
30 | ufn,029 | ||
31 | sdp,030 | ||
32 | ncp,031 | ||
33 | kas,032 | ||
34 | sfi,033 | ||
35 | rtc,034 | ||
36 | bpr,035 | ||
37 | e00,036 | ||
38 | e01,037 | ||
39 | e02,038 | ||
40 | e03,039 | ||
41 | e04,040 | ||
42 | e05,041 | ||
43 | e06,042 | ||
44 | e07,043 | ||
45 | e08,044 | ||
46 | e09,045 | ||
47 | e10,046 | ||
48 | e11,047 | ||
49 | e12,048 | ||
50 | e13,049 | ||
51 | e14,050 | ||
52 | e15,051 | ||
53 | e16,052 | ||
54 | e17,053 | ||
55 | e18,054 | ||
56 | e19,055 | ||
57 | e20,056 | ||
58 | e21,057 | ||
59 | e22,058 | ||
60 | e23,059 | ||
61 | e24,060 | ||
62 | e25,061 | ||
63 | e26,062 | ||
64 | e27,063 | ||
65 | e28,064 | ||
66 | e29,065 | ||
67 | e30,066 | ||
68 | e31,067 | ||
69 | clv,068 | ||
70 | slp,069 | ||
71 | ipt,070 | ||
72 | mtm,071 | ||
73 | mcr,072 | ||
74 | mdk,073 | ||
75 | muk,074 | ||
76 | pts,075 | ||
77 | skt,076 | ||
78 | mac,077 | ||
79 | apd,078 | ||
80 | blf,079 | ||
81 | hld,080 | ||
82 | skd,081 | ||
83 | fmp,082 | ||
84 | sps,083 | ||
85 | msc,084 | ||
86 | vrt,085 | ||
87 | psk,086 | ||
88 | bml,087 | ||
89 | bfd,088 | ||
90 | bfp,089 | ||
diff --git a/utils/nwztools/database/nvp/nwz-e470.txt b/utils/nwztools/database/nvp/nwz-e470.txt new file mode 100644 index 0000000000..d69cd3ac6b --- /dev/null +++ b/utils/nwztools/database/nvp/nwz-e470.txt | |||
@@ -0,0 +1,87 @@ | |||
1 | dbg,000 | ||
2 | syi,001 | ||
3 | ubp,002 | ||
4 | fup,003 | ||
5 | bok,004 | ||
6 | hld,005 | ||
7 | rtc,006 | ||
8 | mid,007 | ||
9 | pcd,008 | ||
10 | ser,009 | ||
11 | ufn,010 | ||
12 | kas,011 | ||
13 | shp,012 | ||
14 | tst,013 | ||
15 | gty,014 | ||
16 | fmp,015 | ||
17 | sdp,016 | ||
18 | ncp,017 | ||
19 | psk,018 | ||
20 | pts,077 | ||
21 | bpr,019 | ||
22 | bfp,020 | ||
23 | bfd,021 | ||
24 | bml,022 | ||
25 | apd,078 | ||
26 | blf,079 | ||
27 | slp,080 | ||
28 | vrt,081 | ||
29 | fni,082 | ||
30 | sid,083 | ||
31 | mlk,084 | ||
32 | mso,086 | ||
33 | cng,023 | ||
34 | dba,024 | ||
35 | dbv,025 | ||
36 | dor,026 | ||
37 | rnd,027 | ||
38 | skd,028 | ||
39 | sfi,029 | ||
40 | mdk,030 | ||
41 | dcc,031 | ||
42 | skt,032 | ||
43 | mtm,033 | ||
44 | tr0,034 | ||
45 | tr1,035 | ||
46 | e00,036 | ||
47 | e01,037 | ||
48 | e02,038 | ||
49 | e03,039 | ||
50 | e04,040 | ||
51 | e05,041 | ||
52 | e06,042 | ||
53 | e07,043 | ||
54 | e08,044 | ||
55 | e09,045 | ||
56 | e10,046 | ||
57 | e11,047 | ||
58 | e12,048 | ||
59 | e13,049 | ||
60 | e14,050 | ||
61 | e15,051 | ||
62 | e16,052 | ||
63 | e17,053 | ||
64 | e18,054 | ||
65 | e19,055 | ||
66 | e20,056 | ||
67 | e21,057 | ||
68 | e22,058 | ||
69 | e23,059 | ||
70 | e24,060 | ||
71 | e25,061 | ||
72 | e26,062 | ||
73 | e27,063 | ||
74 | e28,064 | ||
75 | e29,065 | ||
76 | e30,066 | ||
77 | e31,067 | ||
78 | clv,068 | ||
79 | sps,069 | ||
80 | mdl,070 | ||
81 | edw,071 | ||
82 | bti,072 | ||
83 | hdi,073 | ||
84 | lbi,074 | ||
85 | fui,075 | ||
86 | eri,076 | ||
87 | btc,085 | ||
diff --git a/utils/nwztools/database/nvp/nwz-e580.txt b/utils/nwztools/database/nvp/nwz-e580.txt new file mode 100644 index 0000000000..95d2025905 --- /dev/null +++ b/utils/nwztools/database/nvp/nwz-e580.txt | |||
@@ -0,0 +1,89 @@ | |||
1 | dbg,000 | ||
2 | syi,001 | ||
3 | ubp,002 | ||
4 | fup,003 | ||
5 | bok,004 | ||
6 | hld,005 | ||
7 | rtc,006 | ||
8 | mid,007 | ||
9 | pcd,008 | ||
10 | ser,009 | ||
11 | ufn,010 | ||
12 | kas,011 | ||
13 | shp,012 | ||
14 | tst,013 | ||
15 | gty,014 | ||
16 | fmp,015 | ||
17 | sdp,016 | ||
18 | ncp,017 | ||
19 | psk,018 | ||
20 | pts,077 | ||
21 | bpr,019 | ||
22 | bfp,020 | ||
23 | bfd,021 | ||
24 | bml,022 | ||
25 | apd,078 | ||
26 | blf,079 | ||
27 | slp,080 | ||
28 | vrt,081 | ||
29 | fni,082 | ||
30 | sid,083 | ||
31 | mlk,084 | ||
32 | mso,086 | ||
33 | cng,023 | ||
34 | dba,024 | ||
35 | dbv,025 | ||
36 | dor,026 | ||
37 | rnd,027 | ||
38 | skd,028 | ||
39 | sfi,029 | ||
40 | mdk,030 | ||
41 | dcc,031 | ||
42 | skt,032 | ||
43 | mtm,033 | ||
44 | tr0,034 | ||
45 | tr1,035 | ||
46 | e00,036 | ||
47 | e01,037 | ||
48 | e02,038 | ||
49 | e03,039 | ||
50 | e04,040 | ||
51 | e05,041 | ||
52 | e06,042 | ||
53 | e07,043 | ||
54 | e08,044 | ||
55 | e09,045 | ||
56 | e10,046 | ||
57 | e11,047 | ||
58 | e12,048 | ||
59 | e13,049 | ||
60 | e14,050 | ||
61 | e15,051 | ||
62 | e16,052 | ||
63 | e17,053 | ||
64 | e18,054 | ||
65 | e19,055 | ||
66 | e20,056 | ||
67 | e21,057 | ||
68 | e22,058 | ||
69 | e23,059 | ||
70 | e24,060 | ||
71 | e25,061 | ||
72 | e26,062 | ||
73 | e27,063 | ||
74 | e28,064 | ||
75 | e29,065 | ||
76 | e30,066 | ||
77 | e31,067 | ||
78 | clv,068 | ||
79 | sps,069 | ||
80 | mdl,070 | ||
81 | edw,071 | ||
82 | bti,072 | ||
83 | hdi,073 | ||
84 | lbi,074 | ||
85 | fui,075 | ||
86 | eri,076 | ||
87 | btc,085 | ||
88 | pci,087 | ||
89 | dbi,088 | ||
diff --git a/utils/nwztools/database/nvp/nwz-s760.txt b/utils/nwztools/database/nvp/nwz-s760.txt new file mode 100644 index 0000000000..f3b5e8738a --- /dev/null +++ b/utils/nwztools/database/nvp/nwz-s760.txt | |||
@@ -0,0 +1,90 @@ | |||
1 | dbg,000 | ||
2 | bti,001 | ||
3 | hdi,002 | ||
4 | cng,003 | ||
5 | ser,004 | ||
6 | app,005 | ||
7 | eri,006 | ||
8 | dcc,007 | ||
9 | mdl,008 | ||
10 | fup,009 | ||
11 | bok,010 | ||
12 | shp,011 | ||
13 | dba,012 | ||
14 | dbv,013 | ||
15 | tr0,014 | ||
16 | tr1,015 | ||
17 | mid,016 | ||
18 | tst,017 | ||
19 | gty,018 | ||
20 | fui,019 | ||
21 | lbi,020 | ||
22 | dor,021 | ||
23 | edw,022 | ||
24 | ubp,023 | ||
25 | syi,024 | ||
26 | exm,025 | ||
27 | pcd,026 | ||
28 | btc,027 | ||
29 | rnd,028 | ||
30 | ufn,029 | ||
31 | sdp,030 | ||
32 | ncp,031 | ||
33 | kas,032 | ||
34 | sfi,033 | ||
35 | rtc,034 | ||
36 | bpr,035 | ||
37 | e00,036 | ||
38 | e01,037 | ||
39 | e02,038 | ||
40 | e03,039 | ||
41 | e04,040 | ||
42 | e05,041 | ||
43 | e06,042 | ||
44 | e07,043 | ||
45 | e08,044 | ||
46 | e09,045 | ||
47 | e10,046 | ||
48 | e11,047 | ||
49 | e12,048 | ||
50 | e13,049 | ||
51 | e14,050 | ||
52 | e15,051 | ||
53 | e16,052 | ||
54 | e17,053 | ||
55 | e18,054 | ||
56 | e19,055 | ||
57 | e20,056 | ||
58 | e21,057 | ||
59 | e22,058 | ||
60 | e23,059 | ||
61 | e24,060 | ||
62 | e25,061 | ||
63 | e26,062 | ||
64 | e27,063 | ||
65 | e28,064 | ||
66 | e29,065 | ||
67 | e30,066 | ||
68 | e31,067 | ||
69 | clv,068 | ||
70 | slp,069 | ||
71 | ipt,070 | ||
72 | mtm,071 | ||
73 | mcr,072 | ||
74 | mdk,073 | ||
75 | muk,074 | ||
76 | pts,075 | ||
77 | skt,076 | ||
78 | mac,077 | ||
79 | apd,078 | ||
80 | blf,079 | ||
81 | hld,080 | ||
82 | skd,081 | ||
83 | fmp,082 | ||
84 | sps,083 | ||
85 | msc,084 | ||
86 | vrt,085 | ||
87 | psk,086 | ||
88 | bml,087 | ||
89 | bfd,088 | ||
90 | bfp,089 | ||
diff --git a/utils/nwztools/database/nvp/nwz-zx100.txt b/utils/nwztools/database/nvp/nwz-zx100.txt new file mode 100644 index 0000000000..e7ed5a0bd4 --- /dev/null +++ b/utils/nwztools/database/nvp/nwz-zx100.txt | |||
@@ -0,0 +1,90 @@ | |||
1 | dbg,000 | ||
2 | syi,001 | ||
3 | ubp,002 | ||
4 | fup,003 | ||
5 | bok,004 | ||
6 | hld,005 | ||
7 | rtc,006 | ||
8 | mid,007 | ||
9 | pcd,008 | ||
10 | ser,009 | ||
11 | ufn,010 | ||
12 | kas,011 | ||
13 | shp,012 | ||
14 | tst,013 | ||
15 | gty,014 | ||
16 | fmp,015 | ||
17 | sdp,016 | ||
18 | ncp,017 | ||
19 | psk,018 | ||
20 | pts,077 | ||
21 | btc,085 | ||
22 | bpr,019 | ||
23 | bfp,020 | ||
24 | bfd,021 | ||
25 | bml,022 | ||
26 | apd,078 | ||
27 | blf,079 | ||
28 | slp,080 | ||
29 | vrt,081 | ||
30 | fni,082 | ||
31 | sid,083 | ||
32 | mlk,084 | ||
33 | mso,086 | ||
34 | sdc,089 | ||
35 | cng,023 | ||
36 | dba,024 | ||
37 | dbv,025 | ||
38 | dor,026 | ||
39 | rnd,027 | ||
40 | skd,028 | ||
41 | sfi,029 | ||
42 | mdk,030 | ||
43 | dcc,031 | ||
44 | skt,032 | ||
45 | mtm,033 | ||
46 | tr0,034 | ||
47 | tr1,035 | ||
48 | e00,036 | ||
49 | e01,037 | ||
50 | e02,038 | ||
51 | e03,039 | ||
52 | e04,040 | ||
53 | e05,041 | ||
54 | e06,042 | ||
55 | e07,043 | ||
56 | e08,044 | ||
57 | e09,045 | ||
58 | e10,046 | ||
59 | e11,047 | ||
60 | e12,048 | ||
61 | e13,049 | ||
62 | e14,050 | ||
63 | e15,051 | ||
64 | e16,052 | ||
65 | e17,053 | ||
66 | e18,054 | ||
67 | e19,055 | ||
68 | e20,056 | ||
69 | e21,057 | ||
70 | e22,058 | ||
71 | e23,059 | ||
72 | e24,060 | ||
73 | e25,061 | ||
74 | e26,062 | ||
75 | e27,063 | ||
76 | e28,064 | ||
77 | e29,065 | ||
78 | e30,066 | ||
79 | e31,067 | ||
80 | clv,068 | ||
81 | sps,069 | ||
82 | mdl,070 | ||
83 | edw,071 | ||
84 | bti,072 | ||
85 | hdi,073 | ||
86 | lbi,074 | ||
87 | fui,075 | ||
88 | eri,076 | ||
89 | pci,087 | ||
90 | dbi,088 | ||
diff --git a/utils/nwztools/database/nvp/nwz-zx2.txt b/utils/nwztools/database/nvp/nwz-zx2.txt new file mode 100644 index 0000000000..ebc6c8d56d --- /dev/null +++ b/utils/nwztools/database/nvp/nwz-zx2.txt | |||
@@ -0,0 +1,90 @@ | |||
1 | dbg,000 | ||
2 | bti,001 | ||
3 | hdi,002 | ||
4 | cng,003 | ||
5 | ser,004 | ||
6 | app,005 | ||
7 | eri,006 | ||
8 | dcc,007 | ||
9 | mdl,008 | ||
10 | fup,009 | ||
11 | bok,010 | ||
12 | shp,011 | ||
13 | dba,012 | ||
14 | dbv,013 | ||
15 | tr0,014 | ||
16 | tr1,015 | ||
17 | mid,016 | ||
18 | tst,017 | ||
19 | gty,018 | ||
20 | fui,019 | ||
21 | lbi,020 | ||
22 | dor,021 | ||
23 | edw,022 | ||
24 | ubp,023 | ||
25 | syi,024 | ||
26 | exm,025 | ||
27 | pcd,026 | ||
28 | cgp,027 | ||
29 | rnd,028 | ||
30 | ufn,029 | ||
31 | sdp,030 | ||
32 | ncp,031 | ||
33 | kas,032 | ||
34 | sfi,033 | ||
35 | rtc,034 | ||
36 | bpr,035 | ||
37 | e00,036 | ||
38 | e01,037 | ||
39 | e02,038 | ||
40 | e03,039 | ||
41 | e04,040 | ||
42 | e05,041 | ||
43 | e06,042 | ||
44 | e07,043 | ||
45 | e08,044 | ||
46 | e09,045 | ||
47 | e10,046 | ||
48 | e11,047 | ||
49 | e12,048 | ||
50 | e13,049 | ||
51 | e14,050 | ||
52 | e15,051 | ||
53 | e16,052 | ||
54 | e17,053 | ||
55 | e18,054 | ||
56 | e19,055 | ||
57 | e20,056 | ||
58 | e21,057 | ||
59 | e22,058 | ||
60 | e23,059 | ||
61 | e24,060 | ||
62 | e25,061 | ||
63 | e26,062 | ||
64 | e27,063 | ||
65 | e28,064 | ||
66 | e29,065 | ||
67 | e30,066 | ||
68 | e31,067 | ||
69 | clv,068 | ||
70 | slp,069 | ||
71 | ipt,070 | ||
72 | mtm,071 | ||
73 | mcr,072 | ||
74 | mdk,073 | ||
75 | muk,074 | ||
76 | pts,075 | ||
77 | skt,076 | ||
78 | mac,077 | ||
79 | apd,078 | ||
80 | blf,079 | ||
81 | hld,080 | ||
82 | skd,081 | ||
83 | fmp,082 | ||
84 | sps,083 | ||
85 | msc,084 | ||
86 | vrt,085 | ||
87 | psk,086 | ||
88 | bml,087 | ||
89 | bfd,088 | ||
90 | bfp,089 | ||
diff --git a/utils/nwztools/database/nvp/parse_all_nvp_headers.sh b/utils/nwztools/database/nvp/parse_all_nvp_headers.sh new file mode 100755 index 0000000000..e84eaae8f5 --- /dev/null +++ b/utils/nwztools/database/nvp/parse_all_nvp_headers.sh | |||
@@ -0,0 +1,33 @@ | |||
1 | # | ||
2 | # usage: parse_all_nvp_headers /path/to/directory | ||
3 | # | ||
4 | # the expected structure is: | ||
5 | # nwz-*/<kernel> | ||
6 | # nw-*/<kernel/ | ||
7 | # where <kernel> must be of the form | ||
8 | # linux-kernel-*.tgz | ||
9 | # | ||
10 | if [ "$#" -lt 1 ]; then | ||
11 | >&2 echo "usage: parse_all_nvp_header.sh /path/to/directory" | ||
12 | exit 1 | ||
13 | fi | ||
14 | |||
15 | # list interesting directories | ||
16 | for dir in `find "$1" -maxdepth 1 -name "nw-*" -or -name "nwz-*"` | ||
17 | do | ||
18 | # extract codename | ||
19 | codename=`basename "$dir"` | ||
20 | # only consider linux based targets | ||
21 | if [ -e "$dir/not_linux" ]; then | ||
22 | #echo "$codename: not linux based" | ||
23 | continue | ||
24 | fi | ||
25 | # check if we can find a kernel | ||
26 | kernel_tgz=`find "$dir" -maxdepth 1 -name "linux-kernel-*.tgz"` | ||
27 | if [ "$kernel_tgz" == "" ]; then | ||
28 | echo "$codename: no kernel found" | ||
29 | continue | ||
30 | fi | ||
31 | echo "$codename: found kernel `basename $kernel_tgz`" | ||
32 | ./parse_nvp_header.sh "$kernel_tgz" > "$codename.txt" | ||
33 | done | ||
diff --git a/utils/nwztools/database/nvp/parse_all_nvp_nodes.sh b/utils/nwztools/database/nvp/parse_all_nvp_nodes.sh new file mode 100755 index 0000000000..3aae79deb0 --- /dev/null +++ b/utils/nwztools/database/nvp/parse_all_nvp_nodes.sh | |||
@@ -0,0 +1,32 @@ | |||
1 | # | ||
2 | # usage: parse_all_nvp_nodes /path/to/directory | ||
3 | # | ||
4 | # the expected structure is: | ||
5 | # nwz-*/rootfs.tar | ||
6 | # nwz-*/rootfs.tar | ||
7 | # | ||
8 | if [ "$#" -lt 1 ]; then | ||
9 | >&2 echo "usage: parse_all_nvp_header.sh /path/to/directory" | ||
10 | exit 1 | ||
11 | fi | ||
12 | |||
13 | # list interesting directories | ||
14 | for dir in `find "$1" -maxdepth 1 -name "nw-*" -or -name "nwz-*"` | ||
15 | do | ||
16 | # extract codename | ||
17 | codename=`basename "$dir"` | ||
18 | # only consider linux based targets | ||
19 | if [ -e "$dir/not_linux" ]; then | ||
20 | #echo "$codename: not linux based" | ||
21 | continue | ||
22 | fi | ||
23 | # check if we can find a rootfs | ||
24 | rootfs_tgz="$dir/rootfs.tgz" | ||
25 | if [ ! -e "$rootfs_tgz" ]; then | ||
26 | echo "$codename: no rootfs found" | ||
27 | continue | ||
28 | fi | ||
29 | echo "$codename: found rootfs `basename $rootfs_tgz`" | ||
30 | ./parse_nvp_nodes.sh "$rootfs_tgz" "nodes-$codename.txt" | ||
31 | done | ||
32 | |||
diff --git a/utils/nwztools/database/nvp/parse_nvp_header.sh b/utils/nwztools/database/nvp/parse_nvp_header.sh new file mode 100755 index 0000000000..853df93557 --- /dev/null +++ b/utils/nwztools/database/nvp/parse_nvp_header.sh | |||
@@ -0,0 +1,77 @@ | |||
1 | # usage | ||
2 | # parse_header.sh /path/to/icx_nvp.h | ||
3 | # parse_header.sh /path/to/linux/source [file] | ||
4 | # parse_header.sh /path/to/linux.tgz [file] | ||
5 | # the optional argument is an additional filter when there are several matches | ||
6 | # and is an argument to grep | ||
7 | # | ||
8 | if [ "$#" -lt 1 ]; then | ||
9 | >&2 echo "usage: parse_header.sh /path/to/icx_nvp.h|/path/to/kernel/source|/path/to/kernel.tgz [filter]" | ||
10 | exit 1 | ||
11 | fi | ||
12 | |||
13 | FILE="$1" | ||
14 | IN_TGZ="0" | ||
15 | FILTER="$2" | ||
16 | |||
17 | # for directories, list all files | ||
18 | if [ -d "$FILE" ]; then | ||
19 | LIST=`find "$FILE"` | ||
20 | else | ||
21 | # otherwise try un unpack it using tar, to see if it's an archive | ||
22 | LIST=`tar -tzf "$FILE"` | ||
23 | if [ "$?" == 0 ]; then | ||
24 | IN_TGZ="1" | ||
25 | TGZ="$FILE" | ||
26 | else | ||
27 | # assume the input is just the right file | ||
28 | LIST="$FILE" | ||
29 | fi | ||
30 | fi | ||
31 | |||
32 | # apply user filter | ||
33 | if [ "$FILTER" != "" ]; then | ||
34 | LIST=`echo "$LIST" | grep "$FILTER"` | ||
35 | fi | ||
36 | # if file contains icx_nvp_emmc.h, we want that | ||
37 | if [ "`echo "$LIST" | grep "icx_nvp_emmc.h" | wc -l`" = "1" ]; then | ||
38 | LIST=`echo "$LIST" | grep "icx_nvp_emmc.h"` | ||
39 | else | ||
40 | LIST=`echo "$LIST" | grep 'icx[[:digit:]]*_nvp[[:alpha:]_]*.h'` | ||
41 | fi | ||
42 | LIST_CNT=`echo "$LIST" | wc -l` | ||
43 | if [ "$LIST_CNT" = "0" ]; then | ||
44 | >&2 echo "No icx nvp file found" | ||
45 | exit 1 | ||
46 | elif [ "$LIST_CNT" != "1" ]; then | ||
47 | >&2 echo "Several matches for icx nvp:" | ||
48 | >&2 echo "$LIST" | ||
49 | exit 1 | ||
50 | else | ||
51 | FILE="$LIST" | ||
52 | fi | ||
53 | |||
54 | # if file is in archive, we need to extract it | ||
55 | if [ "$IN_TGZ" = "1" ]; then | ||
56 | >&2 echo "Extracting $FILE from $TGZ" | ||
57 | TMP=`mktemp` | ||
58 | tar -Ozxf "$TGZ" "$FILE" > $TMP | ||
59 | if [ "$?" != 0 ]; then | ||
60 | >&2 echo "Extraction failed" | ||
61 | exit 1 | ||
62 | fi | ||
63 | FILE="$TMP" | ||
64 | else | ||
65 | >&2 echo "Analyzing $FILE" | ||
66 | fi | ||
67 | |||
68 | cat "$FILE" | awk ' \ | ||
69 | BEGIN { \ | ||
70 | expr = "#define[[:space:]]+ICX_NVP_NODE_([[:alnum:]]+)[[:space:]]+ICX_NVP_NODE_BASE[[:space:]]*\"([[:digit:]]+)\""; \ | ||
71 | } \ | ||
72 | { \ | ||
73 | if($0 ~ expr) \ | ||
74 | { \ | ||
75 | print(tolower(gensub(expr, "\\1,\\2", "g", $0))); | ||
76 | } \ | ||
77 | }' | ||
diff --git a/utils/nwztools/database/nvp/parse_nvp_nodes.sh b/utils/nwztools/database/nvp/parse_nvp_nodes.sh new file mode 100755 index 0000000000..cf42504e32 --- /dev/null +++ b/utils/nwztools/database/nvp/parse_nvp_nodes.sh | |||
@@ -0,0 +1,58 @@ | |||
1 | # usage | ||
2 | # parse_nodes.sh /path/to/icx_nvp_emmc.ko output_file | ||
3 | # parse_nodes.sh /path/to/rootfs/dir output_file | ||
4 | # parse_nodes.sh /path/to/rootfs.tgz output_file | ||
5 | # | ||
6 | if [ "$#" -lt 2 ]; then | ||
7 | >&2 echo "usage: parse_header.sh /path/to/icx_nvp.ko|/path/to/rootfs/dir|/path/to/rootfs.tgz output_file" | ||
8 | exit 1 | ||
9 | fi | ||
10 | |||
11 | FILE="$1" | ||
12 | IN_TGZ="0" | ||
13 | OUTPUT="$2" | ||
14 | |||
15 | # for directories, list all files | ||
16 | if [ -d "$FILE" ]; then | ||
17 | LIST=`find "$FILE"` | ||
18 | else | ||
19 | # otherwise try un unpack it using tar, to see if it's an archive | ||
20 | LIST=`tar -tzf "$FILE"` | ||
21 | if [ "$?" == 0 ]; then | ||
22 | IN_TGZ="1" | ||
23 | TGZ="$FILE" | ||
24 | else | ||
25 | # assume the input is just the right file | ||
26 | LIST="$FILE" | ||
27 | fi | ||
28 | fi | ||
29 | |||
30 | # look for icx_nvp_emmc.ko | ||
31 | LIST=`echo "$LIST" | grep "icx[[:digit:]]*_nvp[[:alpha:]_]*.ko"` | ||
32 | LIST_CNT=`echo "$LIST" | wc -l` | ||
33 | if [ "$LIST" == "" ]; then | ||
34 | >&2 echo "No icx nvp file found" | ||
35 | exit 1 | ||
36 | elif [ "$LIST_CNT" != "1" ]; then | ||
37 | >&2 echo "Several matches for icx nvp:" | ||
38 | >&2 echo "$LIST" | ||
39 | exit 1 | ||
40 | else | ||
41 | FILE="$LIST" | ||
42 | fi | ||
43 | |||
44 | # if file is in archive, we need to extract it | ||
45 | if [ "$IN_TGZ" = "1" ]; then | ||
46 | >&2 echo "Extracting $FILE from $TGZ" | ||
47 | TMP=`mktemp` | ||
48 | tar -Ozxf "$TGZ" "$FILE" > $TMP | ||
49 | if [ "$?" != 0 ]; then | ||
50 | >&2 echo "Extraction failed" | ||
51 | exit 1 | ||
52 | fi | ||
53 | FILE="$TMP" | ||
54 | else | ||
55 | >&2 echo "Analyzing $FILE" | ||
56 | fi | ||
57 | |||
58 | ./nvptool -x "$FILE" -o "$OUTPUT" >/dev/null | ||
diff --git a/utils/nwztools/database/nwz_db.c b/utils/nwztools/database/nwz_db.c new file mode 100644 index 0000000000..3288fc1bec --- /dev/null +++ b/utils/nwztools/database/nwz_db.c | |||
@@ -0,0 +1,1268 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2016 Amaury Pouly | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version 2 | ||
14 | * of the License, or (at your option) any later version. | ||
15 | * | ||
16 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
17 | * KIND, either express or implied. | ||
18 | * | ||
19 | ****************************************************************************/ | ||
20 | |||
21 | /** /!\ This file was automatically generated, DO NOT MODIFY IT DIRECTLY /!\ */ | ||
22 | |||
23 | #include "nwz_db.h" | ||
24 | |||
25 | struct nwz_model_info_t nwz_model[NWZ_MODEL_COUNT] = | ||
26 | { | ||
27 | { 0x10000, "NWZ-A815" }, | ||
28 | { 0x10001, "NWZ-A816" }, | ||
29 | { 0x10002, "NWZ-A818" }, | ||
30 | { 0x1000000, "NW-S615F" }, | ||
31 | { 0x1000001, "NW-S616F" }, | ||
32 | { 0x1010000, "NW-S715F" }, | ||
33 | { 0x1010001, "NW-S716F" }, | ||
34 | { 0x1010002, "NW-S718F" }, | ||
35 | { 0x1020000, "NWZ-S615F" }, | ||
36 | { 0x1020001, "NWZ-S616F" }, | ||
37 | { 0x1020002, "NWZ-S618F" }, | ||
38 | { 0x1030000, "NWZ-S515" }, | ||
39 | { 0x1030001, "NWZ-S516" }, | ||
40 | { 0x1040000, "NWZ-S715F" }, | ||
41 | { 0x1040001, "NWZ-S716F" }, | ||
42 | { 0x1040002, "NWZ-S718F" }, | ||
43 | { 0x2000001, "NW-A916" }, | ||
44 | { 0x2000002, "NW-A918" }, | ||
45 | { 0x2000004, "NW-A919" }, | ||
46 | { 0x3000001, "NWZ-A826" }, | ||
47 | { 0x3000002, "NWZ-A828" }, | ||
48 | { 0x3000004, "NWZ-A829" }, | ||
49 | { 0x3010001, "NW-A826" }, | ||
50 | { 0x3010002, "NW-A828" }, | ||
51 | { 0x3010004, "NW-A829" }, | ||
52 | { 0x3020001, "NWZ-A726B" }, | ||
53 | { 0x3020002, "NWZ-A728B" }, | ||
54 | { 0x3020004, "NWZ-A729B" }, | ||
55 | { 0x3030001, "NWZ-A726" }, | ||
56 | { 0x3030002, "NWZ-A728" }, | ||
57 | { 0x3030004, "NWZ-A729" }, | ||
58 | { 0x4000001, "NW-S636F" }, | ||
59 | { 0x4000002, "NW-S638F" }, | ||
60 | { 0x4000004, "NW-S639F" }, | ||
61 | { 0x4010001, "NW-S736F" }, | ||
62 | { 0x4010002, "NW-S738F" }, | ||
63 | { 0x4010004, "NW-S739F" }, | ||
64 | { 0x4020001, "NWZ-S636F" }, | ||
65 | { 0x4020002, "NWZ-S638F" }, | ||
66 | { 0x4020004, "NWZ-S639F" }, | ||
67 | { 0x4030001, "NWZ-S736F" }, | ||
68 | { 0x4030002, "NWZ-S738F" }, | ||
69 | { 0x4030004, "NWZ-S739F" }, | ||
70 | { 0x5000002, "NW-X1040" }, | ||
71 | { 0x5000004, "NW-X1050" }, | ||
72 | { 0x5000005, "NW-X1060" }, | ||
73 | { 0x5010002, "NWZ-NONAME" }, | ||
74 | { 0x5010004, "NWZ-NONAME" }, | ||
75 | { 0x5010005, "NWZ-NONAME" }, | ||
76 | { 0x5020002, "NWZ-X1040" }, | ||
77 | { 0x5020004, "NWZ-X1050" }, | ||
78 | { 0x5020005, "NWZ-X1060" }, | ||
79 | { 0x5040002, "NWZ-X1041" }, | ||
80 | { 0x5040004, "NWZ-X1051" }, | ||
81 | { 0x5040005, "NWZ-X1061" }, | ||
82 | { 0x6010002, "NW-S644" }, | ||
83 | { 0x6010004, "NW-S645" }, | ||
84 | { 0x6010005, "NW-S646" }, | ||
85 | { 0x6020002, "NWZ-S744" }, | ||
86 | { 0x6020004, "NWZ-S745" }, | ||
87 | { 0x6020005, "NWZ-S746" }, | ||
88 | { 0x6030002, "NW-S744" }, | ||
89 | { 0x6030004, "NW-S745" }, | ||
90 | { 0x6030005, "NW-S746" }, | ||
91 | { 0x7000004, "NWZ-A845" }, | ||
92 | { 0x7000005, "NWZ-A846" }, | ||
93 | { 0x7000006, "NWZ-A847" }, | ||
94 | { 0x7010004, "NW-A845" }, | ||
95 | { 0x7010005, "NW-A846" }, | ||
96 | { 0x7010006, "NW-A847" }, | ||
97 | { 0x8000000, "NW-E052" }, | ||
98 | { 0x8000001, "NW-E053" }, | ||
99 | { 0x8000002, "NW-E054" }, | ||
100 | { 0x9000002, "NW-S754" }, | ||
101 | { 0x9000004, "NW-S755" }, | ||
102 | { 0x9000005, "NW-S756" }, | ||
103 | { 0xb000001, "NWZ-E453" }, | ||
104 | { 0xb000002, "NWZ-E454" }, | ||
105 | { 0xb000004, "NWZ-E455" }, | ||
106 | { 0xc000001, "NWZ-E353" }, | ||
107 | { 0xc000002, "NWZ-E354" }, | ||
108 | { 0xc000004, "NWZ-E355" }, | ||
109 | { 0xd000001, "NWZ-E553" }, | ||
110 | { 0xd000002, "NWZ-E554" }, | ||
111 | { 0xd000004, "NWZ-E555" }, | ||
112 | { 0xd000005, "NWZ-E556" }, | ||
113 | { 0xe000004, "NWZ-A855" }, | ||
114 | { 0xe000005, "NWZ-A856" }, | ||
115 | { 0xe000006, "NWZ-A857" }, | ||
116 | { 0xf000002, "NWZ-S754" }, | ||
117 | { 0xf000004, "NWZ-S755" }, | ||
118 | { 0x10000000, "NWZ-E052" }, | ||
119 | { 0x10000001, "NWZ-E053" }, | ||
120 | { 0x11000001, "NW-A863" }, | ||
121 | { 0x11000002, "NW-A864" }, | ||
122 | { 0x11000004, "NW-A865" }, | ||
123 | { 0x11000005, "NW-A866" }, | ||
124 | { 0x11000006, "NW-A867" }, | ||
125 | { 0x11010001, "NWZ-A863" }, | ||
126 | { 0x11010002, "NWZ-A864" }, | ||
127 | { 0x11010004, "NWZ-A865" }, | ||
128 | { 0x11010005, "NWZ-A866" }, | ||
129 | { 0x11010006, "NWZ-A867" }, | ||
130 | { 0x11020001, "NWZ-A863" }, | ||
131 | { 0x11020002, "NWZ-A864" }, | ||
132 | { 0x11020004, "NWZ-A865" }, | ||
133 | { 0x11020005, "NWZ-A866" }, | ||
134 | { 0x11020006, "NWZ-A867" }, | ||
135 | { 0x12000001, "NW-S763" }, | ||
136 | { 0x12000002, "NW-S764" }, | ||
137 | { 0x12000004, "NW-S765" }, | ||
138 | { 0x12000005, "NW-S766" }, | ||
139 | { 0x12000006, "NW-S767" }, | ||
140 | { 0x12010001, "NWZ-S763" }, | ||
141 | { 0x12010002, "NWZ-S764" }, | ||
142 | { 0x12010004, "NWZ-S765" }, | ||
143 | { 0x12010005, "NWZ-S766" }, | ||
144 | { 0x12010006, "NWZ-S767" }, | ||
145 | { 0x13000001, "NWZ-E463" }, | ||
146 | { 0x13000002, "NWZ-E464" }, | ||
147 | { 0x13000004, "NWZ-E465" }, | ||
148 | { 0x14000000, "NW-E062" }, | ||
149 | { 0x14000001, "NW-E063" }, | ||
150 | { 0x14000002, "NW-E064" }, | ||
151 | { 0x14000004, "NW-E065" }, | ||
152 | { 0x14000005, "NW-E066" }, | ||
153 | { 0x15000001, "NWZ-E473" }, | ||
154 | { 0x15000002, "NWZ-E474" }, | ||
155 | { 0x15000004, "NWZ-E475" }, | ||
156 | { 0x15000005, "NWZ-E476" }, | ||
157 | { 0x15010001, "NWZ-E573" }, | ||
158 | { 0x15010002, "NWZ-E574" }, | ||
159 | { 0x15010004, "NWZ-E575" }, | ||
160 | { 0x15010005, "NWZ-E576" }, | ||
161 | { 0x16000001, "NW-S773" }, | ||
162 | { 0x16000002, "NW-S774" }, | ||
163 | { 0x16000004, "NW-S775" }, | ||
164 | { 0x16000005, "NW-S776" }, | ||
165 | { 0x16010001, "NWZ-S773" }, | ||
166 | { 0x16010002, "NWZ-S774" }, | ||
167 | { 0x16010004, "NWZ-S775" }, | ||
168 | { 0x16010005, "NWZ-S776" }, | ||
169 | { 0x19000001, "NW-S783" }, | ||
170 | { 0x19000002, "NW-S784" }, | ||
171 | { 0x19000004, "NW-S785" }, | ||
172 | { 0x19000005, "NW-S786" }, | ||
173 | { 0x19010001, "NW-E083" }, | ||
174 | { 0x19010002, "NW-E084" }, | ||
175 | { 0x19010004, "NW-E085" }, | ||
176 | { 0x19010005, "NW-E086" }, | ||
177 | { 0x19020001, "NWZ-E583" }, | ||
178 | { 0x19020002, "NWZ-E584" }, | ||
179 | { 0x19020004, "NWZ-E585" }, | ||
180 | { 0x19020005, "NWZ-E586" }, | ||
181 | { 0x1a000001, "NW-A13" }, | ||
182 | { 0x1a000002, "NW-A14" }, | ||
183 | { 0x1a000004, "NW-A15" }, | ||
184 | { 0x1a000005, "NW-A16" }, | ||
185 | { 0x1a000006, "NW-A17" }, | ||
186 | { 0x1a010001, "NWZ-A13" }, | ||
187 | { 0x1a010002, "NWZ-A14" }, | ||
188 | { 0x1a010004, "NWZ-A15" }, | ||
189 | { 0x1a010005, "NWZ-A16" }, | ||
190 | { 0x1a010006, "NWZ-A17" }, | ||
191 | { 0x1b000001, "NW-S13" }, | ||
192 | { 0x1b000002, "NW-S14" }, | ||
193 | { 0x1b000004, "NW-S15" }, | ||
194 | { 0x1b000005, "NW-S16" }, | ||
195 | { 0x1b000006, "NW-S17" }, | ||
196 | { 0x1c000001, "NW-ZX103" }, | ||
197 | { 0x1c000002, "NW-ZX104" }, | ||
198 | { 0x1c000004, "NW-ZX105" }, | ||
199 | { 0x1c000005, "NW-ZX106" }, | ||
200 | { 0x1c000006, "NW-ZX107" }, | ||
201 | { 0x1c000007, "NW-ZX100" }, | ||
202 | { 0x1d000001, "NW-A23" }, | ||
203 | { 0x1d000002, "NW-A24" }, | ||
204 | { 0x1d000004, "NW-A25" }, | ||
205 | { 0x1d000005, "NW-A26" }, | ||
206 | { 0x1d000006, "NW-A27" }, | ||
207 | { 0x1d000007, "NW-A28" }, | ||
208 | }; | ||
209 | |||
210 | static int nvp_index_28dc2c[NWZ_NVP_COUNT] = | ||
211 | { | ||
212 | [NWZ_NVP_APD] = 78, | ||
213 | [NWZ_NVP_APP] = NWZ_NVP_INVALID, | ||
214 | [NWZ_NVP_BFD] = 21, | ||
215 | [NWZ_NVP_BFP] = 20, | ||
216 | [NWZ_NVP_BLF] = 79, | ||
217 | [NWZ_NVP_BML] = 22, | ||
218 | [NWZ_NVP_BOK] = 4, | ||
219 | [NWZ_NVP_BPR] = 19, | ||
220 | [NWZ_NVP_BTC] = 85, | ||
221 | [NWZ_NVP_BTI] = 72, | ||
222 | [NWZ_NVP_CGP] = NWZ_NVP_INVALID, | ||
223 | [NWZ_NVP_CLV] = 68, | ||
224 | [NWZ_NVP_CNG] = 23, | ||
225 | [NWZ_NVP_CTR] = NWZ_NVP_INVALID, | ||
226 | [NWZ_NVP_DBA] = 24, | ||
227 | [NWZ_NVP_DBG] = 0, | ||
228 | [NWZ_NVP_DBI] = NWZ_NVP_INVALID, | ||
229 | [NWZ_NVP_DBV] = 25, | ||
230 | [NWZ_NVP_DCC] = 31, | ||
231 | [NWZ_NVP_DOR] = 26, | ||
232 | [NWZ_NVP_E00] = 36, | ||
233 | [NWZ_NVP_E01] = 37, | ||
234 | [NWZ_NVP_E02] = 38, | ||
235 | [NWZ_NVP_E03] = 39, | ||
236 | [NWZ_NVP_E04] = 40, | ||
237 | [NWZ_NVP_E05] = 41, | ||
238 | [NWZ_NVP_E06] = 42, | ||
239 | [NWZ_NVP_E07] = 43, | ||
240 | [NWZ_NVP_E08] = 44, | ||
241 | [NWZ_NVP_E09] = 45, | ||
242 | [NWZ_NVP_E10] = 46, | ||
243 | [NWZ_NVP_E11] = 47, | ||
244 | [NWZ_NVP_E12] = 48, | ||
245 | [NWZ_NVP_E13] = 49, | ||
246 | [NWZ_NVP_E14] = 50, | ||
247 | [NWZ_NVP_E15] = 51, | ||
248 | [NWZ_NVP_E16] = 52, | ||
249 | [NWZ_NVP_E17] = 53, | ||
250 | [NWZ_NVP_E18] = 54, | ||
251 | [NWZ_NVP_E19] = 55, | ||
252 | [NWZ_NVP_E20] = 56, | ||
253 | [NWZ_NVP_E21] = 57, | ||
254 | [NWZ_NVP_E22] = 58, | ||
255 | [NWZ_NVP_E23] = 59, | ||
256 | [NWZ_NVP_E24] = 60, | ||
257 | [NWZ_NVP_E25] = 61, | ||
258 | [NWZ_NVP_E26] = 62, | ||
259 | [NWZ_NVP_E27] = 63, | ||
260 | [NWZ_NVP_E28] = 64, | ||
261 | [NWZ_NVP_E29] = 65, | ||
262 | [NWZ_NVP_E30] = 66, | ||
263 | [NWZ_NVP_E31] = 67, | ||
264 | [NWZ_NVP_EDW] = 71, | ||
265 | [NWZ_NVP_ERI] = 76, | ||
266 | [NWZ_NVP_EXM] = NWZ_NVP_INVALID, | ||
267 | [NWZ_NVP_FMP] = 15, | ||
268 | [NWZ_NVP_FNI] = 82, | ||
269 | [NWZ_NVP_FPI] = NWZ_NVP_INVALID, | ||
270 | [NWZ_NVP_FUI] = 75, | ||
271 | [NWZ_NVP_FUP] = 3, | ||
272 | [NWZ_NVP_FUR] = NWZ_NVP_INVALID, | ||
273 | [NWZ_NVP_FVI] = NWZ_NVP_INVALID, | ||
274 | [NWZ_NVP_GTY] = 14, | ||
275 | [NWZ_NVP_HDI] = 73, | ||
276 | [NWZ_NVP_HLD] = 5, | ||
277 | [NWZ_NVP_INS] = NWZ_NVP_INVALID, | ||
278 | [NWZ_NVP_IPT] = NWZ_NVP_INVALID, | ||
279 | [NWZ_NVP_KAS] = 11, | ||
280 | [NWZ_NVP_LBI] = 74, | ||
281 | [NWZ_NVP_LYR] = NWZ_NVP_INVALID, | ||
282 | [NWZ_NVP_MAC] = NWZ_NVP_INVALID, | ||
283 | [NWZ_NVP_MCR] = NWZ_NVP_INVALID, | ||
284 | [NWZ_NVP_MDK] = 30, | ||
285 | [NWZ_NVP_MDL] = 70, | ||
286 | [NWZ_NVP_MID] = 7, | ||
287 | [NWZ_NVP_MLK] = 84, | ||
288 | [NWZ_NVP_MSC] = NWZ_NVP_INVALID, | ||
289 | [NWZ_NVP_MSO] = 86, | ||
290 | [NWZ_NVP_MTM] = 33, | ||
291 | [NWZ_NVP_MUK] = NWZ_NVP_INVALID, | ||
292 | [NWZ_NVP_NCP] = 17, | ||
293 | [NWZ_NVP_NVR] = NWZ_NVP_INVALID, | ||
294 | [NWZ_NVP_PCD] = 8, | ||
295 | [NWZ_NVP_PCI] = NWZ_NVP_INVALID, | ||
296 | [NWZ_NVP_PRK] = NWZ_NVP_INVALID, | ||
297 | [NWZ_NVP_PSK] = 18, | ||
298 | [NWZ_NVP_PTS] = 77, | ||
299 | [NWZ_NVP_RBT] = NWZ_NVP_INVALID, | ||
300 | [NWZ_NVP_RND] = 27, | ||
301 | [NWZ_NVP_RTC] = 6, | ||
302 | [NWZ_NVP_SDC] = NWZ_NVP_INVALID, | ||
303 | [NWZ_NVP_SDP] = 16, | ||
304 | [NWZ_NVP_SER] = 9, | ||
305 | [NWZ_NVP_SFI] = 29, | ||
306 | [NWZ_NVP_SHE] = NWZ_NVP_INVALID, | ||
307 | [NWZ_NVP_SHP] = 12, | ||
308 | [NWZ_NVP_SID] = 83, | ||
309 | [NWZ_NVP_SKD] = 28, | ||
310 | [NWZ_NVP_SKT] = 32, | ||
311 | [NWZ_NVP_SKU] = NWZ_NVP_INVALID, | ||
312 | [NWZ_NVP_SLP] = 80, | ||
313 | [NWZ_NVP_SPS] = 69, | ||
314 | [NWZ_NVP_SYI] = 1, | ||
315 | [NWZ_NVP_TR0] = 34, | ||
316 | [NWZ_NVP_TR1] = 35, | ||
317 | [NWZ_NVP_TST] = 13, | ||
318 | [NWZ_NVP_UBP] = 2, | ||
319 | [NWZ_NVP_UFN] = 10, | ||
320 | [NWZ_NVP_UMS] = NWZ_NVP_INVALID, | ||
321 | [NWZ_NVP_UPS] = NWZ_NVP_INVALID, | ||
322 | [NWZ_NVP_VRT] = 81, | ||
323 | }; | ||
324 | |||
325 | static int nvp_index_0ac81d[NWZ_NVP_COUNT] = | ||
326 | { | ||
327 | [NWZ_NVP_APD] = 78, | ||
328 | [NWZ_NVP_APP] = 5, | ||
329 | [NWZ_NVP_BFD] = NWZ_NVP_INVALID, | ||
330 | [NWZ_NVP_BFP] = NWZ_NVP_INVALID, | ||
331 | [NWZ_NVP_BLF] = 79, | ||
332 | [NWZ_NVP_BML] = NWZ_NVP_INVALID, | ||
333 | [NWZ_NVP_BOK] = 10, | ||
334 | [NWZ_NVP_BPR] = 35, | ||
335 | [NWZ_NVP_BTC] = NWZ_NVP_INVALID, | ||
336 | [NWZ_NVP_BTI] = 1, | ||
337 | [NWZ_NVP_CGP] = NWZ_NVP_INVALID, | ||
338 | [NWZ_NVP_CLV] = 68, | ||
339 | [NWZ_NVP_CNG] = 3, | ||
340 | [NWZ_NVP_CTR] = NWZ_NVP_INVALID, | ||
341 | [NWZ_NVP_DBA] = 12, | ||
342 | [NWZ_NVP_DBG] = 0, | ||
343 | [NWZ_NVP_DBI] = NWZ_NVP_INVALID, | ||
344 | [NWZ_NVP_DBV] = 13, | ||
345 | [NWZ_NVP_DCC] = 7, | ||
346 | [NWZ_NVP_DOR] = 21, | ||
347 | [NWZ_NVP_E00] = 36, | ||
348 | [NWZ_NVP_E01] = 37, | ||
349 | [NWZ_NVP_E02] = 38, | ||
350 | [NWZ_NVP_E03] = 39, | ||
351 | [NWZ_NVP_E04] = 40, | ||
352 | [NWZ_NVP_E05] = 41, | ||
353 | [NWZ_NVP_E06] = 42, | ||
354 | [NWZ_NVP_E07] = 43, | ||
355 | [NWZ_NVP_E08] = 44, | ||
356 | [NWZ_NVP_E09] = 45, | ||
357 | [NWZ_NVP_E10] = 46, | ||
358 | [NWZ_NVP_E11] = 47, | ||
359 | [NWZ_NVP_E12] = 48, | ||
360 | [NWZ_NVP_E13] = 49, | ||
361 | [NWZ_NVP_E14] = 50, | ||
362 | [NWZ_NVP_E15] = 51, | ||
363 | [NWZ_NVP_E16] = 52, | ||
364 | [NWZ_NVP_E17] = 53, | ||
365 | [NWZ_NVP_E18] = 54, | ||
366 | [NWZ_NVP_E19] = 55, | ||
367 | [NWZ_NVP_E20] = 56, | ||
368 | [NWZ_NVP_E21] = 57, | ||
369 | [NWZ_NVP_E22] = 58, | ||
370 | [NWZ_NVP_E23] = 59, | ||
371 | [NWZ_NVP_E24] = 60, | ||
372 | [NWZ_NVP_E25] = 61, | ||
373 | [NWZ_NVP_E26] = 62, | ||
374 | [NWZ_NVP_E27] = 63, | ||
375 | [NWZ_NVP_E28] = 64, | ||
376 | [NWZ_NVP_E29] = 65, | ||
377 | [NWZ_NVP_E30] = 66, | ||
378 | [NWZ_NVP_E31] = 67, | ||
379 | [NWZ_NVP_EDW] = 22, | ||
380 | [NWZ_NVP_ERI] = 6, | ||
381 | [NWZ_NVP_EXM] = 25, | ||
382 | [NWZ_NVP_FMP] = 82, | ||
383 | [NWZ_NVP_FNI] = NWZ_NVP_INVALID, | ||
384 | [NWZ_NVP_FPI] = NWZ_NVP_INVALID, | ||
385 | [NWZ_NVP_FUI] = 19, | ||
386 | [NWZ_NVP_FUP] = 9, | ||
387 | [NWZ_NVP_FUR] = NWZ_NVP_INVALID, | ||
388 | [NWZ_NVP_FVI] = NWZ_NVP_INVALID, | ||
389 | [NWZ_NVP_GTY] = 18, | ||
390 | [NWZ_NVP_HDI] = 2, | ||
391 | [NWZ_NVP_HLD] = 80, | ||
392 | [NWZ_NVP_INS] = NWZ_NVP_INVALID, | ||
393 | [NWZ_NVP_IPT] = 70, | ||
394 | [NWZ_NVP_KAS] = 32, | ||
395 | [NWZ_NVP_LBI] = 20, | ||
396 | [NWZ_NVP_LYR] = NWZ_NVP_INVALID, | ||
397 | [NWZ_NVP_MAC] = 77, | ||
398 | [NWZ_NVP_MCR] = NWZ_NVP_INVALID, | ||
399 | [NWZ_NVP_MDK] = NWZ_NVP_INVALID, | ||
400 | [NWZ_NVP_MDL] = 8, | ||
401 | [NWZ_NVP_MID] = 16, | ||
402 | [NWZ_NVP_MLK] = NWZ_NVP_INVALID, | ||
403 | [NWZ_NVP_MSC] = 84, | ||
404 | [NWZ_NVP_MSO] = NWZ_NVP_INVALID, | ||
405 | [NWZ_NVP_MTM] = NWZ_NVP_INVALID, | ||
406 | [NWZ_NVP_MUK] = NWZ_NVP_INVALID, | ||
407 | [NWZ_NVP_NCP] = 31, | ||
408 | [NWZ_NVP_NVR] = NWZ_NVP_INVALID, | ||
409 | [NWZ_NVP_PCD] = 26, | ||
410 | [NWZ_NVP_PCI] = NWZ_NVP_INVALID, | ||
411 | [NWZ_NVP_PRK] = NWZ_NVP_INVALID, | ||
412 | [NWZ_NVP_PSK] = NWZ_NVP_INVALID, | ||
413 | [NWZ_NVP_PTS] = 75, | ||
414 | [NWZ_NVP_RBT] = NWZ_NVP_INVALID, | ||
415 | [NWZ_NVP_RND] = 28, | ||
416 | [NWZ_NVP_RTC] = 34, | ||
417 | [NWZ_NVP_SDC] = NWZ_NVP_INVALID, | ||
418 | [NWZ_NVP_SDP] = 30, | ||
419 | [NWZ_NVP_SER] = 4, | ||
420 | [NWZ_NVP_SFI] = NWZ_NVP_INVALID, | ||
421 | [NWZ_NVP_SHE] = NWZ_NVP_INVALID, | ||
422 | [NWZ_NVP_SHP] = 11, | ||
423 | [NWZ_NVP_SID] = NWZ_NVP_INVALID, | ||
424 | [NWZ_NVP_SKD] = 81, | ||
425 | [NWZ_NVP_SKT] = 76, | ||
426 | [NWZ_NVP_SKU] = NWZ_NVP_INVALID, | ||
427 | [NWZ_NVP_SLP] = 69, | ||
428 | [NWZ_NVP_SPS] = 83, | ||
429 | [NWZ_NVP_SYI] = 24, | ||
430 | [NWZ_NVP_TR0] = 14, | ||
431 | [NWZ_NVP_TR1] = 15, | ||
432 | [NWZ_NVP_TST] = 17, | ||
433 | [NWZ_NVP_UBP] = 23, | ||
434 | [NWZ_NVP_UFN] = 29, | ||
435 | [NWZ_NVP_UMS] = NWZ_NVP_INVALID, | ||
436 | [NWZ_NVP_UPS] = NWZ_NVP_INVALID, | ||
437 | [NWZ_NVP_VRT] = NWZ_NVP_INVALID, | ||
438 | }; | ||
439 | |||
440 | static int nvp_index_f505c8[NWZ_NVP_COUNT] = | ||
441 | { | ||
442 | [NWZ_NVP_APD] = 78, | ||
443 | [NWZ_NVP_APP] = 5, | ||
444 | [NWZ_NVP_BFD] = 88, | ||
445 | [NWZ_NVP_BFP] = 89, | ||
446 | [NWZ_NVP_BLF] = 79, | ||
447 | [NWZ_NVP_BML] = 87, | ||
448 | [NWZ_NVP_BOK] = 10, | ||
449 | [NWZ_NVP_BPR] = 35, | ||
450 | [NWZ_NVP_BTC] = 27, | ||
451 | [NWZ_NVP_BTI] = 1, | ||
452 | [NWZ_NVP_CGP] = NWZ_NVP_INVALID, | ||
453 | [NWZ_NVP_CLV] = 68, | ||
454 | [NWZ_NVP_CNG] = 3, | ||
455 | [NWZ_NVP_CTR] = NWZ_NVP_INVALID, | ||
456 | [NWZ_NVP_DBA] = 12, | ||
457 | [NWZ_NVP_DBG] = 0, | ||
458 | [NWZ_NVP_DBI] = NWZ_NVP_INVALID, | ||
459 | [NWZ_NVP_DBV] = 13, | ||
460 | [NWZ_NVP_DCC] = 7, | ||
461 | [NWZ_NVP_DOR] = 21, | ||
462 | [NWZ_NVP_E00] = 36, | ||
463 | [NWZ_NVP_E01] = 37, | ||
464 | [NWZ_NVP_E02] = 38, | ||
465 | [NWZ_NVP_E03] = 39, | ||
466 | [NWZ_NVP_E04] = 40, | ||
467 | [NWZ_NVP_E05] = 41, | ||
468 | [NWZ_NVP_E06] = 42, | ||
469 | [NWZ_NVP_E07] = 43, | ||
470 | [NWZ_NVP_E08] = 44, | ||
471 | [NWZ_NVP_E09] = 45, | ||
472 | [NWZ_NVP_E10] = 46, | ||
473 | [NWZ_NVP_E11] = 47, | ||
474 | [NWZ_NVP_E12] = 48, | ||
475 | [NWZ_NVP_E13] = 49, | ||
476 | [NWZ_NVP_E14] = 50, | ||
477 | [NWZ_NVP_E15] = 51, | ||
478 | [NWZ_NVP_E16] = 52, | ||
479 | [NWZ_NVP_E17] = 53, | ||
480 | [NWZ_NVP_E18] = 54, | ||
481 | [NWZ_NVP_E19] = 55, | ||
482 | [NWZ_NVP_E20] = 56, | ||
483 | [NWZ_NVP_E21] = 57, | ||
484 | [NWZ_NVP_E22] = 58, | ||
485 | [NWZ_NVP_E23] = 59, | ||
486 | [NWZ_NVP_E24] = 60, | ||
487 | [NWZ_NVP_E25] = 61, | ||
488 | [NWZ_NVP_E26] = 62, | ||
489 | [NWZ_NVP_E27] = 63, | ||
490 | [NWZ_NVP_E28] = 64, | ||
491 | [NWZ_NVP_E29] = 65, | ||
492 | [NWZ_NVP_E30] = 66, | ||
493 | [NWZ_NVP_E31] = 67, | ||
494 | [NWZ_NVP_EDW] = 22, | ||
495 | [NWZ_NVP_ERI] = 6, | ||
496 | [NWZ_NVP_EXM] = 25, | ||
497 | [NWZ_NVP_FMP] = 82, | ||
498 | [NWZ_NVP_FNI] = NWZ_NVP_INVALID, | ||
499 | [NWZ_NVP_FPI] = NWZ_NVP_INVALID, | ||
500 | [NWZ_NVP_FUI] = 19, | ||
501 | [NWZ_NVP_FUP] = 9, | ||
502 | [NWZ_NVP_FUR] = NWZ_NVP_INVALID, | ||
503 | [NWZ_NVP_FVI] = NWZ_NVP_INVALID, | ||
504 | [NWZ_NVP_GTY] = 18, | ||
505 | [NWZ_NVP_HDI] = 2, | ||
506 | [NWZ_NVP_HLD] = 80, | ||
507 | [NWZ_NVP_INS] = NWZ_NVP_INVALID, | ||
508 | [NWZ_NVP_IPT] = 70, | ||
509 | [NWZ_NVP_KAS] = 32, | ||
510 | [NWZ_NVP_LBI] = 20, | ||
511 | [NWZ_NVP_LYR] = NWZ_NVP_INVALID, | ||
512 | [NWZ_NVP_MAC] = 77, | ||
513 | [NWZ_NVP_MCR] = 72, | ||
514 | [NWZ_NVP_MDK] = 73, | ||
515 | [NWZ_NVP_MDL] = 8, | ||
516 | [NWZ_NVP_MID] = 16, | ||
517 | [NWZ_NVP_MLK] = NWZ_NVP_INVALID, | ||
518 | [NWZ_NVP_MSC] = 84, | ||
519 | [NWZ_NVP_MSO] = NWZ_NVP_INVALID, | ||
520 | [NWZ_NVP_MTM] = 71, | ||
521 | [NWZ_NVP_MUK] = 74, | ||
522 | [NWZ_NVP_NCP] = 31, | ||
523 | [NWZ_NVP_NVR] = NWZ_NVP_INVALID, | ||
524 | [NWZ_NVP_PCD] = 26, | ||
525 | [NWZ_NVP_PCI] = NWZ_NVP_INVALID, | ||
526 | [NWZ_NVP_PRK] = NWZ_NVP_INVALID, | ||
527 | [NWZ_NVP_PSK] = 86, | ||
528 | [NWZ_NVP_PTS] = 75, | ||
529 | [NWZ_NVP_RBT] = NWZ_NVP_INVALID, | ||
530 | [NWZ_NVP_RND] = 28, | ||
531 | [NWZ_NVP_RTC] = 34, | ||
532 | [NWZ_NVP_SDC] = NWZ_NVP_INVALID, | ||
533 | [NWZ_NVP_SDP] = 30, | ||
534 | [NWZ_NVP_SER] = 4, | ||
535 | [NWZ_NVP_SFI] = 33, | ||
536 | [NWZ_NVP_SHE] = NWZ_NVP_INVALID, | ||
537 | [NWZ_NVP_SHP] = 11, | ||
538 | [NWZ_NVP_SID] = NWZ_NVP_INVALID, | ||
539 | [NWZ_NVP_SKD] = 81, | ||
540 | [NWZ_NVP_SKT] = 76, | ||
541 | [NWZ_NVP_SKU] = NWZ_NVP_INVALID, | ||
542 | [NWZ_NVP_SLP] = 69, | ||
543 | [NWZ_NVP_SPS] = 83, | ||
544 | [NWZ_NVP_SYI] = 24, | ||
545 | [NWZ_NVP_TR0] = 14, | ||
546 | [NWZ_NVP_TR1] = 15, | ||
547 | [NWZ_NVP_TST] = 17, | ||
548 | [NWZ_NVP_UBP] = 23, | ||
549 | [NWZ_NVP_UFN] = 29, | ||
550 | [NWZ_NVP_UMS] = NWZ_NVP_INVALID, | ||
551 | [NWZ_NVP_UPS] = NWZ_NVP_INVALID, | ||
552 | [NWZ_NVP_VRT] = 85, | ||
553 | }; | ||
554 | |||
555 | static int nvp_index_398250[NWZ_NVP_COUNT] = | ||
556 | { | ||
557 | [NWZ_NVP_APD] = 78, | ||
558 | [NWZ_NVP_APP] = NWZ_NVP_INVALID, | ||
559 | [NWZ_NVP_BFD] = 21, | ||
560 | [NWZ_NVP_BFP] = 20, | ||
561 | [NWZ_NVP_BLF] = 79, | ||
562 | [NWZ_NVP_BML] = 22, | ||
563 | [NWZ_NVP_BOK] = NWZ_NVP_INVALID, | ||
564 | [NWZ_NVP_BPR] = 19, | ||
565 | [NWZ_NVP_BTC] = 85, | ||
566 | [NWZ_NVP_BTI] = 72, | ||
567 | [NWZ_NVP_CGP] = NWZ_NVP_INVALID, | ||
568 | [NWZ_NVP_CLV] = 68, | ||
569 | [NWZ_NVP_CNG] = 23, | ||
570 | [NWZ_NVP_CTR] = 90, | ||
571 | [NWZ_NVP_DBA] = NWZ_NVP_INVALID, | ||
572 | [NWZ_NVP_DBG] = 0, | ||
573 | [NWZ_NVP_DBI] = 88, | ||
574 | [NWZ_NVP_DBV] = 25, | ||
575 | [NWZ_NVP_DCC] = NWZ_NVP_INVALID, | ||
576 | [NWZ_NVP_DOR] = NWZ_NVP_INVALID, | ||
577 | [NWZ_NVP_E00] = 36, | ||
578 | [NWZ_NVP_E01] = 37, | ||
579 | [NWZ_NVP_E02] = 38, | ||
580 | [NWZ_NVP_E03] = 39, | ||
581 | [NWZ_NVP_E04] = 40, | ||
582 | [NWZ_NVP_E05] = 41, | ||
583 | [NWZ_NVP_E06] = 42, | ||
584 | [NWZ_NVP_E07] = 43, | ||
585 | [NWZ_NVP_E08] = 44, | ||
586 | [NWZ_NVP_E09] = 45, | ||
587 | [NWZ_NVP_E10] = 46, | ||
588 | [NWZ_NVP_E11] = 47, | ||
589 | [NWZ_NVP_E12] = 48, | ||
590 | [NWZ_NVP_E13] = 49, | ||
591 | [NWZ_NVP_E14] = 50, | ||
592 | [NWZ_NVP_E15] = 51, | ||
593 | [NWZ_NVP_E16] = 52, | ||
594 | [NWZ_NVP_E17] = 53, | ||
595 | [NWZ_NVP_E18] = 54, | ||
596 | [NWZ_NVP_E19] = 55, | ||
597 | [NWZ_NVP_E20] = 56, | ||
598 | [NWZ_NVP_E21] = 57, | ||
599 | [NWZ_NVP_E22] = 58, | ||
600 | [NWZ_NVP_E23] = 59, | ||
601 | [NWZ_NVP_E24] = 60, | ||
602 | [NWZ_NVP_E25] = 61, | ||
603 | [NWZ_NVP_E26] = 62, | ||
604 | [NWZ_NVP_E27] = 63, | ||
605 | [NWZ_NVP_E28] = 64, | ||
606 | [NWZ_NVP_E29] = 65, | ||
607 | [NWZ_NVP_E30] = 66, | ||
608 | [NWZ_NVP_E31] = 67, | ||
609 | [NWZ_NVP_EDW] = 71, | ||
610 | [NWZ_NVP_ERI] = 76, | ||
611 | [NWZ_NVP_EXM] = NWZ_NVP_INVALID, | ||
612 | [NWZ_NVP_FMP] = 15, | ||
613 | [NWZ_NVP_FNI] = 82, | ||
614 | [NWZ_NVP_FPI] = 33, | ||
615 | [NWZ_NVP_FUI] = 75, | ||
616 | [NWZ_NVP_FUP] = 3, | ||
617 | [NWZ_NVP_FUR] = 26, | ||
618 | [NWZ_NVP_FVI] = 31, | ||
619 | [NWZ_NVP_GTY] = 14, | ||
620 | [NWZ_NVP_HDI] = 73, | ||
621 | [NWZ_NVP_HLD] = 5, | ||
622 | [NWZ_NVP_INS] = 89, | ||
623 | [NWZ_NVP_IPT] = NWZ_NVP_INVALID, | ||
624 | [NWZ_NVP_KAS] = 11, | ||
625 | [NWZ_NVP_LBI] = 74, | ||
626 | [NWZ_NVP_LYR] = 24, | ||
627 | [NWZ_NVP_MAC] = 32, | ||
628 | [NWZ_NVP_MCR] = NWZ_NVP_INVALID, | ||
629 | [NWZ_NVP_MDK] = 30, | ||
630 | [NWZ_NVP_MDL] = NWZ_NVP_INVALID, | ||
631 | [NWZ_NVP_MID] = 7, | ||
632 | [NWZ_NVP_MLK] = NWZ_NVP_INVALID, | ||
633 | [NWZ_NVP_MSC] = NWZ_NVP_INVALID, | ||
634 | [NWZ_NVP_MSO] = 86, | ||
635 | [NWZ_NVP_MTM] = NWZ_NVP_INVALID, | ||
636 | [NWZ_NVP_MUK] = NWZ_NVP_INVALID, | ||
637 | [NWZ_NVP_NCP] = 17, | ||
638 | [NWZ_NVP_NVR] = 77, | ||
639 | [NWZ_NVP_PCD] = 8, | ||
640 | [NWZ_NVP_PCI] = 87, | ||
641 | [NWZ_NVP_PRK] = 4, | ||
642 | [NWZ_NVP_PSK] = 18, | ||
643 | [NWZ_NVP_PTS] = NWZ_NVP_INVALID, | ||
644 | [NWZ_NVP_RBT] = 70, | ||
645 | [NWZ_NVP_RND] = NWZ_NVP_INVALID, | ||
646 | [NWZ_NVP_RTC] = 6, | ||
647 | [NWZ_NVP_SDC] = NWZ_NVP_INVALID, | ||
648 | [NWZ_NVP_SDP] = 16, | ||
649 | [NWZ_NVP_SER] = 9, | ||
650 | [NWZ_NVP_SFI] = NWZ_NVP_INVALID, | ||
651 | [NWZ_NVP_SHE] = 84, | ||
652 | [NWZ_NVP_SHP] = 12, | ||
653 | [NWZ_NVP_SID] = 83, | ||
654 | [NWZ_NVP_SKD] = 28, | ||
655 | [NWZ_NVP_SKT] = NWZ_NVP_INVALID, | ||
656 | [NWZ_NVP_SKU] = 91, | ||
657 | [NWZ_NVP_SLP] = 80, | ||
658 | [NWZ_NVP_SPS] = 69, | ||
659 | [NWZ_NVP_SYI] = 1, | ||
660 | [NWZ_NVP_TR0] = 34, | ||
661 | [NWZ_NVP_TR1] = 35, | ||
662 | [NWZ_NVP_TST] = 13, | ||
663 | [NWZ_NVP_UBP] = 2, | ||
664 | [NWZ_NVP_UFN] = 10, | ||
665 | [NWZ_NVP_UMS] = 27, | ||
666 | [NWZ_NVP_UPS] = 29, | ||
667 | [NWZ_NVP_VRT] = 81, | ||
668 | }; | ||
669 | |||
670 | static int nvp_index_6485c8[NWZ_NVP_COUNT] = | ||
671 | { | ||
672 | [NWZ_NVP_APD] = 78, | ||
673 | [NWZ_NVP_APP] = NWZ_NVP_INVALID, | ||
674 | [NWZ_NVP_BFD] = 21, | ||
675 | [NWZ_NVP_BFP] = 20, | ||
676 | [NWZ_NVP_BLF] = 79, | ||
677 | [NWZ_NVP_BML] = 22, | ||
678 | [NWZ_NVP_BOK] = 4, | ||
679 | [NWZ_NVP_BPR] = 19, | ||
680 | [NWZ_NVP_BTC] = 85, | ||
681 | [NWZ_NVP_BTI] = 72, | ||
682 | [NWZ_NVP_CGP] = NWZ_NVP_INVALID, | ||
683 | [NWZ_NVP_CLV] = 68, | ||
684 | [NWZ_NVP_CNG] = 23, | ||
685 | [NWZ_NVP_CTR] = NWZ_NVP_INVALID, | ||
686 | [NWZ_NVP_DBA] = 24, | ||
687 | [NWZ_NVP_DBG] = 0, | ||
688 | [NWZ_NVP_DBI] = 88, | ||
689 | [NWZ_NVP_DBV] = 25, | ||
690 | [NWZ_NVP_DCC] = 31, | ||
691 | [NWZ_NVP_DOR] = 26, | ||
692 | [NWZ_NVP_E00] = 36, | ||
693 | [NWZ_NVP_E01] = 37, | ||
694 | [NWZ_NVP_E02] = 38, | ||
695 | [NWZ_NVP_E03] = 39, | ||
696 | [NWZ_NVP_E04] = 40, | ||
697 | [NWZ_NVP_E05] = 41, | ||
698 | [NWZ_NVP_E06] = 42, | ||
699 | [NWZ_NVP_E07] = 43, | ||
700 | [NWZ_NVP_E08] = 44, | ||
701 | [NWZ_NVP_E09] = 45, | ||
702 | [NWZ_NVP_E10] = 46, | ||
703 | [NWZ_NVP_E11] = 47, | ||
704 | [NWZ_NVP_E12] = 48, | ||
705 | [NWZ_NVP_E13] = 49, | ||
706 | [NWZ_NVP_E14] = 50, | ||
707 | [NWZ_NVP_E15] = 51, | ||
708 | [NWZ_NVP_E16] = 52, | ||
709 | [NWZ_NVP_E17] = 53, | ||
710 | [NWZ_NVP_E18] = 54, | ||
711 | [NWZ_NVP_E19] = 55, | ||
712 | [NWZ_NVP_E20] = 56, | ||
713 | [NWZ_NVP_E21] = 57, | ||
714 | [NWZ_NVP_E22] = 58, | ||
715 | [NWZ_NVP_E23] = 59, | ||
716 | [NWZ_NVP_E24] = 60, | ||
717 | [NWZ_NVP_E25] = 61, | ||
718 | [NWZ_NVP_E26] = 62, | ||
719 | [NWZ_NVP_E27] = 63, | ||
720 | [NWZ_NVP_E28] = 64, | ||
721 | [NWZ_NVP_E29] = 65, | ||
722 | [NWZ_NVP_E30] = 66, | ||
723 | [NWZ_NVP_E31] = 67, | ||
724 | [NWZ_NVP_EDW] = 71, | ||
725 | [NWZ_NVP_ERI] = 76, | ||
726 | [NWZ_NVP_EXM] = NWZ_NVP_INVALID, | ||
727 | [NWZ_NVP_FMP] = 15, | ||
728 | [NWZ_NVP_FNI] = 82, | ||
729 | [NWZ_NVP_FPI] = NWZ_NVP_INVALID, | ||
730 | [NWZ_NVP_FUI] = 75, | ||
731 | [NWZ_NVP_FUP] = 3, | ||
732 | [NWZ_NVP_FUR] = NWZ_NVP_INVALID, | ||
733 | [NWZ_NVP_FVI] = NWZ_NVP_INVALID, | ||
734 | [NWZ_NVP_GTY] = 14, | ||
735 | [NWZ_NVP_HDI] = 73, | ||
736 | [NWZ_NVP_HLD] = 5, | ||
737 | [NWZ_NVP_INS] = NWZ_NVP_INVALID, | ||
738 | [NWZ_NVP_IPT] = NWZ_NVP_INVALID, | ||
739 | [NWZ_NVP_KAS] = 11, | ||
740 | [NWZ_NVP_LBI] = 74, | ||
741 | [NWZ_NVP_LYR] = NWZ_NVP_INVALID, | ||
742 | [NWZ_NVP_MAC] = NWZ_NVP_INVALID, | ||
743 | [NWZ_NVP_MCR] = NWZ_NVP_INVALID, | ||
744 | [NWZ_NVP_MDK] = 30, | ||
745 | [NWZ_NVP_MDL] = 70, | ||
746 | [NWZ_NVP_MID] = 7, | ||
747 | [NWZ_NVP_MLK] = 84, | ||
748 | [NWZ_NVP_MSC] = NWZ_NVP_INVALID, | ||
749 | [NWZ_NVP_MSO] = 86, | ||
750 | [NWZ_NVP_MTM] = 33, | ||
751 | [NWZ_NVP_MUK] = NWZ_NVP_INVALID, | ||
752 | [NWZ_NVP_NCP] = 17, | ||
753 | [NWZ_NVP_NVR] = NWZ_NVP_INVALID, | ||
754 | [NWZ_NVP_PCD] = 8, | ||
755 | [NWZ_NVP_PCI] = 87, | ||
756 | [NWZ_NVP_PRK] = NWZ_NVP_INVALID, | ||
757 | [NWZ_NVP_PSK] = 18, | ||
758 | [NWZ_NVP_PTS] = 77, | ||
759 | [NWZ_NVP_RBT] = NWZ_NVP_INVALID, | ||
760 | [NWZ_NVP_RND] = 27, | ||
761 | [NWZ_NVP_RTC] = 6, | ||
762 | [NWZ_NVP_SDC] = NWZ_NVP_INVALID, | ||
763 | [NWZ_NVP_SDP] = 16, | ||
764 | [NWZ_NVP_SER] = 9, | ||
765 | [NWZ_NVP_SFI] = 29, | ||
766 | [NWZ_NVP_SHE] = NWZ_NVP_INVALID, | ||
767 | [NWZ_NVP_SHP] = 12, | ||
768 | [NWZ_NVP_SID] = 83, | ||
769 | [NWZ_NVP_SKD] = 28, | ||
770 | [NWZ_NVP_SKT] = 32, | ||
771 | [NWZ_NVP_SKU] = NWZ_NVP_INVALID, | ||
772 | [NWZ_NVP_SLP] = 80, | ||
773 | [NWZ_NVP_SPS] = 69, | ||
774 | [NWZ_NVP_SYI] = 1, | ||
775 | [NWZ_NVP_TR0] = 34, | ||
776 | [NWZ_NVP_TR1] = 35, | ||
777 | [NWZ_NVP_TST] = 13, | ||
778 | [NWZ_NVP_UBP] = 2, | ||
779 | [NWZ_NVP_UFN] = 10, | ||
780 | [NWZ_NVP_UMS] = NWZ_NVP_INVALID, | ||
781 | [NWZ_NVP_UPS] = NWZ_NVP_INVALID, | ||
782 | [NWZ_NVP_VRT] = 81, | ||
783 | }; | ||
784 | |||
785 | static int nvp_index_92faee[NWZ_NVP_COUNT] = | ||
786 | { | ||
787 | [NWZ_NVP_APD] = 78, | ||
788 | [NWZ_NVP_APP] = NWZ_NVP_INVALID, | ||
789 | [NWZ_NVP_BFD] = 21, | ||
790 | [NWZ_NVP_BFP] = 20, | ||
791 | [NWZ_NVP_BLF] = 79, | ||
792 | [NWZ_NVP_BML] = 22, | ||
793 | [NWZ_NVP_BOK] = 4, | ||
794 | [NWZ_NVP_BPR] = 19, | ||
795 | [NWZ_NVP_BTC] = 85, | ||
796 | [NWZ_NVP_BTI] = 72, | ||
797 | [NWZ_NVP_CGP] = NWZ_NVP_INVALID, | ||
798 | [NWZ_NVP_CLV] = 68, | ||
799 | [NWZ_NVP_CNG] = 23, | ||
800 | [NWZ_NVP_CTR] = NWZ_NVP_INVALID, | ||
801 | [NWZ_NVP_DBA] = 24, | ||
802 | [NWZ_NVP_DBG] = 0, | ||
803 | [NWZ_NVP_DBI] = 88, | ||
804 | [NWZ_NVP_DBV] = 25, | ||
805 | [NWZ_NVP_DCC] = 31, | ||
806 | [NWZ_NVP_DOR] = 26, | ||
807 | [NWZ_NVP_E00] = 36, | ||
808 | [NWZ_NVP_E01] = 37, | ||
809 | [NWZ_NVP_E02] = 38, | ||
810 | [NWZ_NVP_E03] = 39, | ||
811 | [NWZ_NVP_E04] = 40, | ||
812 | [NWZ_NVP_E05] = 41, | ||
813 | [NWZ_NVP_E06] = 42, | ||
814 | [NWZ_NVP_E07] = 43, | ||
815 | [NWZ_NVP_E08] = 44, | ||
816 | [NWZ_NVP_E09] = 45, | ||
817 | [NWZ_NVP_E10] = 46, | ||
818 | [NWZ_NVP_E11] = 47, | ||
819 | [NWZ_NVP_E12] = 48, | ||
820 | [NWZ_NVP_E13] = 49, | ||
821 | [NWZ_NVP_E14] = 50, | ||
822 | [NWZ_NVP_E15] = 51, | ||
823 | [NWZ_NVP_E16] = 52, | ||
824 | [NWZ_NVP_E17] = 53, | ||
825 | [NWZ_NVP_E18] = 54, | ||
826 | [NWZ_NVP_E19] = 55, | ||
827 | [NWZ_NVP_E20] = 56, | ||
828 | [NWZ_NVP_E21] = 57, | ||
829 | [NWZ_NVP_E22] = 58, | ||
830 | [NWZ_NVP_E23] = 59, | ||
831 | [NWZ_NVP_E24] = 60, | ||
832 | [NWZ_NVP_E25] = 61, | ||
833 | [NWZ_NVP_E26] = 62, | ||
834 | [NWZ_NVP_E27] = 63, | ||
835 | [NWZ_NVP_E28] = 64, | ||
836 | [NWZ_NVP_E29] = 65, | ||
837 | [NWZ_NVP_E30] = 66, | ||
838 | [NWZ_NVP_E31] = 67, | ||
839 | [NWZ_NVP_EDW] = 71, | ||
840 | [NWZ_NVP_ERI] = 76, | ||
841 | [NWZ_NVP_EXM] = NWZ_NVP_INVALID, | ||
842 | [NWZ_NVP_FMP] = 15, | ||
843 | [NWZ_NVP_FNI] = 82, | ||
844 | [NWZ_NVP_FPI] = NWZ_NVP_INVALID, | ||
845 | [NWZ_NVP_FUI] = 75, | ||
846 | [NWZ_NVP_FUP] = 3, | ||
847 | [NWZ_NVP_FUR] = NWZ_NVP_INVALID, | ||
848 | [NWZ_NVP_FVI] = NWZ_NVP_INVALID, | ||
849 | [NWZ_NVP_GTY] = 14, | ||
850 | [NWZ_NVP_HDI] = 73, | ||
851 | [NWZ_NVP_HLD] = 5, | ||
852 | [NWZ_NVP_INS] = NWZ_NVP_INVALID, | ||
853 | [NWZ_NVP_IPT] = NWZ_NVP_INVALID, | ||
854 | [NWZ_NVP_KAS] = 11, | ||
855 | [NWZ_NVP_LBI] = 74, | ||
856 | [NWZ_NVP_LYR] = NWZ_NVP_INVALID, | ||
857 | [NWZ_NVP_MAC] = NWZ_NVP_INVALID, | ||
858 | [NWZ_NVP_MCR] = NWZ_NVP_INVALID, | ||
859 | [NWZ_NVP_MDK] = 30, | ||
860 | [NWZ_NVP_MDL] = 70, | ||
861 | [NWZ_NVP_MID] = 7, | ||
862 | [NWZ_NVP_MLK] = 84, | ||
863 | [NWZ_NVP_MSC] = NWZ_NVP_INVALID, | ||
864 | [NWZ_NVP_MSO] = 86, | ||
865 | [NWZ_NVP_MTM] = 33, | ||
866 | [NWZ_NVP_MUK] = NWZ_NVP_INVALID, | ||
867 | [NWZ_NVP_NCP] = 17, | ||
868 | [NWZ_NVP_NVR] = NWZ_NVP_INVALID, | ||
869 | [NWZ_NVP_PCD] = 8, | ||
870 | [NWZ_NVP_PCI] = 87, | ||
871 | [NWZ_NVP_PRK] = NWZ_NVP_INVALID, | ||
872 | [NWZ_NVP_PSK] = 18, | ||
873 | [NWZ_NVP_PTS] = 77, | ||
874 | [NWZ_NVP_RBT] = NWZ_NVP_INVALID, | ||
875 | [NWZ_NVP_RND] = 27, | ||
876 | [NWZ_NVP_RTC] = 6, | ||
877 | [NWZ_NVP_SDC] = 89, | ||
878 | [NWZ_NVP_SDP] = 16, | ||
879 | [NWZ_NVP_SER] = 9, | ||
880 | [NWZ_NVP_SFI] = 29, | ||
881 | [NWZ_NVP_SHE] = NWZ_NVP_INVALID, | ||
882 | [NWZ_NVP_SHP] = 12, | ||
883 | [NWZ_NVP_SID] = 83, | ||
884 | [NWZ_NVP_SKD] = 28, | ||
885 | [NWZ_NVP_SKT] = 32, | ||
886 | [NWZ_NVP_SKU] = NWZ_NVP_INVALID, | ||
887 | [NWZ_NVP_SLP] = 80, | ||
888 | [NWZ_NVP_SPS] = 69, | ||
889 | [NWZ_NVP_SYI] = 1, | ||
890 | [NWZ_NVP_TR0] = 34, | ||
891 | [NWZ_NVP_TR1] = 35, | ||
892 | [NWZ_NVP_TST] = 13, | ||
893 | [NWZ_NVP_UBP] = 2, | ||
894 | [NWZ_NVP_UFN] = 10, | ||
895 | [NWZ_NVP_UMS] = NWZ_NVP_INVALID, | ||
896 | [NWZ_NVP_UPS] = NWZ_NVP_INVALID, | ||
897 | [NWZ_NVP_VRT] = 81, | ||
898 | }; | ||
899 | |||
900 | static int nvp_index_c8fc85[NWZ_NVP_COUNT] = | ||
901 | { | ||
902 | [NWZ_NVP_APD] = 78, | ||
903 | [NWZ_NVP_APP] = 5, | ||
904 | [NWZ_NVP_BFD] = 88, | ||
905 | [NWZ_NVP_BFP] = 89, | ||
906 | [NWZ_NVP_BLF] = 79, | ||
907 | [NWZ_NVP_BML] = 87, | ||
908 | [NWZ_NVP_BOK] = 10, | ||
909 | [NWZ_NVP_BPR] = 35, | ||
910 | [NWZ_NVP_BTC] = NWZ_NVP_INVALID, | ||
911 | [NWZ_NVP_BTI] = 1, | ||
912 | [NWZ_NVP_CGP] = 27, | ||
913 | [NWZ_NVP_CLV] = 68, | ||
914 | [NWZ_NVP_CNG] = 3, | ||
915 | [NWZ_NVP_CTR] = NWZ_NVP_INVALID, | ||
916 | [NWZ_NVP_DBA] = 12, | ||
917 | [NWZ_NVP_DBG] = 0, | ||
918 | [NWZ_NVP_DBI] = NWZ_NVP_INVALID, | ||
919 | [NWZ_NVP_DBV] = 13, | ||
920 | [NWZ_NVP_DCC] = 7, | ||
921 | [NWZ_NVP_DOR] = 21, | ||
922 | [NWZ_NVP_E00] = 36, | ||
923 | [NWZ_NVP_E01] = 37, | ||
924 | [NWZ_NVP_E02] = 38, | ||
925 | [NWZ_NVP_E03] = 39, | ||
926 | [NWZ_NVP_E04] = 40, | ||
927 | [NWZ_NVP_E05] = 41, | ||
928 | [NWZ_NVP_E06] = 42, | ||
929 | [NWZ_NVP_E07] = 43, | ||
930 | [NWZ_NVP_E08] = 44, | ||
931 | [NWZ_NVP_E09] = 45, | ||
932 | [NWZ_NVP_E10] = 46, | ||
933 | [NWZ_NVP_E11] = 47, | ||
934 | [NWZ_NVP_E12] = 48, | ||
935 | [NWZ_NVP_E13] = 49, | ||
936 | [NWZ_NVP_E14] = 50, | ||
937 | [NWZ_NVP_E15] = 51, | ||
938 | [NWZ_NVP_E16] = 52, | ||
939 | [NWZ_NVP_E17] = 53, | ||
940 | [NWZ_NVP_E18] = 54, | ||
941 | [NWZ_NVP_E19] = 55, | ||
942 | [NWZ_NVP_E20] = 56, | ||
943 | [NWZ_NVP_E21] = 57, | ||
944 | [NWZ_NVP_E22] = 58, | ||
945 | [NWZ_NVP_E23] = 59, | ||
946 | [NWZ_NVP_E24] = 60, | ||
947 | [NWZ_NVP_E25] = 61, | ||
948 | [NWZ_NVP_E26] = 62, | ||
949 | [NWZ_NVP_E27] = 63, | ||
950 | [NWZ_NVP_E28] = 64, | ||
951 | [NWZ_NVP_E29] = 65, | ||
952 | [NWZ_NVP_E30] = 66, | ||
953 | [NWZ_NVP_E31] = 67, | ||
954 | [NWZ_NVP_EDW] = 22, | ||
955 | [NWZ_NVP_ERI] = 6, | ||
956 | [NWZ_NVP_EXM] = 25, | ||
957 | [NWZ_NVP_FMP] = 82, | ||
958 | [NWZ_NVP_FNI] = NWZ_NVP_INVALID, | ||
959 | [NWZ_NVP_FPI] = NWZ_NVP_INVALID, | ||
960 | [NWZ_NVP_FUI] = 19, | ||
961 | [NWZ_NVP_FUP] = 9, | ||
962 | [NWZ_NVP_FUR] = NWZ_NVP_INVALID, | ||
963 | [NWZ_NVP_FVI] = NWZ_NVP_INVALID, | ||
964 | [NWZ_NVP_GTY] = 18, | ||
965 | [NWZ_NVP_HDI] = 2, | ||
966 | [NWZ_NVP_HLD] = 80, | ||
967 | [NWZ_NVP_INS] = NWZ_NVP_INVALID, | ||
968 | [NWZ_NVP_IPT] = 70, | ||
969 | [NWZ_NVP_KAS] = 32, | ||
970 | [NWZ_NVP_LBI] = 20, | ||
971 | [NWZ_NVP_LYR] = NWZ_NVP_INVALID, | ||
972 | [NWZ_NVP_MAC] = 77, | ||
973 | [NWZ_NVP_MCR] = 72, | ||
974 | [NWZ_NVP_MDK] = 73, | ||
975 | [NWZ_NVP_MDL] = 8, | ||
976 | [NWZ_NVP_MID] = 16, | ||
977 | [NWZ_NVP_MLK] = NWZ_NVP_INVALID, | ||
978 | [NWZ_NVP_MSC] = 84, | ||
979 | [NWZ_NVP_MSO] = NWZ_NVP_INVALID, | ||
980 | [NWZ_NVP_MTM] = 71, | ||
981 | [NWZ_NVP_MUK] = 74, | ||
982 | [NWZ_NVP_NCP] = 31, | ||
983 | [NWZ_NVP_NVR] = NWZ_NVP_INVALID, | ||
984 | [NWZ_NVP_PCD] = 26, | ||
985 | [NWZ_NVP_PCI] = NWZ_NVP_INVALID, | ||
986 | [NWZ_NVP_PRK] = NWZ_NVP_INVALID, | ||
987 | [NWZ_NVP_PSK] = 86, | ||
988 | [NWZ_NVP_PTS] = 75, | ||
989 | [NWZ_NVP_RBT] = NWZ_NVP_INVALID, | ||
990 | [NWZ_NVP_RND] = 28, | ||
991 | [NWZ_NVP_RTC] = 34, | ||
992 | [NWZ_NVP_SDC] = NWZ_NVP_INVALID, | ||
993 | [NWZ_NVP_SDP] = 30, | ||
994 | [NWZ_NVP_SER] = 4, | ||
995 | [NWZ_NVP_SFI] = 33, | ||
996 | [NWZ_NVP_SHE] = NWZ_NVP_INVALID, | ||
997 | [NWZ_NVP_SHP] = 11, | ||
998 | [NWZ_NVP_SID] = NWZ_NVP_INVALID, | ||
999 | [NWZ_NVP_SKD] = 81, | ||
1000 | [NWZ_NVP_SKT] = 76, | ||
1001 | [NWZ_NVP_SKU] = NWZ_NVP_INVALID, | ||
1002 | [NWZ_NVP_SLP] = 69, | ||
1003 | [NWZ_NVP_SPS] = 83, | ||
1004 | [NWZ_NVP_SYI] = 24, | ||
1005 | [NWZ_NVP_TR0] = 14, | ||
1006 | [NWZ_NVP_TR1] = 15, | ||
1007 | [NWZ_NVP_TST] = 17, | ||
1008 | [NWZ_NVP_UBP] = 23, | ||
1009 | [NWZ_NVP_UFN] = 29, | ||
1010 | [NWZ_NVP_UMS] = NWZ_NVP_INVALID, | ||
1011 | [NWZ_NVP_UPS] = NWZ_NVP_INVALID, | ||
1012 | [NWZ_NVP_VRT] = 85, | ||
1013 | }; | ||
1014 | |||
1015 | struct nwz_nvp_info_t nwz_nvp[NWZ_NVP_COUNT] = | ||
1016 | { | ||
1017 | [NWZ_NVP_APD] = { "apd", 4, "application debug mode flag" }, | ||
1018 | [NWZ_NVP_APP] = { "app", 4096, "application parameter" }, | ||
1019 | [NWZ_NVP_BFD] = { "bfd", 512, "btmw factory scdb" }, | ||
1020 | [NWZ_NVP_BFP] = { "bfp", 512, "btmw factory pair info" }, | ||
1021 | [NWZ_NVP_BLF] = { "blf", 4, "browser log mode flag" }, | ||
1022 | [NWZ_NVP_BML] = { "bml", 4, "btmw log mode flag" }, | ||
1023 | [NWZ_NVP_BOK] = { "bok", 4, "beep ok flag" }, | ||
1024 | [NWZ_NVP_BPR] = { "bpr", 2048, "bluetooth address | bluetooth parameter" }, | ||
1025 | [NWZ_NVP_BTC] = { "btc", 4, "battery calibration" }, | ||
1026 | [NWZ_NVP_BTI] = { "bti", 262144, "boot image" }, | ||
1027 | [NWZ_NVP_CGP] = { "cgp", 0, "" }, | ||
1028 | [NWZ_NVP_CLV] = { "clv", 4, "color variation" }, | ||
1029 | [NWZ_NVP_CNG] = { "cng", 704, "aad/empr key | aad key" }, | ||
1030 | [NWZ_NVP_CTR] = { "ctr", 0, "" }, | ||
1031 | [NWZ_NVP_DBA] = { "dba", 160, "aad icv" }, | ||
1032 | [NWZ_NVP_DBG] = { "dbg", 0, "" }, | ||
1033 | [NWZ_NVP_DBI] = { "dbi", 262144, "dead battery image" }, | ||
1034 | [NWZ_NVP_DBV] = { "dbv", 520, "empr icv | empr key" }, | ||
1035 | [NWZ_NVP_DCC] = { "dcc", 20, "secure clock" }, | ||
1036 | [NWZ_NVP_DOR] = { "dor", 4, "key mode (debug/release)" }, | ||
1037 | [NWZ_NVP_E00] = { "e00", 1024, "EMPR 0" }, | ||
1038 | [NWZ_NVP_E01] = { "e01", 1024, "EMPR 1" }, | ||
1039 | [NWZ_NVP_E02] = { "e02", 1024, "EMPR 2" }, | ||
1040 | [NWZ_NVP_E03] = { "e03", 1024, "EMPR 3" }, | ||
1041 | [NWZ_NVP_E04] = { "e04", 1024, "EMPR 4" }, | ||
1042 | [NWZ_NVP_E05] = { "e05", 1024, "EMPR 5" }, | ||
1043 | [NWZ_NVP_E06] = { "e06", 1024, "EMPR 6" }, | ||
1044 | [NWZ_NVP_E07] = { "e07", 1024, "EMPR 7" }, | ||
1045 | [NWZ_NVP_E08] = { "e08", 1024, "EMPR 8" }, | ||
1046 | [NWZ_NVP_E09] = { "e09", 1024, "EMPR 9" }, | ||
1047 | [NWZ_NVP_E10] = { "e10", 1024, "EMPR 10" }, | ||
1048 | [NWZ_NVP_E11] = { "e11", 1024, "EMPR 11" }, | ||
1049 | [NWZ_NVP_E12] = { "e12", 1024, "EMPR 12" }, | ||
1050 | [NWZ_NVP_E13] = { "e13", 1024, "EMPR 13" }, | ||
1051 | [NWZ_NVP_E14] = { "e14", 1024, "EMPR 14" }, | ||
1052 | [NWZ_NVP_E15] = { "e15", 1024, "EMPR 15" }, | ||
1053 | [NWZ_NVP_E16] = { "e16", 1024, "EMPR 16" }, | ||
1054 | [NWZ_NVP_E17] = { "e17", 1024, "EMPR 17" }, | ||
1055 | [NWZ_NVP_E18] = { "e18", 1024, "EMPR 18" }, | ||
1056 | [NWZ_NVP_E19] = { "e19", 1024, "EMPR 19" }, | ||
1057 | [NWZ_NVP_E20] = { "e20", 1024, "EMPR 20" }, | ||
1058 | [NWZ_NVP_E21] = { "e21", 1024, "EMPR 21" }, | ||
1059 | [NWZ_NVP_E22] = { "e22", 1024, "EMPR 22" }, | ||
1060 | [NWZ_NVP_E23] = { "e23", 1024, "EMPR 23" }, | ||
1061 | [NWZ_NVP_E24] = { "e24", 1024, "EMPR 24" }, | ||
1062 | [NWZ_NVP_E25] = { "e25", 1024, "EMPR 25" }, | ||
1063 | [NWZ_NVP_E26] = { "e26", 1024, "EMPR 26" }, | ||
1064 | [NWZ_NVP_E27] = { "e27", 1024, "EMPR 27" }, | ||
1065 | [NWZ_NVP_E28] = { "e28", 1024, "EMPR 28" }, | ||
1066 | [NWZ_NVP_E29] = { "e29", 1024, "EMPR 29" }, | ||
1067 | [NWZ_NVP_E30] = { "e30", 1024, "EMPR 30" }, | ||
1068 | [NWZ_NVP_E31] = { "e31", 1024, "EMPR 31" }, | ||
1069 | [NWZ_NVP_EDW] = { "edw", 4, "quick shutdown flag" }, | ||
1070 | [NWZ_NVP_ERI] = { "eri", 262144, "update error image" }, | ||
1071 | [NWZ_NVP_EXM] = { "exm", 4, "exception monitor mode" }, | ||
1072 | [NWZ_NVP_FMP] = { "fmp", 16, "fm parameter" }, | ||
1073 | [NWZ_NVP_FNI] = { "fni", 4, "function information" }, | ||
1074 | [NWZ_NVP_FPI] = { "fpi", 0, "" }, | ||
1075 | [NWZ_NVP_FUI] = { "fui", 262144, "update image" }, | ||
1076 | [NWZ_NVP_FUP] = { "fup", 4, "firmware update flag" }, | ||
1077 | [NWZ_NVP_FUR] = { "fur", 0, "" }, | ||
1078 | [NWZ_NVP_FVI] = { "fvi", 0, "" }, | ||
1079 | [NWZ_NVP_GTY] = { "gty", 4, "getty mode flag" }, | ||
1080 | [NWZ_NVP_HDI] = { "hdi", 262144, "hold image" }, | ||
1081 | [NWZ_NVP_HLD] = { "hld", 4, "hold mode" }, | ||
1082 | [NWZ_NVP_INS] = { "ins", 0, "" }, | ||
1083 | [NWZ_NVP_IPT] = { "ipt", 4, "disable iptable flag" }, | ||
1084 | [NWZ_NVP_KAS] = { "kas", 64, "key and signature" }, | ||
1085 | [NWZ_NVP_LBI] = { "lbi", 262144, "low battery image" }, | ||
1086 | [NWZ_NVP_LYR] = { "lyr", 0, "" }, | ||
1087 | [NWZ_NVP_MAC] = { "mac", 6, "wifi mac address" }, | ||
1088 | [NWZ_NVP_MCR] = { "mcr", 16384, "marlin crl" }, | ||
1089 | [NWZ_NVP_MDK] = { "mdk", 33024, "marlin device key" }, | ||
1090 | [NWZ_NVP_MDL] = { "mdl", 8, "middleware parameter" }, | ||
1091 | [NWZ_NVP_MID] = { "mid", 64, "model id" }, | ||
1092 | [NWZ_NVP_MLK] = { "mlk", 4, "marlin key" }, | ||
1093 | [NWZ_NVP_MSC] = { "msc", 4, "mass storage class mode" }, | ||
1094 | [NWZ_NVP_MSO] = { "mso", 4, "MSC only mode flag" }, | ||
1095 | [NWZ_NVP_MTM] = { "mtm", 64, "marlin time" }, | ||
1096 | [NWZ_NVP_MUK] = { "muk", 24576, "marlin user key" }, | ||
1097 | [NWZ_NVP_NCP] = { "ncp", 64, "noise cancel driver parameter" }, | ||
1098 | [NWZ_NVP_NVR] = { "nvr", 0, "" }, | ||
1099 | [NWZ_NVP_PCD] = { "pcd", 5, "product code" }, | ||
1100 | [NWZ_NVP_PCI] = { "pci", 262144, "precharge image" }, | ||
1101 | [NWZ_NVP_PRK] = { "prk", 0, "" }, | ||
1102 | [NWZ_NVP_PSK] = { "psk", 512, "bluetooth pskey" }, | ||
1103 | [NWZ_NVP_PTS] = { "pts", 4, "wifi protected setup" }, | ||
1104 | [NWZ_NVP_RBT] = { "rbt", 0, "" }, | ||
1105 | [NWZ_NVP_RND] = { "rnd", 64, "wmt key | random data" }, | ||
1106 | [NWZ_NVP_RTC] = { "rtc", 16, "rtc alarm" }, | ||
1107 | [NWZ_NVP_SDC] = { "sdc", 4, "SD Card export flag" }, | ||
1108 | [NWZ_NVP_SDP] = { "sdp", 64, "sound driver parameter" }, | ||
1109 | [NWZ_NVP_SER] = { "ser", 16, "serial number" }, | ||
1110 | [NWZ_NVP_SFI] = { "sfi", 64, "starfish id" }, | ||
1111 | [NWZ_NVP_SHE] = { "she", 0, "" }, | ||
1112 | [NWZ_NVP_SHP] = { "shp", 32, "ship information" }, | ||
1113 | [NWZ_NVP_SID] = { "sid", 4, "service id" }, | ||
1114 | [NWZ_NVP_SKD] = { "skd", 8224, "slacker id file" }, | ||
1115 | [NWZ_NVP_SKT] = { "skt", 16, "slacker time" }, | ||
1116 | [NWZ_NVP_SKU] = { "sku", 0, "" }, | ||
1117 | [NWZ_NVP_SLP] = { "slp", 4, "time out to sleep" }, | ||
1118 | [NWZ_NVP_SPS] = { "sps", 4, "speaker ship info" }, | ||
1119 | [NWZ_NVP_SYI] = { "syi", 4, "system information" }, | ||
1120 | [NWZ_NVP_TR0] = { "tr0", 16384, "EKB 0" }, | ||
1121 | [NWZ_NVP_TR1] = { "tr1", 16384, "EKB 1" }, | ||
1122 | [NWZ_NVP_TST] = { "tst", 4, "test mode flag" }, | ||
1123 | [NWZ_NVP_UBP] = { "ubp", 32, "u-boot password" }, | ||
1124 | [NWZ_NVP_UFN] = { "ufn", 8, "update file name" }, | ||
1125 | [NWZ_NVP_UMS] = { "ums", 0, "" }, | ||
1126 | [NWZ_NVP_UPS] = { "ups", 0, "" }, | ||
1127 | [NWZ_NVP_VRT] = { "vrt", 4, "europe vol regulation flag" }, | ||
1128 | }; | ||
1129 | |||
1130 | static unsigned long models_nwz_a10[] = { 0x1a000001, 0x1a000002, 0x1a000004, | ||
1131 | 0x1a000005, 0x1a000006, 0x1a010001, 0x1a010002, 0x1a010004, 0x1a010005, | ||
1132 | 0x1a010006 }; | ||
1133 | |||
1134 | static unsigned long models_nwz_a20[] = { 0x1d000001, 0x1d000002, 0x1d000004, | ||
1135 | 0x1d000005, 0x1d000006, 0x1d000007 }; | ||
1136 | |||
1137 | static unsigned long models_nw_a30[] = { }; | ||
1138 | |||
1139 | static unsigned long models_nwz_a720[] = { 0x3030001, 0x3030002, 0x3030004, | ||
1140 | 0x3020001, 0x3020002, 0x3020004 }; | ||
1141 | |||
1142 | static unsigned long models_nwz_a810[] = { 0x10000, 0x10001, 0x10002 }; | ||
1143 | |||
1144 | static unsigned long models_nwz_a820[] = { 0x3010001, 0x3010002, 0x3010004, | ||
1145 | 0x3000001, 0x3000002, 0x3000004 }; | ||
1146 | |||
1147 | static unsigned long models_nwz_a840[] = { 0x7010004, 0x7010005, 0x7010006, | ||
1148 | 0x7000004, 0x7000005, 0x7000006 }; | ||
1149 | |||
1150 | static unsigned long models_nwz_a850[] = { 0xe000004, 0xe000005, 0xe000006 }; | ||
1151 | |||
1152 | static unsigned long models_nwz_a860[] = { 0x11000001, 0x11000002, 0x11000004, | ||
1153 | 0x11000005, 0x11000006, 0x11010001, 0x11010002, 0x11010004, 0x11010005, | ||
1154 | 0x11010006, 0x11020001, 0x11020002, 0x11020004, 0x11020005, 0x11020006 }; | ||
1155 | |||
1156 | static unsigned long models_nw_a910[] = { 0x2000001, 0x2000002, 0x2000004 }; | ||
1157 | |||
1158 | static unsigned long models_nwz_e050[] = { 0x8000000, 0x8000001, 0x8000002, | ||
1159 | 0x10000000, 0x10000001 }; | ||
1160 | |||
1161 | static unsigned long models_nw_e060[] = { 0x14000000, 0x14000001, 0x14000002, | ||
1162 | 0x14000004, 0x14000005 }; | ||
1163 | |||
1164 | static unsigned long models_nw_e080[] = { 0x19010001, 0x19010002, 0x19010004, | ||
1165 | 0x19010005 }; | ||
1166 | |||
1167 | static unsigned long models_nwz_e350[] = { 0xc000001, 0xc000002, 0xc000004 }; | ||
1168 | |||
1169 | static unsigned long models_nwz_e450[] = { 0xb000001, 0xb000002, 0xb000004 }; | ||
1170 | |||
1171 | static unsigned long models_nwz_e460[] = { 0x13000001, 0x13000002, 0x13000004 }; | ||
1172 | |||
1173 | static unsigned long models_nwz_e470[] = { 0x15000001, 0x15000002, 0x15000004, | ||
1174 | 0x15000005 }; | ||
1175 | |||
1176 | static unsigned long models_nwz_e550[] = { 0xd000001, 0xd000002, 0xd000004, | ||
1177 | 0xd000005 }; | ||
1178 | |||
1179 | static unsigned long models_nwz_e570[] = { 0x15010001, 0x15010002, 0x15010004, | ||
1180 | 0x15010005 }; | ||
1181 | |||
1182 | static unsigned long models_nwz_e580[] = { 0x19020001, 0x19020002, 0x19020004, | ||
1183 | 0x19020005 }; | ||
1184 | |||
1185 | static unsigned long models_nw_s10[] = { 0x1b000001, 0x1b000002, 0x1b000004, | ||
1186 | 0x1b000005, 0x1b000006 }; | ||
1187 | |||
1188 | static unsigned long models_nwz_s510[] = { 0x1030000, 0x1030001 }; | ||
1189 | |||
1190 | static unsigned long models_nwz_s610[] = { 0x1000000, 0x1000001, 0x1020000, | ||
1191 | 0x1020001, 0x1020002 }; | ||
1192 | |||
1193 | static unsigned long models_nwz_s630[] = { 0x4000001, 0x4000002, 0x4000004, | ||
1194 | 0x4020001, 0x4020002, 0x4020004 }; | ||
1195 | |||
1196 | static unsigned long models_nw_s640[] = { 0x6010002, 0x6010004, 0x6010005 }; | ||
1197 | |||
1198 | static unsigned long models_nwz_s710[] = { 0x1010000, 0x1010001, 0x1010002, | ||
1199 | 0x1040000, 0x1040001, 0x1040002 }; | ||
1200 | |||
1201 | static unsigned long models_nwz_s730[] = { 0x4010001, 0x4010002, 0x4010004, | ||
1202 | 0x4030001, 0x4030002, 0x4030004 }; | ||
1203 | |||
1204 | static unsigned long models_nwz_s740[] = { 0x6030002, 0x6030004, 0x6030005, | ||
1205 | 0x6020002, 0x6020004, 0x6020005 }; | ||
1206 | |||
1207 | static unsigned long models_nwz_s750[] = { 0x9000002, 0x9000004, 0x9000005, | ||
1208 | 0xf000002, 0xf000004 }; | ||
1209 | |||
1210 | static unsigned long models_nwz_s760[] = { 0x12000001, 0x12000002, 0x12000004, | ||
1211 | 0x12000005, 0x12000006, 0x12010001, 0x12010002, 0x12010004, 0x12010005, | ||
1212 | 0x12010006 }; | ||
1213 | |||
1214 | static unsigned long models_nwz_s770[] = { 0x16000001, 0x16000002, 0x16000004, | ||
1215 | 0x16000005, 0x16010001, 0x16010002, 0x16010004, 0x16010005 }; | ||
1216 | |||
1217 | static unsigned long models_nw_s780[] = { 0x19000001, 0x19000002, 0x19000004, | ||
1218 | 0x19000005 }; | ||
1219 | |||
1220 | static unsigned long models_nwz_x1000[] = { 0x5000002, 0x5000004, 0x5000005, | ||
1221 | 0x5020002, 0x5040002, 0x5020004, 0x5040004, 0x5020005, 0x5040005 }; | ||
1222 | |||
1223 | static unsigned long models_nw_zx100[] = { 0x1c000007, 0x1c000001, 0x1c000002, | ||
1224 | 0x1c000004, 0x1c000005, 0x1c000006 }; | ||
1225 | |||
1226 | static unsigned long models_nwz_zx2[] = { }; | ||
1227 | |||
1228 | static unsigned long models_nwz_noname[] = { 0x5010002, 0x5010004, 0x5010005 }; | ||
1229 | |||
1230 | struct nwz_series_info_t nwz_series[NWZ_SERIES_COUNT] = | ||
1231 | { | ||
1232 | { "nwz-a10", "NWZ-A10 Series", 10, models_nwz_a10, &nvp_index_92faee }, | ||
1233 | { "nwz-a20", "NW-A20 Series", 6, models_nwz_a20, &nvp_index_92faee }, | ||
1234 | { "nw-a30", "NW-A30 Series", 0, models_nw_a30, &nvp_index_398250 }, | ||
1235 | { "nwz-a720", "NWZ-A720 Series", 6, models_nwz_a720, 0 }, | ||
1236 | { "nwz-a810", "NWZ-A810 Series", 3, models_nwz_a810, 0 }, | ||
1237 | { "nwz-a820", "NWZ-A820 Series", 6, models_nwz_a820, 0 }, | ||
1238 | { "nwz-a840", "NWZ-A840 Series", 6, models_nwz_a840, 0 }, | ||
1239 | { "nwz-a850", "NWZ-A850 Series", 3, models_nwz_a850, &nvp_index_0ac81d }, | ||
1240 | { "nwz-a860", "NWZ-A860 Series", 15, models_nwz_a860, &nvp_index_f505c8 }, | ||
1241 | { "nw-a910", "NW-A910 Series", 3, models_nw_a910, 0 }, | ||
1242 | { "nwz-e050", "NWZ-E050 Series", 5, models_nwz_e050, 0 }, | ||
1243 | { "nw-e060", "NW-E060 Series", 5, models_nw_e060, &nvp_index_f505c8 }, | ||
1244 | { "nw-e080", "NW-E080 Series", 4, models_nw_e080, &nvp_index_6485c8 }, | ||
1245 | { "nwz-e350", "NWZ-E350 Series", 3, models_nwz_e350, &nvp_index_0ac81d }, | ||
1246 | { "nwz-e450", "NWZ-E450 Series", 3, models_nwz_e450, &nvp_index_0ac81d }, | ||
1247 | { "nwz-e460", "NWZ-E460 Series", 3, models_nwz_e460, &nvp_index_f505c8 }, | ||
1248 | { "nwz-e470", "NWZ-E470 Series", 4, models_nwz_e470, &nvp_index_28dc2c }, | ||
1249 | { "nwz-e550", "NWZ-E550 Series", 4, models_nwz_e550, 0 }, | ||
1250 | { "nwz-e570", "NWZ-E570 Series", 4, models_nwz_e570, 0 }, | ||
1251 | { "nwz-e580", "NWZ-E580 Series", 4, models_nwz_e580, &nvp_index_6485c8 }, | ||
1252 | { "nw-s10", "NW-S10 Series", 5, models_nw_s10, 0 }, | ||
1253 | { "nwz-s510", "NWZ-S510 Series", 2, models_nwz_s510, 0 }, | ||
1254 | { "nwz-s610", "NWZ-S610 Series", 5, models_nwz_s610, 0 }, | ||
1255 | { "nwz-s630", "NWZ-S630 Series", 6, models_nwz_s630, 0 }, | ||
1256 | { "nw-s640", "NW-S640 Series", 3, models_nw_s640, 0 }, | ||
1257 | { "nwz-s710", "NWZ-S710 Series", 6, models_nwz_s710, 0 }, | ||
1258 | { "nwz-s730", "NWZ-S730 Series", 6, models_nwz_s730, 0 }, | ||
1259 | { "nwz-s740", "NWZ-S740 Series", 6, models_nwz_s740, 0 }, | ||
1260 | { "nwz-s750", "NWZ-S740 Series", 5, models_nwz_s750, 0 }, | ||
1261 | { "nwz-s760", "NWZ-S740 Series", 10, models_nwz_s760, &nvp_index_f505c8 }, | ||
1262 | { "nwz-s770", "NWZ-S770 Series", 8, models_nwz_s770, 0 }, | ||
1263 | { "nw-s780", "NW-S780 Series", 4, models_nw_s780, &nvp_index_6485c8 }, | ||
1264 | { "nwz-x1000", "NWZ-X1000 Series", 9, models_nwz_x1000, 0 }, | ||
1265 | { "nw-zx100", "NW-ZX100 Series", 6, models_nw_zx100, 0 }, | ||
1266 | { "nwz-zx2", "NW-ZX2", 0, models_nwz_zx2, &nvp_index_c8fc85 }, | ||
1267 | { "nwz-noname", "NONAME", 3, models_nwz_noname, 0 }, | ||
1268 | }; | ||
diff --git a/utils/nwztools/database/nwz_db.h b/utils/nwztools/database/nwz_db.h new file mode 100644 index 0000000000..95aff48afa --- /dev/null +++ b/utils/nwztools/database/nwz_db.h | |||
@@ -0,0 +1,185 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2016 Amaury Pouly | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version 2 | ||
14 | * of the License, or (at your option) any later version. | ||
15 | * | ||
16 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
17 | * KIND, either express or implied. | ||
18 | * | ||
19 | ****************************************************************************/ | ||
20 | #ifndef __NWZ_DB_H__ | ||
21 | #define __NWZ_DB_H__ | ||
22 | |||
23 | /** /!\ This file was automatically generated, DO NOT MODIFY IT DIRECTLY /!\ */ | ||
24 | |||
25 | /* List of all known NVP nodes */ | ||
26 | enum nwz_nvp_node_t | ||
27 | { | ||
28 | NWZ_NVP_APD, /* application debug mode flag */ | ||
29 | NWZ_NVP_APP, /* application parameter */ | ||
30 | NWZ_NVP_BFD, /* btmw factory scdb */ | ||
31 | NWZ_NVP_BFP, /* btmw factory pair info */ | ||
32 | NWZ_NVP_BLF, /* browser log mode flag */ | ||
33 | NWZ_NVP_BML, /* btmw log mode flag */ | ||
34 | NWZ_NVP_BOK, /* beep ok flag */ | ||
35 | NWZ_NVP_BPR, /* bluetooth address | bluetooth parameter */ | ||
36 | NWZ_NVP_BTC, /* battery calibration */ | ||
37 | NWZ_NVP_BTI, /* boot image */ | ||
38 | NWZ_NVP_CGP, /* */ | ||
39 | NWZ_NVP_CLV, /* color variation */ | ||
40 | NWZ_NVP_CNG, /* aad/empr key | aad key */ | ||
41 | NWZ_NVP_CTR, /* */ | ||
42 | NWZ_NVP_DBA, /* aad icv */ | ||
43 | NWZ_NVP_DBG, /* */ | ||
44 | NWZ_NVP_DBI, /* dead battery image */ | ||
45 | NWZ_NVP_DBV, /* empr icv | empr key */ | ||
46 | NWZ_NVP_DCC, /* secure clock */ | ||
47 | NWZ_NVP_DOR, /* key mode (debug/release) */ | ||
48 | NWZ_NVP_E00, /* EMPR 0 */ | ||
49 | NWZ_NVP_E01, /* EMPR 1 */ | ||
50 | NWZ_NVP_E02, /* EMPR 2 */ | ||
51 | NWZ_NVP_E03, /* EMPR 3 */ | ||
52 | NWZ_NVP_E04, /* EMPR 4 */ | ||
53 | NWZ_NVP_E05, /* EMPR 5 */ | ||
54 | NWZ_NVP_E06, /* EMPR 6 */ | ||
55 | NWZ_NVP_E07, /* EMPR 7 */ | ||
56 | NWZ_NVP_E08, /* EMPR 8 */ | ||
57 | NWZ_NVP_E09, /* EMPR 9 */ | ||
58 | NWZ_NVP_E10, /* EMPR 10 */ | ||
59 | NWZ_NVP_E11, /* EMPR 11 */ | ||
60 | NWZ_NVP_E12, /* EMPR 12 */ | ||
61 | NWZ_NVP_E13, /* EMPR 13 */ | ||
62 | NWZ_NVP_E14, /* EMPR 14 */ | ||
63 | NWZ_NVP_E15, /* EMPR 15 */ | ||
64 | NWZ_NVP_E16, /* EMPR 16 */ | ||
65 | NWZ_NVP_E17, /* EMPR 17 */ | ||
66 | NWZ_NVP_E18, /* EMPR 18 */ | ||
67 | NWZ_NVP_E19, /* EMPR 19 */ | ||
68 | NWZ_NVP_E20, /* EMPR 20 */ | ||
69 | NWZ_NVP_E21, /* EMPR 21 */ | ||
70 | NWZ_NVP_E22, /* EMPR 22 */ | ||
71 | NWZ_NVP_E23, /* EMPR 23 */ | ||
72 | NWZ_NVP_E24, /* EMPR 24 */ | ||
73 | NWZ_NVP_E25, /* EMPR 25 */ | ||
74 | NWZ_NVP_E26, /* EMPR 26 */ | ||
75 | NWZ_NVP_E27, /* EMPR 27 */ | ||
76 | NWZ_NVP_E28, /* EMPR 28 */ | ||
77 | NWZ_NVP_E29, /* EMPR 29 */ | ||
78 | NWZ_NVP_E30, /* EMPR 30 */ | ||
79 | NWZ_NVP_E31, /* EMPR 31 */ | ||
80 | NWZ_NVP_EDW, /* quick shutdown flag */ | ||
81 | NWZ_NVP_ERI, /* update error image */ | ||
82 | NWZ_NVP_EXM, /* exception monitor mode */ | ||
83 | NWZ_NVP_FMP, /* fm parameter */ | ||
84 | NWZ_NVP_FNI, /* function information */ | ||
85 | NWZ_NVP_FPI, /* */ | ||
86 | NWZ_NVP_FUI, /* update image */ | ||
87 | NWZ_NVP_FUP, /* firmware update flag */ | ||
88 | NWZ_NVP_FUR, /* */ | ||
89 | NWZ_NVP_FVI, /* */ | ||
90 | NWZ_NVP_GTY, /* getty mode flag */ | ||
91 | NWZ_NVP_HDI, /* hold image */ | ||
92 | NWZ_NVP_HLD, /* hold mode */ | ||
93 | NWZ_NVP_INS, /* */ | ||
94 | NWZ_NVP_IPT, /* disable iptable flag */ | ||
95 | NWZ_NVP_KAS, /* key and signature */ | ||
96 | NWZ_NVP_LBI, /* low battery image */ | ||
97 | NWZ_NVP_LYR, /* */ | ||
98 | NWZ_NVP_MAC, /* wifi mac address */ | ||
99 | NWZ_NVP_MCR, /* marlin crl */ | ||
100 | NWZ_NVP_MDK, /* marlin device key */ | ||
101 | NWZ_NVP_MDL, /* middleware parameter */ | ||
102 | NWZ_NVP_MID, /* model id */ | ||
103 | NWZ_NVP_MLK, /* marlin key */ | ||
104 | NWZ_NVP_MSC, /* mass storage class mode */ | ||
105 | NWZ_NVP_MSO, /* MSC only mode flag */ | ||
106 | NWZ_NVP_MTM, /* marlin time */ | ||
107 | NWZ_NVP_MUK, /* marlin user key */ | ||
108 | NWZ_NVP_NCP, /* noise cancel driver parameter */ | ||
109 | NWZ_NVP_NVR, /* */ | ||
110 | NWZ_NVP_PCD, /* product code */ | ||
111 | NWZ_NVP_PCI, /* precharge image */ | ||
112 | NWZ_NVP_PRK, /* */ | ||
113 | NWZ_NVP_PSK, /* bluetooth pskey */ | ||
114 | NWZ_NVP_PTS, /* wifi protected setup */ | ||
115 | NWZ_NVP_RBT, /* */ | ||
116 | NWZ_NVP_RND, /* wmt key | random data */ | ||
117 | NWZ_NVP_RTC, /* rtc alarm */ | ||
118 | NWZ_NVP_SDC, /* SD Card export flag */ | ||
119 | NWZ_NVP_SDP, /* sound driver parameter */ | ||
120 | NWZ_NVP_SER, /* serial number */ | ||
121 | NWZ_NVP_SFI, /* starfish id */ | ||
122 | NWZ_NVP_SHE, /* */ | ||
123 | NWZ_NVP_SHP, /* ship information */ | ||
124 | NWZ_NVP_SID, /* service id */ | ||
125 | NWZ_NVP_SKD, /* slacker id file */ | ||
126 | NWZ_NVP_SKT, /* slacker time */ | ||
127 | NWZ_NVP_SKU, /* */ | ||
128 | NWZ_NVP_SLP, /* time out to sleep */ | ||
129 | NWZ_NVP_SPS, /* speaker ship info */ | ||
130 | NWZ_NVP_SYI, /* system information */ | ||
131 | NWZ_NVP_TR0, /* EKB 0 */ | ||
132 | NWZ_NVP_TR1, /* EKB 1 */ | ||
133 | NWZ_NVP_TST, /* test mode flag */ | ||
134 | NWZ_NVP_UBP, /* u-boot password */ | ||
135 | NWZ_NVP_UFN, /* update file name */ | ||
136 | NWZ_NVP_UMS, /* */ | ||
137 | NWZ_NVP_UPS, /* */ | ||
138 | NWZ_NVP_VRT, /* europe vol regulation flag */ | ||
139 | NWZ_NVP_COUNT /* Number of nvp nodes */ | ||
140 | }; | ||
141 | |||
142 | /* Invalid NVP index */ | ||
143 | #define NWZ_NVP_INVALID -1 /* Non-existent entry */ | ||
144 | /* Number of models */ | ||
145 | #define NWZ_MODEL_COUNT 181 | ||
146 | /* Number of series */ | ||
147 | #define NWZ_SERIES_COUNT 36 | ||
148 | |||
149 | /* NVP node info */ | ||
150 | struct nwz_nvp_info_t | ||
151 | { | ||
152 | const char *name; /* Sony's name: "bti" */ | ||
153 | unsigned long size; /* Size in bytes */ | ||
154 | const char *desc; /* Description: "bootloader image" */ | ||
155 | }; | ||
156 | |||
157 | /* NVP index map (nwz_nvp_node_t -> index) */ | ||
158 | typedef int nwz_nvp_index_t[NWZ_NVP_COUNT]; | ||
159 | |||
160 | /* Model info */ | ||
161 | struct nwz_model_info_t | ||
162 | { | ||
163 | unsigned long mid; /* Model ID: first 4 bytes of the NVP mid entry */ | ||
164 | const char *name; /* Human name: "NWZ-E463" */ | ||
165 | }; | ||
166 | |||
167 | /* Series info */ | ||
168 | struct nwz_series_info_t | ||
169 | { | ||
170 | const char *codename; /* Rockbox codename: nwz-e460 */ | ||
171 | const char *name; /* Human name: "NWZ-E460 Series" */ | ||
172 | int mid_count; /* number of entries in mid_list */ | ||
173 | unsigned long *mid; /* List of model IDs */ | ||
174 | /* Pointer to a name -> index map, nonexistent entries map to NWZ_NVP_INVALID */ | ||
175 | nwz_nvp_index_t *nvp_index; | ||
176 | }; | ||
177 | |||
178 | /* List of all NVP entries, indexed by nwz_nvp_node_t */ | ||
179 | extern struct nwz_nvp_info_t nwz_nvp[NWZ_NVP_COUNT]; | ||
180 | /* List of all models, sorted by increasing values of model ID */ | ||
181 | extern struct nwz_model_info_t nwz_model[NWZ_MODEL_COUNT]; | ||
182 | /* List of all series */ | ||
183 | extern struct nwz_series_info_t nwz_series[NWZ_SERIES_COUNT]; | ||
184 | |||
185 | #endif /* __NWZ_DB_H__ */ | ||
diff --git a/utils/nwztools/database/series.txt b/utils/nwztools/database/series.txt new file mode 100644 index 0000000000..bef49ee044 --- /dev/null +++ b/utils/nwztools/database/series.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | nwz-a10,NWZ-A10 Series,0x1a000001,0x1a000002,0x1a000004,0x1a000005,0x1a000006,0x1a010001,0x1a010002,0x1a010004,0x1a010005,0x1a010006 | ||
2 | nwz-a20,NW-A20 Series,0x1d000001,0x1d000002,0x1d000004,0x1d000005,0x1d000006,0x1d000007 | ||
3 | nw-a30,NW-A30 Series, | ||
4 | nwz-a720,NWZ-A720 Series,0x3030001,0x3030002,0x3030004,0x3020001,0x3020002,0x3020004 | ||
5 | nwz-a810,NWZ-A810 Series,0x10000,0x10001,0x10002 | ||
6 | nwz-a820,NWZ-A820 Series,0x3010001,0x3010002,0x3010004,0x3000001,0x3000002,0x3000004 | ||
7 | nwz-a840,NWZ-A840 Series,0x7010004,0x7010005,0x7010006,0x7000004,0x7000005,0x7000006 | ||
8 | nwz-a850,NWZ-A850 Series,0xe000004,0xe000005,0xe000006 | ||
9 | nwz-a860,NWZ-A860 Series,0x11000001,0x11000002,0x11000004,0x11000005,0x11000006,0x11010001,0x11010002,0x11010004,0x11010005,0x11010006,0x11020001,0x11020002,0x11020004,0x11020005,0x11020006 | ||
10 | nw-a910,NW-A910 Series,0x2000001,0x2000002,0x2000004 | ||
11 | nwz-e050,NWZ-E050 Series,0x8000000,0x8000001,0x8000002,0x10000000,0x10000001 | ||
12 | nw-e060,NW-E060 Series,0x14000000,0x14000001,0x14000002,0x14000004,0x14000005 | ||
13 | nw-e080,NW-E080 Series,0x19010001,0x19010002,0x19010004,0x19010005 | ||
14 | nwz-e350,NWZ-E350 Series,0xc000001,0xc000002,0xc000004 | ||
15 | nwz-e450,NWZ-E450 Series,0xb000001,0xb000002,0xb000004 | ||
16 | nwz-e460,NWZ-E460 Series,0x13000001,0x13000002,0x13000004 | ||
17 | nwz-e470,NWZ-E470 Series,0x15000001,0x15000002,0x15000004,0x15000005 | ||
18 | nwz-e550,NWZ-E550 Series,0xd000001,0xd000002,0xd000004,0xd000005 | ||
19 | nwz-e570,NWZ-E570 Series,0x15010001,0x15010002,0x15010004,0x15010005 | ||
20 | nwz-e580,NWZ-E580 Series,0x19020001,0x19020002,0x19020004,0x19020005 | ||
21 | nw-s10,NW-S10 Series,0x1b000001,0x1b000002,0x1b000004,0x1b000005,0x1b000006 | ||
22 | nwz-s510,NWZ-S510 Series,0x1030000,0x1030001 | ||
23 | nwz-s610,NWZ-S610 Series,0x1000000,0x1000001,0x1020000,0x1020001,0x1020002 | ||
24 | nwz-s630,NWZ-S630 Series,0x4000001,0x4000002,0x4000004,0x4020001,0x4020002,0x4020004 | ||
25 | nw-s640,NW-S640 Series,0x6010002,0x6010004,0x6010005 | ||
26 | nwz-s710,NWZ-S710 Series,0x1010000,0x1010001,0x1010002,0x1040000,0x1040001,0x1040002 | ||
27 | nwz-s730,NWZ-S730 Series,0x4010001,0x4010002,0x4010004,0x4030001,0x4030002,0x4030004 | ||
28 | nwz-s740,NWZ-S740 Series,0x6030002,0x6030004,0x6030005,0x6020002,0x6020004,0x6020005 | ||
29 | nwz-s750,NWZ-S740 Series,0x9000002,0x9000004,0x9000005,0xf000002,0xf000004 | ||
30 | nwz-s760,NWZ-S740 Series,0x12000001,0x12000002,0x12000004,0x12000005,0x12000006,0x12010001,0x12010002,0x12010004,0x12010005,0x12010006 | ||
31 | nwz-s770,NWZ-S770 Series,0x16000001,0x16000002,0x16000004,0x16000005,0x16010001,0x16010002,0x16010004,0x16010005 | ||
32 | nw-s780,NW-S780 Series,0x19000001,0x19000002,0x19000004,0x19000005 | ||
33 | nwz-x1000,NWZ-X1000 Series,0x5000002,0x5000004,0x5000005,0x5020002,0x5040002,0x5020004,0x5040004,0x5020005,0x5040005 | ||
34 | nw-zx100,NW-ZX100 Series,0x1c000007,0x1c000001,0x1c000002,0x1c000004,0x1c000005,0x1c000006 | ||
35 | nwz-zx2,NW-ZX2, | ||
36 | nwz-noname,NONAME,0x5010002,0x5010004,0x5010005 | ||