summaryrefslogtreecommitdiff
path: root/utils/nwztools/database/nvp/nwz-a860.txt
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2016-11-11 15:40:56 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2016-11-11 16:07:14 +0100
commit44bb2856a59be53ef5ede154a39c54a59b1cc6d0 (patch)
treece343ecff309d6d0172ea56946a9ce679329b250 /utils/nwztools/database/nvp/nwz-a860.txt
parent19de536ce2f3c8066ca5be9b570f72e5c1e88342 (diff)
downloadrockbox-44bb2856a59be53ef5ede154a39c54a59b1cc6d0.tar.gz
rockbox-44bb2856a59be53ef5ede154a39c54a59b1cc6d0.zip
nwztools/database: add database of information on Sony NWZ linux players
There must be an evil genius in Sony's Walkman division. Someone who made sure that each model is close enough to the previous one so that little code is needed but different enough so that an educated guess is not enough. Each linux-based Sony player has a model ID (mid) which is a 32-bit integer. I was able to extract a list of all model IDs and the correspoding name of the player (see README). This gives us 1) a nice list of all players (because NWZ-A729 vs NWZ-A729B, really Sony?) 2) an easy way to find the name of player programatically. It seems that the lower 8-bit of the model ID gives the storage size but don't bet your life on it. The remaining bytes seem to follow some kind of pattern but there are exceptions. From this list, I was able to build a list of all Sony's series (up to quite recent one). The only safe way to build that is by hand, with a list of series, each series having a list of model IDs. The notion of series is very important because all models in a series share the same firmware. A very important concept on Sony's players is the NVP, an area of the flash that stores data associated with keys. The README contains more information but basically this is where is record the model ID, the destination, the boot flags, the firmware upgrade flags, the boot image, the DRM keys, and a lot of other stuff. Of course Sony decided to slightly tweak the index of the keys regularly over time which means that each series has a potentially different map, and we need this map to talk to the NVP driver. Fortunately, Sony distributes the kernel for all its players and they contain a kernel header with this information. I wrote a script to unpack kernel sources and parse this header, producing a bunch of nw-*.txt files, included in this commit. This map is very specific though: it maps Sony's 3-letter names (bti) to indexes (1). This is not very useful without the decription (bti = boot image) and its size (262144). This information is harder to come by, and is only stored in one place: if icx_nvp_emmc.ko drivers, found on the device. Fortunately, Sony distributes a number of firmware upgrade, that contain the rootfs, than once extracted contain this driver. The driver is a standard ELF files with symbols. I wrote a parsing tool (nvptool) that is able to extract this information from the drivers. Using that, I produced a bunch of nodes-nw*.txt files. A reasonable assumption is that nodes meaning and size do not change over time (bti is always the boot image and is always 262144 bytes), so by merging a few of those file, we can get a complete picture (note that some nodes that existed in older player do not exists anymore so we really need to merge several ones from different generations). The advantage of storing all this information in plain text files, is that it now makes it easy to parse it and produce whatever format we want to use it. I wrote a python script that parses all this mess and produces a C file and header with all this information (nwz_db.{c,h}). Change-Id: Id790581ddd527d64418fe9e4e4df8e0546117b80
Diffstat (limited to 'utils/nwztools/database/nvp/nwz-a860.txt')
-rw-r--r--utils/nwztools/database/nvp/nwz-a860.txt90
1 files changed, 90 insertions, 0 deletions
diff --git a/utils/nwztools/database/nvp/nwz-a860.txt b/utils/nwztools/database/nvp/nwz-a860.txt
new file mode 100644
index 0000000000..f3b5e8738a
--- /dev/null
+++ b/utils/nwztools/database/nvp/nwz-a860.txt
@@ -0,0 +1,90 @@
1dbg,000
2bti,001
3hdi,002
4cng,003
5ser,004
6app,005
7eri,006
8dcc,007
9mdl,008
10fup,009
11bok,010
12shp,011
13dba,012
14dbv,013
15tr0,014
16tr1,015
17mid,016
18tst,017
19gty,018
20fui,019
21lbi,020
22dor,021
23edw,022
24ubp,023
25syi,024
26exm,025
27pcd,026
28btc,027
29rnd,028
30ufn,029
31sdp,030
32ncp,031
33kas,032
34sfi,033
35rtc,034
36bpr,035
37e00,036
38e01,037
39e02,038
40e03,039
41e04,040
42e05,041
43e06,042
44e07,043
45e08,044
46e09,045
47e10,046
48e11,047
49e12,048
50e13,049
51e14,050
52e15,051
53e16,052
54e17,053
55e18,054
56e19,055
57e20,056
58e21,057
59e22,058
60e23,059
61e24,060
62e25,061
63e26,062
64e27,063
65e28,064
66e29,065
67e30,066
68e31,067
69clv,068
70slp,069
71ipt,070
72mtm,071
73mcr,072
74mdk,073
75muk,074
76pts,075
77skt,076
78mac,077
79apd,078
80blf,079
81hld,080
82skd,081
83fmp,082
84sps,083
85msc,084
86vrt,085
87psk,086
88bml,087
89bfd,088
90bfp,089