summaryrefslogtreecommitdiff
path: root/utils/nwztools/database/nvp/README
diff options
context:
space:
mode:
Diffstat (limited to 'utils/nwztools/database/nvp/README')
-rw-r--r--utils/nwztools/database/nvp/README67
1 files changed, 67 insertions, 0 deletions
diff --git a/utils/nwztools/database/nvp/README b/utils/nwztools/database/nvp/README
new file mode 100644
index 0000000000..cb403291c8
--- /dev/null
+++ b/utils/nwztools/database/nvp/README
@@ -0,0 +1,67 @@
1The 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
4downloading all of them. A bit of back story on the NVP: it is non-volatile
5area of the flash that is divided in regions and then "sectors" (unrelated to
6hard drive sectors). Each "sector" stores the data of a "node". The ABI
7between the NVP driver and the userspace is an index: the userspace gives the
8index of a node, and then drives looksup its table to see where it is and what
9is 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")
11that have a corresponding index. For some reason, the driver also contains a
12description of the nodes, in english (so "bti" stands for "boot image").
13
14parse_nvp_header.sh
15===================
16
17This script is given a file name, a kernel directory or a kernel tgz and it will
18try 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
21a running device) and <name> is the standard name of the node. Note that is
22some kind of acronym (like 'fup') and the description needs to be generated
23separatly (see other section).
24
25parse_all_nvp_headers.sh
26========================
27
28This scripts expects a directory to have the following structure:
29 dir/
30 nwz-a10/
31 linux-kernel-*.tgz
32 nwz-e460/
33 linxu-kernel-*.tgz
34 ...
35Each sudirectory must the series name (as used in ../series.txt) and the kernel
36must be a tgz (end in .tgz and not .tar.gz) of the form linux-kernel-*.tgz. Usually
37the variable bit will be the version but some kernels have unknown versions. It
38will then run parse_nvp_header.sh on each of them and store the result in a
39file called <series name>.txt
40
41NOTE: the kernel can be symlinks to other files
42
43nvptool
44=======
45
46The kernel headers do no contain the description of the nvp node names.
47This one can be extract from the icx_nvp[_emmc].ko driver on target using complicated
48elf parsing done by nvptool. Technically nvptoo can find much more information
49like the node -> humanname mapping as well and the actual sector on the disk but
50since we can already extract it easily from the headers, we only extract description
51names from it.
52
53parse_all_nvp_nodes.sh
54======================
55
56This scripts expects a directory to have the following structure:
57 dir/
58 nwz-a10/
59 rootfs.tgz
60 nwz-e460/
61 rootfs.tgz
62 ...
63Each sudirectory must the series name (as used in ../series.txt) and the rootfs
64must be a tar. It will then extract the relevant icx_nvp driver from it and run
65nvptool on it to produce a file called nodes-<series name>.txt
66
67NOTE: the rootfs can be symlinks to other files