summaryrefslogtreecommitdiff
path: root/utils/nwztools/database
diff options
context:
space:
mode:
Diffstat (limited to 'utils/nwztools/database')
-rwxr-xr-xutils/nwztools/database/gen_db.py15
-rw-r--r--utils/nwztools/database/nvp/nw-a40.txt92
-rw-r--r--utils/nwztools/database/nvp/nw-zx300.txt92
-rwxr-xr-xutils/nwztools/database/nvp/parse_nvp_header.sh3
-rw-r--r--utils/nwztools/database/series.txt2
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
4import re 4import re
5import subprocess 5import subprocess
6import hashlib 6import hashlib
7import sys
8
9# arguments
10if len(sys.argv) != 2:
11 print("Usage: %s output_directory" % sys.argv[0])
12 exit(1)
13output_directory = sys.argv[1]
14# check path is valid
15if 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
9g_models = [] 20g_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
203with open("nwz-db.h", "w") as fp: 214with 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):
256def codename_to_c(codename): 267def 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
259with open("nwz-db.c", "w") as fp: 270with 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 @@
1dbg,000
2syi,001
3ubp,002
4fup,003
5prk,004
6hld,005
7pwd,006
8mid,007
9pcd,008
10ser,009
11ufn,010
12kas,011
13shp,012
14tst,013
15gty,014
16clg,015
17sdp,016
18ncp,017
19psk,018
20nvr,077
21she,084
22btc,085
23ins,089
24ctr,090
25sku,091
26bpr,019
27bfp,020
28bfd,021
29bml,022
30apd,078
31blf,079
32slp,080
33vrt,081
34fni,082
35sid,083
36mso,086
37cng,023
38lyr,024
39dbv,025
40fur,026
41ums,027
42skd,028
43ups,029
44mdk,030
45fvi,031
46mac,032
47fpi,033
48tr0,034
49tr1,035
50e00,036
51e01,037
52e02,038
53e03,039
54e04,040
55e05,041
56e06,042
57e07,043
58e08,044
59e09,045
60e10,046
61e11,047
62e12,048
63e13,049
64e14,050
65e15,051
66e16,052
67e17,053
68e18,054
69e19,055
70e20,056
71e21,057
72e22,058
73e23,059
74e24,060
75e25,061
76e26,062
77e27,063
78e28,064
79e29,065
80e30,066
81e31,067
82clv,068
83sps,069
84rbt,070
85edw,071
86bti,072
87hdi,073
88lbi,074
89fui,075
90eri,076
91pci,087
92dbi,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 @@
1dbg,000
2syi,001
3ubp,002
4fup,003
5prk,004
6hld,005
7pwd,006
8mid,007
9pcd,008
10ser,009
11ufn,010
12kas,011
13shp,012
14tst,013
15gty,014
16clg,015
17sdp,016
18ncp,017
19psk,018
20nvr,077
21she,084
22btc,085
23ins,089
24ctr,090
25sku,091
26bpr,019
27bfp,020
28bfd,021
29bml,022
30apd,078
31blf,079
32slp,080
33vrt,081
34fni,082
35sid,083
36mso,086
37cng,023
38lyr,024
39dbv,025
40fur,026
41ums,027
42skd,028
43ups,029
44mdk,030
45fvi,031
46mac,032
47fpi,033
48tr0,034
49tr1,035
50e00,036
51e01,037
52e02,038
53e03,039
54e04,040
55e05,041
56e06,042
57e07,043
58e08,044
59e09,045
60e10,046
61e11,047
62e12,048
63e13,049
64e14,050
65e15,051
66e16,052
67e17,053
68e18,054
69e19,055
70e20,056
71e21,057
72e22,058
73e23,059
74e24,060
75e25,061
76e26,062
77e27,063
78e28,064
79e29,065
80e30,066
81e31,067
82clv,068
83sps,069
84rbt,070
85edw,071
86bti,072
87hdi,073
88lbi,074
89fui,075
90eri,076
91pci,087
92dbi,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
38if [ "`echo "$LIST" | grep "icx_nvp_emmc.h" | wc -l`" = "1" ]; then 38if [ "`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"`
40else 40else
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'`
42fi 43fi
43LIST_CNT=`echo "$LIST" | wc -l` 44LIST_CNT=`echo "$LIST" | wc -l`
44if [ "$LIST_CNT" = "0" ]; then 45if [ "$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 @@
1nwz-a10,NWZ-A10 Series,0x1a000001,0x1a000002,0x1a000004,0x1a000005,0x1a000006,0x1a010001,0x1a010002,0x1a010004,0x1a010005,0x1a010006 1nwz-a10,NWZ-A10 Series,0x1a000001,0x1a000002,0x1a000004,0x1a000005,0x1a000006,0x1a010001,0x1a010002,0x1a010004,0x1a010005,0x1a010006
2nw-a20,NW-A20 Series,0x1d000001,0x1d000002,0x1d000004,0x1d000005,0x1d000006,0x1d000007 2nw-a20,NW-A20 Series,0x1d000001,0x1d000002,0x1d000004,0x1d000005,0x1d000006,0x1d000007
3nw-a30,NW-A30 Series,0x22000004,0x22000005,0x22000006 3nw-a30,NW-A30 Series,0x22000004,0x22000005,0x22000006
4nw-a40,NW-A40 Series,
4nwz-a720,NWZ-A720 Series,0x3030001,0x3030002,0x3030004,0x3020001,0x3020002,0x3020004 5nwz-a720,NWZ-A720 Series,0x3030001,0x3030002,0x3030004,0x3020001,0x3020002,0x3020004
5nwz-a810,NWZ-A810 Series,0x10000,0x10001,0x10002 6nwz-a810,NWZ-A810 Series,0x10000,0x10001,0x10002
6nwz-a820,NWZ-A820 Series,0x3010001,0x3010002,0x3010004,0x3000001,0x3000002,0x3000004 7nwz-a820,NWZ-A820 Series,0x3010001,0x3010002,0x3010004,0x3000001,0x3000002,0x3000004
@@ -33,4 +34,5 @@ nw-s780,NW-S780 Series,0x19000001,0x19000002,0x19000004,0x19000005
33nw-wm1,NW-WM1 Series,0x20000007,0x21000008 34nw-wm1,NW-WM1 Series,0x20000007,0x21000008
34nwz-x1000,NWZ-X1000 Series,0x5000002,0x5000004,0x5000005,0x5020002,0x5040002,0x5020004,0x5040004,0x5020005,0x5040005 35nwz-x1000,NWZ-X1000 Series,0x5000002,0x5000004,0x5000005,0x5020002,0x5040002,0x5020004,0x5040004,0x5020005,0x5040005
35nw-zx100,NW-ZX100 Series,0x1c000007,0x1c000001,0x1c000002,0x1c000004,0x1c000005,0x1c000006 36nw-zx100,NW-ZX100 Series,0x1c000007,0x1c000001,0x1c000002,0x1c000004,0x1c000005,0x1c000006
37nw-zx300,NW-ZX300 Series,
36nwz-noname,NONAME,0x5010002,0x5010004,0x5010005 38nwz-noname,NONAME,0x5010002,0x5010004,0x5010005