diff options
Diffstat (limited to 'utils/nwztools/database')
-rwxr-xr-x | utils/nwztools/database/gen_db.py | 15 | ||||
-rw-r--r-- | utils/nwztools/database/nvp/nw-a40.txt | 92 | ||||
-rw-r--r-- | utils/nwztools/database/nvp/nw-zx300.txt | 92 | ||||
-rwxr-xr-x | utils/nwztools/database/nvp/parse_nvp_header.sh | 3 | ||||
-rw-r--r-- | utils/nwztools/database/series.txt | 2 |
5 files changed, 201 insertions, 3 deletions
diff --git a/utils/nwztools/database/gen_db.py b/utils/nwztools/database/gen_db.py index be4cc34db0..23f4e3f474 100755 --- a/utils/nwztools/database/gen_db.py +++ b/utils/nwztools/database/gen_db.py | |||
@@ -4,6 +4,17 @@ import os | |||
4 | import re | 4 | import re |
5 | import subprocess | 5 | import subprocess |
6 | import hashlib | 6 | import hashlib |
7 | import sys | ||
8 | |||
9 | # arguments | ||
10 | if len(sys.argv) != 2: | ||
11 | print("Usage: %s output_directory" % sys.argv[0]) | ||
12 | exit(1) | ||
13 | output_directory = sys.argv[1] | ||
14 | # check path is valid | ||
15 | if not os.path.isdir(output_directory): | ||
16 | print("Error: '%s' is not a valid directory" % output_directory) | ||
17 | exit(1) | ||
7 | 18 | ||
8 | # parse models.txt | 19 | # parse models.txt |
9 | g_models = [] | 20 | g_models = [] |
@@ -200,7 +211,7 @@ extern struct nwz_series_info_t nwz_series[NWZ_SERIES_COUNT]; | |||
200 | #endif /* __NWZ_DB_H__ */ | 211 | #endif /* __NWZ_DB_H__ */ |
201 | """ | 212 | """ |
202 | 213 | ||
203 | with open("nwz-db.h", "w") as fp: | 214 | with open(os.path.join(output_directory, "nwz-db.h"), "w") as fp: |
204 | fp.write(header_begin) | 215 | fp.write(header_begin) |
205 | # generate list of all nvp nodes | 216 | # generate list of all nvp nodes |
206 | for name in sorted(g_nvp_names): | 217 | for name in sorted(g_nvp_names): |
@@ -256,7 +267,7 @@ def by_name(nvp_entry): | |||
256 | def codename_to_c(codename): | 267 | def codename_to_c(codename): |
257 | return re.sub('[^a-zA-Z0-9]', '_', codename, 0) | 268 | return re.sub('[^a-zA-Z0-9]', '_', codename, 0) |
258 | 269 | ||
259 | with open("nwz-db.c", "w") as fp: | 270 | with open(os.path.join(output_directory, "nwz-db.c"), "w") as fp: |
260 | fp.write(impl_begin) | 271 | fp.write(impl_begin) |
261 | # generate model list (sort by mid) | 272 | # generate model list (sort by mid) |
262 | for model in sorted(g_models, key = by_mid): | 273 | for model in sorted(g_models, key = by_mid): |
diff --git a/utils/nwztools/database/nvp/nw-a40.txt b/utils/nwztools/database/nvp/nw-a40.txt new file mode 100644 index 0000000000..ebe8433824 --- /dev/null +++ b/utils/nwztools/database/nvp/nw-a40.txt | |||
@@ -0,0 +1,92 @@ | |||
1 | dbg,000 | ||
2 | syi,001 | ||
3 | ubp,002 | ||
4 | fup,003 | ||
5 | prk,004 | ||
6 | hld,005 | ||
7 | pwd,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 | clg,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-zx300.txt b/utils/nwztools/database/nvp/nw-zx300.txt new file mode 100644 index 0000000000..ebe8433824 --- /dev/null +++ b/utils/nwztools/database/nvp/nw-zx300.txt | |||
@@ -0,0 +1,92 @@ | |||
1 | dbg,000 | ||
2 | syi,001 | ||
3 | ubp,002 | ||
4 | fup,003 | ||
5 | prk,004 | ||
6 | hld,005 | ||
7 | pwd,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 | clg,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/parse_nvp_header.sh b/utils/nwztools/database/nvp/parse_nvp_header.sh index ee2be93516..88fdb1dd4b 100755 --- a/utils/nwztools/database/nvp/parse_nvp_header.sh +++ b/utils/nwztools/database/nvp/parse_nvp_header.sh | |||
@@ -38,7 +38,8 @@ fi | |||
38 | if [ "`echo "$LIST" | grep "icx_nvp_emmc.h" | wc -l`" = "1" ]; then | 38 | if [ "`echo "$LIST" | grep "icx_nvp_emmc.h" | wc -l`" = "1" ]; then |
39 | LIST=`echo "$LIST" | grep "icx_nvp_emmc.h"` | 39 | LIST=`echo "$LIST" | grep "icx_nvp_emmc.h"` |
40 | else | 40 | else |
41 | LIST=`echo "$LIST" | grep 'icx[[:digit:]]*_nvp[[:alpha:]_]*.h'` | 41 | # otherwise find any file named icx_nvp*.h but filter out icx_nvp_wrapper.h |
42 | LIST=`echo "$LIST" | grep 'icx[[:digit:]]*_nvp[[:alpha:]_]*.h' | sed '/icx_nvp_wrapper/d'` | ||
42 | fi | 43 | fi |
43 | LIST_CNT=`echo "$LIST" | wc -l` | 44 | LIST_CNT=`echo "$LIST" | wc -l` |
44 | if [ "$LIST_CNT" = "0" ]; then | 45 | if [ "$LIST_CNT" = "0" ]; then |
diff --git a/utils/nwztools/database/series.txt b/utils/nwztools/database/series.txt index 2128ad2abb..b51897e70d 100644 --- a/utils/nwztools/database/series.txt +++ b/utils/nwztools/database/series.txt | |||
@@ -1,6 +1,7 @@ | |||
1 | nwz-a10,NWZ-A10 Series,0x1a000001,0x1a000002,0x1a000004,0x1a000005,0x1a000006,0x1a010001,0x1a010002,0x1a010004,0x1a010005,0x1a010006 | 1 | nwz-a10,NWZ-A10 Series,0x1a000001,0x1a000002,0x1a000004,0x1a000005,0x1a000006,0x1a010001,0x1a010002,0x1a010004,0x1a010005,0x1a010006 |
2 | nw-a20,NW-A20 Series,0x1d000001,0x1d000002,0x1d000004,0x1d000005,0x1d000006,0x1d000007 | 2 | nw-a20,NW-A20 Series,0x1d000001,0x1d000002,0x1d000004,0x1d000005,0x1d000006,0x1d000007 |
3 | nw-a30,NW-A30 Series,0x22000004,0x22000005,0x22000006 | 3 | nw-a30,NW-A30 Series,0x22000004,0x22000005,0x22000006 |
4 | nw-a40,NW-A40 Series, | ||
4 | nwz-a720,NWZ-A720 Series,0x3030001,0x3030002,0x3030004,0x3020001,0x3020002,0x3020004 | 5 | nwz-a720,NWZ-A720 Series,0x3030001,0x3030002,0x3030004,0x3020001,0x3020002,0x3020004 |
5 | nwz-a810,NWZ-A810 Series,0x10000,0x10001,0x10002 | 6 | nwz-a810,NWZ-A810 Series,0x10000,0x10001,0x10002 |
6 | nwz-a820,NWZ-A820 Series,0x3010001,0x3010002,0x3010004,0x3000001,0x3000002,0x3000004 | 7 | nwz-a820,NWZ-A820 Series,0x3010001,0x3010002,0x3010004,0x3000001,0x3000002,0x3000004 |
@@ -33,4 +34,5 @@ nw-s780,NW-S780 Series,0x19000001,0x19000002,0x19000004,0x19000005 | |||
33 | nw-wm1,NW-WM1 Series,0x20000007,0x21000008 | 34 | nw-wm1,NW-WM1 Series,0x20000007,0x21000008 |
34 | nwz-x1000,NWZ-X1000 Series,0x5000002,0x5000004,0x5000005,0x5020002,0x5040002,0x5020004,0x5040004,0x5020005,0x5040005 | 35 | 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 | 36 | nw-zx100,NW-ZX100 Series,0x1c000007,0x1c000001,0x1c000002,0x1c000004,0x1c000005,0x1c000006 |
37 | nw-zx300,NW-ZX300 Series, | ||
36 | nwz-noname,NONAME,0x5010002,0x5010004,0x5010005 | 38 | nwz-noname,NONAME,0x5010002,0x5010004,0x5010005 |