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