blob: 5ff18513d7728d4cd6913e5a35d993775b194b10 [file] [log] [blame]
Amaury Pouly44bb2852016-11-11 15:40:56 +01001The NVP map varies a lot from players to players, it is inconceivable to build
2it by hand. The approach taken is to extract it from the kernel of each player.
3Since Sony provides the kernel of all players, it is 'only' a matter of
Igor Skochinsky03dd4b92017-04-03 15:13:46 +02004downloading all of them. A bit of background on the NVP: it is non-volatile
5partition of the flash that is divided in regions and then "zones".
6Each "zone" stores the data of a "node". The ABI
Amaury Pouly44bb2852016-11-11 15:40:56 +01007between the NVP driver and the userspace is an index: the userspace gives the
Igor Skochinsky03dd4b92017-04-03 15:13:46 +02008index of a node, and then drives looks up its table to see where it is and what
Amaury Pouly44bb2852016-11-11 15:40:56 +01009is its size. The index map changes over time so Sony introduces standard "names"
10for its entries, those are 3-letters acronym (for example "fup" or "bti" or "shp")
Igor Skochinsky03dd4b92017-04-03 15:13:46 +020011that have a corresponding index. Sometimes the driver also contains a
12description of the nodes, in English (e.g. "bti" stands for "boot image").
Amaury Pouly44bb2852016-11-11 15:40:56 +010013
14parse_nvp_header.sh
15===================
16
Igor Skochinsky03dd4b92017-04-03 15:13:46 +020017This script takes a header filename, a kernel directory or a kernel tgz and will
Amaury Pouly44bb2852016-11-11 15:40:56 +010018try to extract the mapping automatically. It produces a list of pairs
19 <node>,<name>
20where <node> is the index of the node (that's the only thing that is usable on
Igor Skochinsky03dd4b92017-04-03 15:13:46 +020021a running device) and <name> is the standard name of the node. The output should
22be written to <series name>.txt
23Note that <name> is an acronym (like 'fup') and the description needs to be generated
24separately (see nvprool section).
Amaury Pouly44bb2852016-11-11 15:40:56 +010025
26parse_all_nvp_headers.sh
27========================
28
Igor Skochinsky03dd4b92017-04-03 15:13:46 +020029This script expects a directory to have the following structure:
Amaury Pouly44bb2852016-11-11 15:40:56 +010030 dir/
31 nwz-a10/
32 linux-kernel-*.tgz
33 nwz-e460/
Igor Skochinsky03dd4b92017-04-03 15:13:46 +020034 linux-kernel-*.tgz
Amaury Pouly44bb2852016-11-11 15:40:56 +010035 ...
Igor Skochinsky03dd4b92017-04-03 15:13:46 +020036Each sudirectory must be the series name (as used in ../series.txt) and the kernel
Amaury Pouly44bb2852016-11-11 15:40:56 +010037must be a tgz (end in .tgz and not .tar.gz) of the form linux-kernel-*.tgz. Usually
38the variable bit will be the version but some kernels have unknown versions. It
39will then run parse_nvp_header.sh on each of them and store the result in a
40file called <series name>.txt
41
42NOTE: the kernel can be symlinks to other files
43
44nvptool
45=======
46
Igor Skochinsky03dd4b92017-04-03 15:13:46 +020047The kernel headers do not contain descriptions of the nvp node names.
48They can be extracted from the icx_nvp[_emmc].ko driver on target using complicated
49elf parsing done by nvptool. Technically nvptool can discover much more information
50like the node -> human name mapping as well and the actual zone in the flash but
Amaury Pouly44bb2852016-11-11 15:40:56 +010051since we can already extract it easily from the headers, we only extract description
52names from it.
53
54parse_all_nvp_nodes.sh
55======================
56
Igor Skochinsky03dd4b92017-04-03 15:13:46 +020057This script expects a directory to have the following structure:
Amaury Pouly44bb2852016-11-11 15:40:56 +010058 dir/
59 nwz-a10/
60 rootfs.tgz
61 nwz-e460/
62 rootfs.tgz
63 ...
Igor Skochinsky03dd4b92017-04-03 15:13:46 +020064Each sudirectory must be the series name (as used in ../series.txt) and the rootfs
Amaury Pouly44bb2852016-11-11 15:40:56 +010065must be a tar. It will then extract the relevant icx_nvp driver from it and run
66nvptool on it to produce a file called nodes-<series name>.txt
67
68NOTE: the rootfs can be symlinks to other files