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/README39
1 files changed, 20 insertions, 19 deletions
diff --git a/utils/nwztools/database/nvp/README b/utils/nwztools/database/nvp/README
index cb403291c8..5ff18513d7 100644
--- a/utils/nwztools/database/nvp/README
+++ b/utils/nwztools/database/nvp/README
@@ -1,38 +1,39 @@
1The NVP map varies a lot from players to players, it is inconceivable to build 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. 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 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 4downloading all of them. A bit of background on the NVP: it is non-volatile
5area of the flash that is divided in regions and then "sectors" (unrelated to 5partition of the flash that is divided in regions and then "zones".
6hard drive sectors). Each "sector" stores the data of a "node". The ABI 6Each "zone" stores the data of a "node". The ABI
7between the NVP driver and the userspace is an index: the userspace gives the 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 8index of a node, and then drives looks up its table to see where it is and what
9is its size. The index map changes over time so Sony introduces standard "names" 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") 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 11that have a corresponding index. Sometimes the driver also contains a
12description of the nodes, in english (so "bti" stands for "boot image"). 12description of the nodes, in English (e.g. "bti" stands for "boot image").
13 13
14parse_nvp_header.sh 14parse_nvp_header.sh
15=================== 15===================
16 16
17This script is given a file name, a kernel directory or a kernel tgz and it will 17This script takes a header filename, a kernel directory or a kernel tgz and will
18try to extract the mapping automatically. It produces a list of pairs 18try to extract the mapping automatically. It produces a list of pairs
19 <node>,<name> 19 <node>,<name>
20where <node> is the index of the node (that's the only thing that is usable on 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 21a running device) and <name> is the standard name of the node. The output should
22some kind of acronym (like 'fup') and the description needs to be generated 22be written to <series name>.txt
23separatly (see other section). 23Note that <name> is an acronym (like 'fup') and the description needs to be generated
24separately (see nvprool section).
24 25
25parse_all_nvp_headers.sh 26parse_all_nvp_headers.sh
26======================== 27========================
27 28
28This scripts expects a directory to have the following structure: 29This script expects a directory to have the following structure:
29 dir/ 30 dir/
30 nwz-a10/ 31 nwz-a10/
31 linux-kernel-*.tgz 32 linux-kernel-*.tgz
32 nwz-e460/ 33 nwz-e460/
33 linxu-kernel-*.tgz 34 linux-kernel-*.tgz
34 ... 35 ...
35Each sudirectory must the series name (as used in ../series.txt) and the kernel 36Each sudirectory must be 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 37must 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 38the 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 39will then run parse_nvp_header.sh on each of them and store the result in a
@@ -43,24 +44,24 @@ NOTE: the kernel can be symlinks to other files
43nvptool 44nvptool
44======= 45=======
45 46
46The kernel headers do no contain the description of the nvp node names. 47The kernel headers do not contain descriptions of the nvp node names.
47This one can be extract from the icx_nvp[_emmc].ko driver on target using complicated 48They can be extracted from the icx_nvp[_emmc].ko driver on target using complicated
48elf parsing done by nvptool. Technically nvptoo can find much more information 49elf parsing done by nvptool. Technically nvptool can discover much more information
49like the node -> humanname mapping as well and the actual sector on the disk but 50like the node -> human name mapping as well and the actual zone in the flash but
50since we can already extract it easily from the headers, we only extract description 51since we can already extract it easily from the headers, we only extract description
51names from it. 52names from it.
52 53
53parse_all_nvp_nodes.sh 54parse_all_nvp_nodes.sh
54====================== 55======================
55 56
56This scripts expects a directory to have the following structure: 57This script expects a directory to have the following structure:
57 dir/ 58 dir/
58 nwz-a10/ 59 nwz-a10/
59 rootfs.tgz 60 rootfs.tgz
60 nwz-e460/ 61 nwz-e460/
61 rootfs.tgz 62 rootfs.tgz
62 ... 63 ...
63Each sudirectory must the series name (as used in ../series.txt) and the rootfs 64Each sudirectory must be 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 65must 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 66nvptool on it to produce a file called nodes-<series name>.txt
66 67