summaryrefslogtreecommitdiff
path: root/utils/nwztools
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2019-04-22 23:32:18 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2019-04-22 23:45:33 +0200
commit063ff294a266f68ab93f462c264613c2223a40cd (patch)
tree908e17e4b85667748b4ecac3c926628e3c8b1436 /utils/nwztools
parente41a563b6cda71b8c973e884f47140087ebcd5ff (diff)
nwztools: add DMP-Z1 to the database
This is one of those fancy gold-plated devices. Of course it breaks my scripts that were nicely expecting every device to start with NW. Change-Id: I161320f620f65f4f92c2650d192b26a9831eeb9d
Diffstat (limited to 'utils/nwztools')
-rwxr-xr-xutils/nwztools/database/gen_db.py4
-rw-r--r--utils/nwztools/database/models.txt1
-rw-r--r--utils/nwztools/database/nvp/dmp-z1.txt93
-rwxr-xr-xutils/nwztools/database/nvp/parse_all_nvp_headers.sh2
-rw-r--r--utils/nwztools/database/series.txt1
5 files changed, 98 insertions, 3 deletions
diff --git a/utils/nwztools/database/gen_db.py b/utils/nwztools/database/gen_db.py
index 23f4e3f474..9e8bc89102 100755
--- a/utils/nwztools/database/gen_db.py
+++ b/utils/nwztools/database/gen_db.py
@@ -46,12 +46,12 @@ with open('series.txt') as fp:
g_hash_nvp = dict() # hash -> nvp
g_nvp_hash = dict() # codename -> hash
HASH_SIZE=6
-map_files = glob.glob('nvp/nw*.txt')
+map_files = glob.glob('nvp/nw*.txt') + glob.glob('nvp/dmp*.txt')
for f in map_files:
h = hashlib.md5()
h.update(open(f, "rb").read())
hash = h.hexdigest()
- codename = re.search('(nw.*)\.txt', f).group(1)
+ codename = re.search('nvp/([^\.]*)\.txt', f).group(1)
# sanity check
if not (codename in g_series_codename):
print("Warning: file %s does not have a match series in series.txt" % f)
diff --git a/utils/nwztools/database/models.txt b/utils/nwztools/database/models.txt
index d89f0aa015..e6e214f2dc 100644
--- a/utils/nwztools/database/models.txt
+++ b/utils/nwztools/database/models.txt
@@ -193,3 +193,4 @@
0x25000004,NW-A55
0x25000006,NW-A57
0x23000007,NW-ZX300
+0x26000008,DMP-Z1
diff --git a/utils/nwztools/database/nvp/dmp-z1.txt b/utils/nwztools/database/nvp/dmp-z1.txt
new file mode 100644
index 0000000000..46fb2ffedc
--- /dev/null
+++ b/utils/nwztools/database/nvp/dmp-z1.txt
@@ -0,0 +1,93 @@
+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
+se2,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
+dgs,092
+atf,023
+lyr,024
+dbv,025
+fur,026
+ums,027
+skd,028
+ups,029
+aws,030
+fvi,031
+mac,032
+fpi,033
+ssk,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_all_nvp_headers.sh b/utils/nwztools/database/nvp/parse_all_nvp_headers.sh
index 2af5e83cdc..d02440c77d 100755
--- a/utils/nwztools/database/nvp/parse_all_nvp_headers.sh
+++ b/utils/nwztools/database/nvp/parse_all_nvp_headers.sh
@@ -24,7 +24,7 @@ if [ "$1" = "--new-only" ]; then
fi
# list interesting directories
-for dir in `find "$1" -maxdepth 1 -name "nw-*" -or -name "nwz-*"`
+for dir in `find "$1" -maxdepth 1 -name "nw-*" -or -name "nwz-*" -or -name "dmp-*"`
do
# extract codename
codename=`basename "$dir"`
diff --git a/utils/nwztools/database/series.txt b/utils/nwztools/database/series.txt
index 14d267fbfe..d10bfe2988 100644
--- a/utils/nwztools/database/series.txt
+++ b/utils/nwztools/database/series.txt
@@ -37,3 +37,4 @@ nwz-x1000,NWZ-X1000 Series,0x5000002,0x5000004,0x5000005,0x5020002,0x5040002,0x5
nw-zx100,NW-ZX100 Series,0x1c000007,0x1c000001,0x1c000002,0x1c000004,0x1c000005,0x1c000006
nw-zx300,NW-ZX300 Series,0x23000004,0x23000006,0x23000007
nwz-noname,NONAME,0x5010002,0x5010004,0x5010005
+dmp-z1,DMP-Z1 Series,0x26000008