rockbox/utils
Amaury Pouly 44bb2856a5 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 16:07:14 +01:00
..
AMS/hacking amsinfo: save files with .bin extension 2011-12-13 03:01:16 +00:00
analysis Introduce a new analysis tool to detect which macros are defined in each build. 2015-02-16 11:31:05 +01:00
atj2137 Fix uninitialized variable (should fix libusb retry handling) 2015-01-04 13:35:47 +01:00
bootchart Add simple bootchart -> gnuplot shell script 2010-04-05 19:58:51 +00:00
common update deploy.py to recognize and use Qt5 2016-01-17 18:38:28 +01:00
disassembler/arm Make sure files which aren't windows-specific use \n line endings only 2010-06-17 16:59:51 +00:00
e200tool Add new tool to upload code on e200/c200/view in manufacturer mode 2014-04-07 22:25:06 +02:00
editors
hwpatcher hwpatcher: add generic RKW file patching script 2014-09-02 22:35:26 +02:00
hwstub ATJ hwstub make irq based usb driver work 2016-11-10 13:57:02 +01:00
imxtools qeditor: port to the new hwstub library and add features 2016-04-08 18:46:46 +01:00
ipod
jz4740_tools Fix crash on uninitialized variable 2015-01-13 21:57:24 +01:00
jz4760_tools jz4670_tools: add usbboot tool, tweak Makefile and packtool 2016-04-08 18:54:46 +01:00
meizu_dfu meizu_dfu: supports a single argument to run some code from RAM 2010-06-08 23:04:17 +00:00
MTP MTP: put libs after files in the Makefile, to please old gcc versions 2014-12-13 12:58:08 +01:00
nwztools nwztools/database: add database of information on Sony NWZ linux players 2016-11-11 16:07:14 +01:00
regtools regtools: fix library bug when checking if a reference is valid or not 2016-09-21 00:31:18 +01:00
rk27utils Fix uninitialized variable (should fix libusb retry handling) 2015-01-04 13:35:47 +01:00
rknanoutils rknanoutils: fix boot tool 2013-03-21 19:02:03 +01:00
rockbox_api
samsungtools samsungtool: allow firmware creation 2012-12-06 12:17:50 +01:00
skinupdater SKIN BREAK: %pb, %bl and %pv (bar types) changed so the image is the last param instead of the first. skin updater, skins and manual all updated. 2010-06-09 16:15:01 +00:00
tcctool tcctool: fix Makefile 2013-09-18 13:14:20 +02:00
themeeditor Convert one more file from DOS to UNIX. 2011-11-06 22:52:21 +00:00
time-sync time-sync: allow passing an arbitrary time. 2013-06-09 19:51:08 +02:00
ypr0tools ypr1: Add some commands to rockbox.sh which are needed for playback 2014-03-09 23:25:50 +01:00
zenutils Clean up bogus 'make compiler happy' code 2015-01-12 21:13:00 +01:00
parse_testcodec.rb utils/parse_testcodec.rb: add support for Opus files 2015-07-17 00:51:22 +02:00