diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2017-01-07 17:32:47 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2017-01-07 17:32:47 +0100 |
commit | be68b6a7bdaddc49676c6220b86f696caf69b1b8 (patch) | |
tree | cc1e1ae87d79454053e37e809bfec1a08ddbdc48 /utils/nwztools/database | |
parent | 76c73c707abf950752f1fa0f17a049bdbbb3d5f8 (diff) | |
download | rockbox-be68b6a7bdaddc49676c6220b86f696caf69b1b8.tar.gz rockbox-be68b6a7bdaddc49676c6220b86f696caf69b1b8.zip |
nwztools: add NW-WM1A/Z model IDs
Also fix code that was supposed to sort things deterministically and was a
massive failure.
Change-Id: Iedf25f05a94ef51421710a283eb60f33ee977de1
Diffstat (limited to 'utils/nwztools/database')
-rwxr-xr-x | utils/nwztools/database/gen_db.py | 4 | ||||
-rw-r--r-- | utils/nwztools/database/models.txt | 2 | ||||
-rw-r--r-- | utils/nwztools/database/nwz_db.c | 12 | ||||
-rw-r--r-- | utils/nwztools/database/nwz_db.h | 8 | ||||
-rw-r--r-- | utils/nwztools/database/series.txt | 2 |
5 files changed, 16 insertions, 12 deletions
diff --git a/utils/nwztools/database/gen_db.py b/utils/nwztools/database/gen_db.py index 792a1b91c2..cf1423f2a5 100755 --- a/utils/nwztools/database/gen_db.py +++ b/utils/nwztools/database/gen_db.py | |||
@@ -201,8 +201,8 @@ with open("nwz_db.h", "w") as fp: | |||
201 | # create comment to explain the meaning, gather several meaning together | 201 | # create comment to explain the meaning, gather several meaning together |
202 | # if there are more than one (sorted to keep a stable order when we update) | 202 | # if there are more than one (sorted to keep a stable order when we update) |
203 | explain = "" | 203 | explain = "" |
204 | if name in sorted(g_nvp_desc): | 204 | if name in g_nvp_desc: |
205 | explain = " | ".join(list(g_nvp_desc[name])) | 205 | explain = " | ".join(sorted(list(g_nvp_desc[name]))) |
206 | # overwrite desc set with a single string for later | 206 | # overwrite desc set with a single string for later |
207 | g_nvp_desc[name] = explain | 207 | g_nvp_desc[name] = explain |
208 | fp.write(" NWZ_NVP_%s, /* %s */\n" % (name.upper(), explain)) | 208 | fp.write(" NWZ_NVP_%s, /* %s */\n" % (name.upper(), explain)) |
diff --git a/utils/nwztools/database/models.txt b/utils/nwztools/database/models.txt index 89a372f1bd..a8ac46bfc2 100644 --- a/utils/nwztools/database/models.txt +++ b/utils/nwztools/database/models.txt | |||
@@ -179,3 +179,5 @@ | |||
179 | 0x1d000005,NW-A26 | 179 | 0x1d000005,NW-A26 |
180 | 0x1d000006,NW-A27 | 180 | 0x1d000006,NW-A27 |
181 | 0x1d000007,NW-A28 | 181 | 0x1d000007,NW-A28 |
182 | 0x20000007,NW-WM1A | ||
183 | 0x21000008,NW-WM1Z | ||
diff --git a/utils/nwztools/database/nwz_db.c b/utils/nwztools/database/nwz_db.c index ec5845117b..083f41b39b 100644 --- a/utils/nwztools/database/nwz_db.c +++ b/utils/nwztools/database/nwz_db.c | |||
@@ -205,6 +205,8 @@ struct nwz_model_info_t nwz_model[NWZ_MODEL_COUNT] = | |||
205 | { 0x1d000005, "NW-A26" }, | 205 | { 0x1d000005, "NW-A26" }, |
206 | { 0x1d000006, "NW-A27" }, | 206 | { 0x1d000006, "NW-A27" }, |
207 | { 0x1d000007, "NW-A28" }, | 207 | { 0x1d000007, "NW-A28" }, |
208 | { 0x20000007, "NW-WM1A" }, | ||
209 | { 0x21000008, "NW-WM1Z" }, | ||
208 | }; | 210 | }; |
209 | 211 | ||
210 | static int nvp_index_0ac81d[NWZ_NVP_COUNT] = | 212 | static int nvp_index_0ac81d[NWZ_NVP_COUNT] = |
@@ -1026,12 +1028,12 @@ struct nwz_nvp_info_t nwz_nvp[NWZ_NVP_COUNT] = | |||
1026 | [NWZ_NVP_BTI] = { "bti", 262144, "boot image" }, | 1028 | [NWZ_NVP_BTI] = { "bti", 262144, "boot image" }, |
1027 | [NWZ_NVP_CGP] = { "cgp", 0, "" }, | 1029 | [NWZ_NVP_CGP] = { "cgp", 0, "" }, |
1028 | [NWZ_NVP_CLV] = { "clv", 4, "color variation" }, | 1030 | [NWZ_NVP_CLV] = { "clv", 4, "color variation" }, |
1029 | [NWZ_NVP_CNG] = { "cng", 704, "aad/empr key | aad key" }, | 1031 | [NWZ_NVP_CNG] = { "cng", 704, "aad key | aad/empr key" }, |
1030 | [NWZ_NVP_CTR] = { "ctr", 0, "" }, | 1032 | [NWZ_NVP_CTR] = { "ctr", 0, "" }, |
1031 | [NWZ_NVP_DBA] = { "dba", 160, "aad icv" }, | 1033 | [NWZ_NVP_DBA] = { "dba", 160, "aad icv" }, |
1032 | [NWZ_NVP_DBG] = { "dbg", 0, "" }, | 1034 | [NWZ_NVP_DBG] = { "dbg", 0, "" }, |
1033 | [NWZ_NVP_DBI] = { "dbi", 262144, "dead battery image" }, | 1035 | [NWZ_NVP_DBI] = { "dbi", 262144, "dead battery image" }, |
1034 | [NWZ_NVP_DBV] = { "dbv", 520, "empr key | empr icv" }, | 1036 | [NWZ_NVP_DBV] = { "dbv", 520, "empr icv | empr key" }, |
1035 | [NWZ_NVP_DCC] = { "dcc", 20, "secure clock" }, | 1037 | [NWZ_NVP_DCC] = { "dcc", 20, "secure clock" }, |
1036 | [NWZ_NVP_DOR] = { "dor", 4, "key mode (debug/release)" }, | 1038 | [NWZ_NVP_DOR] = { "dor", 4, "key mode (debug/release)" }, |
1037 | [NWZ_NVP_E00] = { "e00", 1024, "EMPR 0" }, | 1039 | [NWZ_NVP_E00] = { "e00", 1024, "EMPR 0" }, |
@@ -1102,7 +1104,7 @@ struct nwz_nvp_info_t nwz_nvp[NWZ_NVP_COUNT] = | |||
1102 | [NWZ_NVP_PSK] = { "psk", 512, "bluetooth pskey" }, | 1104 | [NWZ_NVP_PSK] = { "psk", 512, "bluetooth pskey" }, |
1103 | [NWZ_NVP_PTS] = { "pts", 4, "wifi protected setup" }, | 1105 | [NWZ_NVP_PTS] = { "pts", 4, "wifi protected setup" }, |
1104 | [NWZ_NVP_RBT] = { "rbt", 0, "" }, | 1106 | [NWZ_NVP_RBT] = { "rbt", 0, "" }, |
1105 | [NWZ_NVP_RND] = { "rnd", 64, "wmt key | random data" }, | 1107 | [NWZ_NVP_RND] = { "rnd", 64, "random data | wmt key" }, |
1106 | [NWZ_NVP_RTC] = { "rtc", 16, "rtc alarm" }, | 1108 | [NWZ_NVP_RTC] = { "rtc", 16, "rtc alarm" }, |
1107 | [NWZ_NVP_SDC] = { "sdc", 4, "SD Card export flag" }, | 1109 | [NWZ_NVP_SDC] = { "sdc", 4, "SD Card export flag" }, |
1108 | [NWZ_NVP_SDP] = { "sdp", 64, "sound driver parameter" }, | 1110 | [NWZ_NVP_SDP] = { "sdp", 64, "sound driver parameter" }, |
@@ -1217,7 +1219,7 @@ static unsigned long models_nwz_s770[] = { 0x16000001, 0x16000002, 0x16000004, | |||
1217 | static unsigned long models_nw_s780[] = { 0x19000001, 0x19000002, 0x19000004, | 1219 | static unsigned long models_nw_s780[] = { 0x19000001, 0x19000002, 0x19000004, |
1218 | 0x19000005 }; | 1220 | 0x19000005 }; |
1219 | 1221 | ||
1220 | static unsigned long models_nw_wm1[] = { }; | 1222 | static unsigned long models_nw_wm1[] = { 0x20000007, 0x21000008 }; |
1221 | 1223 | ||
1222 | static unsigned long models_nwz_x1000[] = { 0x5000002, 0x5000004, 0x5000005, | 1224 | static unsigned long models_nwz_x1000[] = { 0x5000002, 0x5000004, 0x5000005, |
1223 | 0x5020002, 0x5040002, 0x5020004, 0x5040004, 0x5020005, 0x5040005 }; | 1225 | 0x5020002, 0x5040002, 0x5020004, 0x5040004, 0x5020005, 0x5040005 }; |
@@ -1263,7 +1265,7 @@ struct nwz_series_info_t nwz_series[NWZ_SERIES_COUNT] = | |||
1263 | { "nwz-s760", "NWZ-S740 Series", 10, models_nwz_s760, &nvp_index_f505c8 }, | 1265 | { "nwz-s760", "NWZ-S740 Series", 10, models_nwz_s760, &nvp_index_f505c8 }, |
1264 | { "nwz-s770", "NWZ-S770 Series", 8, models_nwz_s770, 0 }, | 1266 | { "nwz-s770", "NWZ-S770 Series", 8, models_nwz_s770, 0 }, |
1265 | { "nw-s780", "NW-S780 Series", 4, models_nw_s780, &nvp_index_6485c8 }, | 1267 | { "nw-s780", "NW-S780 Series", 4, models_nw_s780, &nvp_index_6485c8 }, |
1266 | { "nw-wm1", "NW-WM1 Series", 0, models_nw_wm1, &nvp_index_398250 }, | 1268 | { "nw-wm1", "NW-WM1 Series", 2, models_nw_wm1, &nvp_index_398250 }, |
1267 | { "nwz-x1000", "NWZ-X1000 Series", 9, models_nwz_x1000, 0 }, | 1269 | { "nwz-x1000", "NWZ-X1000 Series", 9, models_nwz_x1000, 0 }, |
1268 | { "nw-zx100", "NW-ZX100 Series", 6, models_nw_zx100, 0 }, | 1270 | { "nw-zx100", "NW-ZX100 Series", 6, models_nw_zx100, 0 }, |
1269 | { "nwz-zx2", "NW-ZX2", 0, models_nwz_zx2, &nvp_index_c8fc85 }, | 1271 | { "nwz-zx2", "NW-ZX2", 0, models_nwz_zx2, &nvp_index_c8fc85 }, |
diff --git a/utils/nwztools/database/nwz_db.h b/utils/nwztools/database/nwz_db.h index f7af2e9a24..6ac5d60414 100644 --- a/utils/nwztools/database/nwz_db.h +++ b/utils/nwztools/database/nwz_db.h | |||
@@ -37,12 +37,12 @@ enum nwz_nvp_node_t | |||
37 | NWZ_NVP_BTI, /* boot image */ | 37 | NWZ_NVP_BTI, /* boot image */ |
38 | NWZ_NVP_CGP, /* */ | 38 | NWZ_NVP_CGP, /* */ |
39 | NWZ_NVP_CLV, /* color variation */ | 39 | NWZ_NVP_CLV, /* color variation */ |
40 | NWZ_NVP_CNG, /* aad/empr key | aad key */ | 40 | NWZ_NVP_CNG, /* aad key | aad/empr key */ |
41 | NWZ_NVP_CTR, /* */ | 41 | NWZ_NVP_CTR, /* */ |
42 | NWZ_NVP_DBA, /* aad icv */ | 42 | NWZ_NVP_DBA, /* aad icv */ |
43 | NWZ_NVP_DBG, /* */ | 43 | NWZ_NVP_DBG, /* */ |
44 | NWZ_NVP_DBI, /* dead battery image */ | 44 | NWZ_NVP_DBI, /* dead battery image */ |
45 | NWZ_NVP_DBV, /* empr key | empr icv */ | 45 | NWZ_NVP_DBV, /* empr icv | empr key */ |
46 | NWZ_NVP_DCC, /* secure clock */ | 46 | NWZ_NVP_DCC, /* secure clock */ |
47 | NWZ_NVP_DOR, /* key mode (debug/release) */ | 47 | NWZ_NVP_DOR, /* key mode (debug/release) */ |
48 | NWZ_NVP_E00, /* EMPR 0 */ | 48 | NWZ_NVP_E00, /* EMPR 0 */ |
@@ -113,7 +113,7 @@ enum nwz_nvp_node_t | |||
113 | NWZ_NVP_PSK, /* bluetooth pskey */ | 113 | NWZ_NVP_PSK, /* bluetooth pskey */ |
114 | NWZ_NVP_PTS, /* wifi protected setup */ | 114 | NWZ_NVP_PTS, /* wifi protected setup */ |
115 | NWZ_NVP_RBT, /* */ | 115 | NWZ_NVP_RBT, /* */ |
116 | NWZ_NVP_RND, /* wmt key | random data */ | 116 | NWZ_NVP_RND, /* random data | wmt key */ |
117 | NWZ_NVP_RTC, /* rtc alarm */ | 117 | NWZ_NVP_RTC, /* rtc alarm */ |
118 | NWZ_NVP_SDC, /* SD Card export flag */ | 118 | NWZ_NVP_SDC, /* SD Card export flag */ |
119 | NWZ_NVP_SDP, /* sound driver parameter */ | 119 | NWZ_NVP_SDP, /* sound driver parameter */ |
@@ -142,7 +142,7 @@ enum nwz_nvp_node_t | |||
142 | /* Invalid NVP index */ | 142 | /* Invalid NVP index */ |
143 | #define NWZ_NVP_INVALID -1 /* Non-existent entry */ | 143 | #define NWZ_NVP_INVALID -1 /* Non-existent entry */ |
144 | /* Number of models */ | 144 | /* Number of models */ |
145 | #define NWZ_MODEL_COUNT 181 | 145 | #define NWZ_MODEL_COUNT 183 |
146 | /* Number of series */ | 146 | /* Number of series */ |
147 | #define NWZ_SERIES_COUNT 37 | 147 | #define NWZ_SERIES_COUNT 37 |
148 | 148 | ||
diff --git a/utils/nwztools/database/series.txt b/utils/nwztools/database/series.txt index 48e54abf51..9cbb65d8ed 100644 --- a/utils/nwztools/database/series.txt +++ b/utils/nwztools/database/series.txt | |||
@@ -30,7 +30,7 @@ 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 | 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 | 31 | nwz-s770,NWZ-S770 Series,0x16000001,0x16000002,0x16000004,0x16000005,0x16010001,0x16010002,0x16010004,0x16010005 |
32 | nw-s780,NW-S780 Series,0x19000001,0x19000002,0x19000004,0x19000005 | 32 | nw-s780,NW-S780 Series,0x19000001,0x19000002,0x19000004,0x19000005 |
33 | nw-wm1,NW-WM1 Series, | 33 | nw-wm1,NW-WM1 Series,0x20000007,0x21000008 |
34 | nwz-x1000,NWZ-X1000 Series,0x5000002,0x5000004,0x5000005,0x5020002,0x5040002,0x5020004,0x5040004,0x5020005,0x5040005 | 34 | nwz-x1000,NWZ-X1000 Series,0x5000002,0x5000004,0x5000005,0x5020002,0x5040002,0x5020004,0x5040004,0x5020005,0x5040005 |
35 | nw-zx100,NW-ZX100 Series,0x1c000007,0x1c000001,0x1c000002,0x1c000004,0x1c000005,0x1c000006 | 35 | nw-zx100,NW-ZX100 Series,0x1c000007,0x1c000001,0x1c000002,0x1c000004,0x1c000005,0x1c000006 |
36 | nwz-zx2,NW-ZX2, | 36 | nwz-zx2,NW-ZX2, |