summaryrefslogtreecommitdiffstats
path: root/utils/nwztools
diff options
context:
space:
mode:
Diffstat (limited to 'utils/nwztools')
-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
import re
import subprocess
import hashlib
+import sys
+
+# arguments
+if len(sys.argv) != 2:
+ print("Usage: %s output_directory" % sys.argv[0])
+ exit(1)
+output_directory = sys.argv[1]
+# check path is valid
+if not os.path.isdir(output_directory):
+ print("Error: '%s' is not a valid directory" % output_directory)
+ exit(1)
# parse models.txt
g_models = []
@@ -200,7 +211,7 @@ extern struct nwz_series_info_t nwz_series[NWZ_SERIES_COUNT];
#endif /* __NWZ_DB_H__ */
"""
-with open("nwz-db.h", "w") as fp:
+with open(os.path.join(output_directory, "nwz-db.h"), "w") as fp:
fp.write(header_begin)
# generate list of all nvp nodes
for name in sorted(g_nvp_names):
@@ -256,7 +267,7 @@ def by_name(nvp_entry):
def codename_to_c(codename):
return re.sub('[^a-zA-Z0-9]', '_', codename, 0)
-with open("nwz-db.c", "w") as fp:
+with open(os.path.join(output_directory, "nwz-db.c"), "w") as fp:
fp.write(impl_begin)
# generate model list (sort by mid)
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 @@
+dbg,000
+syi,001
+ubp,002
+fup,003
+prk,004
+hld,005
+pwd,006
+mid,007
+pcd,008
+ser,009
+ufn,010
+kas,011
+shp,012
+tst,013
+gty,014
+clg,015
+sdp,016
+ncp,017
+psk,018
+nvr,077
+she,084
+btc,085
+ins,089
+ctr,090
+sku,091
+bpr,019
+bfp,020
+bfd,021
+bml,022
+apd,078
+blf,079
+slp,080
+vrt,081
+fni,082
+sid,083
+mso,086
+cng,023
+lyr,024
+dbv,025
+fur,026
+ums,027
+skd,028
+ups,029
+mdk,030
+fvi,031
+mac,032
+fpi,033
+tr0,034
+tr1,035
+e00,036
+e01,037
+e02,038
+e03,039
+e04,040
+e05,041
+e06,042
+e07,043
+e08,044
+e09,045
+e10,046
+e11,047
+e12,048
+e13,049
+e14,050
+e15,051
+e16,052
+e17,053
+e18,054
+e19,055
+e20,056
+e21,057
+e22,058
+e23,059
+e24,060
+e25,061
+e26,062
+e27,063
+e28,064
+e29,065
+e30,066
+e31,067
+clv,068
+sps,069
+rbt,070
+edw,071
+bti,072
+hdi,073
+lbi,074
+fui,075
+eri,076
+pci,087
+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 @@
+dbg,000
+syi,001
+ubp,002
+fup,003
+prk,004
+hld,005
+pwd,006
+mid,007
+pcd,008
+ser,009
+ufn,010
+kas,011
+shp,012
+tst,013
+gty,014
+clg,015
+sdp,016
+ncp,017
+psk,018
+nvr,077
+she,084
+btc,085
+ins,089
+ctr,090
+sku,091
+bpr,019
+bfp,020
+bfd,021
+bml,022
+apd,078
+blf,079
+slp,080
+vrt,081
+fni,082
+sid,083
+mso,086
+cng,023
+lyr,024
+dbv,025
+fur,026
+ums,027
+skd,028
+ups,029
+mdk,030
+fvi,031
+mac,032
+fpi,033
+tr0,034
+tr1,035
+e00,036
+e01,037
+e02,038
+e03,039
+e04,040
+e05,041
+e06,042
+e07,043
+e08,044
+e09,045
+e10,046
+e11,047
+e12,048
+e13,049
+e14,050
+e15,051
+e16,052
+e17,053
+e18,054
+e19,055
+e20,056
+e21,057
+e22,058
+e23,059
+e24,060
+e25,061
+e26,062
+e27,063
+e28,064
+e29,065
+e30,066
+e31,067
+clv,068
+sps,069
+rbt,070
+edw,071
+bti,072
+hdi,073
+lbi,074
+fui,075
+eri,076
+pci,087
+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
if [ "`echo "$LIST" | grep "icx_nvp_emmc.h" | wc -l`" = "1" ]; then
LIST=`echo "$LIST" | grep "icx_nvp_emmc.h"`
else
- LIST=`echo "$LIST" | grep 'icx[[:digit:]]*_nvp[[:alpha:]_]*.h'`
+# otherwise find any file named icx_nvp*.h but filter out icx_nvp_wrapper.h
+ LIST=`echo "$LIST" | grep 'icx[[:digit:]]*_nvp[[:alpha:]_]*.h' | sed '/icx_nvp_wrapper/d'`
fi
LIST_CNT=`echo "$LIST" | wc -l`
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 @@
nwz-a10,NWZ-A10 Series,0x1a000001,0x1a000002,0x1a000004,0x1a000005,0x1a000006,0x1a010001,0x1a010002,0x1a010004,0x1a010005,0x1a010006
nw-a20,NW-A20 Series,0x1d000001,0x1d000002,0x1d000004,0x1d000005,0x1d000006,0x1d000007
nw-a30,NW-A30 Series,0x22000004,0x22000005,0x22000006
+nw-a40,NW-A40 Series,
nwz-a720,NWZ-A720 Series,0x3030001,0x3030002,0x3030004,0x3020001,0x3020002,0x3020004
nwz-a810,NWZ-A810 Series,0x10000,0x10001,0x10002
nwz-a820,NWZ-A820 Series,0x3010001,0x3010002,0x3010004,0x3000001,0x3000002,0x3000004
@@ -33,4 +34,5 @@ nw-s780,NW-S780 Series,0x19000001,0x19000002,0x19000004,0x19000005
nw-wm1,NW-WM1 Series,0x20000007,0x21000008
nwz-x1000,NWZ-X1000 Series,0x5000002,0x5000004,0x5000005,0x5020002,0x5040002,0x5020004,0x5040004,0x5020005,0x5040005
nw-zx100,NW-ZX100 Series,0x1c000007,0x1c000001,0x1c000002,0x1c000004,0x1c000005,0x1c000006
+nw-zx300,NW-ZX300 Series,
nwz-noname,NONAME,0x5010002,0x5010004,0x5010005