README
1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
This directory is used to create a segment of code loadable by
the boot code in lib/bbboot.
The makefile GNUmakefile will generate the MIPS binary linked
to the specified address (LLDOPTS args). This is the address
the code will reside in after the load is completed. Like the
boot code, the source files in the defines ASFILES and CFILES
are linked to form psk.elf. This file is ultimately converted
to a file, psk.nand, that is suitable for initializing external
Flash, from where it will be loaded. psk.nand is encrypted using
the key in ../sk_key.c, and correct ECC terms are written to
the OOB area.
The number of pages in the psk.nand file is specified in
../boot.h by the LOAD_SK_PAGES #define. The actual code
binary is padded to LOAD_SK_PAGES pages with randoms.
The conversion is performed by the psk_tool binary, which is
locally built from psk_tool.c automatically through GNUmakefile.
It can be built directly using either of the commands:
make -f ToolMakefile
or
make psk_tool
For the bootcode to decyrpt, the file vram2.sim is created in
a format suitable for initializing Virage read-only vram bank
2 in the simulations. This file contains the sha-1 hash computed
over the length LOAD_SK_PAGES*512, followed by the patch jump
used by the boot code (just a jump back to the address in $t0).
To use the files psk.nand and vram2.sim in the simulator issue
the command:
make copy
before running the simulator. This assumes the simulator will
be run from the directory $BBROOT/hw/chip/vsim. The "make copy"
command will copy psk.nand to External_File.txt, and copy
vram2.sim to tests/v2.dat.