rockbox/utils/nwztools/database/nvp/nwz-zx2.txt

91 lines
720 B
Text
Raw Normal View History

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
2016-11-11 14:40:56 +00:00
dbg,000
bti,001
hdi,002
cng,003
ser,004
app,005
eri,006
dcc,007
mdl,008
fup,009
bok,010
shp,011
dba,012
dbv,013
tr0,014
tr1,015
mid,016
tst,017
gty,018
fui,019
lbi,020
dor,021
edw,022
ubp,023
syi,024
exm,025
pcd,026
cgp,027
rnd,028
ufn,029
sdp,030
ncp,031
kas,032
sfi,033
rtc,034
bpr,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
slp,069
ipt,070
mtm,071
mcr,072
mdk,073
muk,074
pts,075
skt,076
mac,077
apd,078
blf,079
hld,080
skd,081
fmp,082
sps,083
msc,084
vrt,085
psk,086
bml,087
bfd,088
bfp,089