summaryrefslogtreecommitdiff
path: root/utils/nwztools/database/nvp/nwz-a20.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-a20.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-a20.txt')
-rw-r--r--utils/nwztools/database/nvp/nwz-a20.txt90
1 files changed, 90 insertions, 0 deletions
diff --git a/utils/nwztools/database/nvp/nwz-a20.txt b/utils/nwztools/database/nvp/nwz-a20.txt
new file mode 100644
index 0000000000..e7ed5a0bd4
--- /dev/null
+++ b/utils/nwztools/database/nvp/nwz-a20.txt
@@ -0,0 +1,90 @@
1dbg,000
2syi,001
3ubp,002
4fup,003
5bok,004
6hld,005
7rtc,006
8mid,007
9pcd,008
10ser,009
11ufn,010
12kas,011
13shp,012
14tst,013
15gty,014
16fmp,015
17sdp,016
18ncp,017
19psk,018
20pts,077
21btc,085
22bpr,019
23bfp,020
24bfd,021
25bml,022
26apd,078
27blf,079
28slp,080
29vrt,081
30fni,082
31sid,083
32mlk,084
33mso,086
34sdc,089
35cng,023
36dba,024
37dbv,025
38dor,026
39rnd,027
40skd,028
41sfi,029
42mdk,030
43dcc,031
44skt,032
45mtm,033
46tr0,034
47tr1,035
48e00,036
49e01,037
50e02,038
51e03,039
52e04,040
53e05,041
54e06,042
55e07,043
56e08,044
57e09,045
58e10,046
59e11,047
60e12,048
61e13,049
62e14,050
63e15,051
64e16,052
65e17,053
66e18,054
67e19,055
68e20,056
69e21,057
70e22,058
71e23,059
72e24,060
73e25,061
74e26,062
75e27,063
76e28,064
77e29,065
78e30,066
79e31,067
80clv,068
81sps,069
82mdl,070
83edw,071
84bti,072
85hdi,073
86lbi,074
87fui,075
88eri,076
89pci,087
90dbi,088