source: tt-loader/CMD-SYNTAX @ 16

Revision 15, 5.0 KB checked in by guillaume, 9 years ago (diff)

Publication tt-loader v0.2.1

1Here you will find needed documentation to define your own command files to use
2with tt-loader.
4=== General syntax ===
61. One command is generally completly defined by one line finished by a single
7   line feed.
92. The command function is defined by only the first char.
113. Commands with one parameter must only be one char, than a space or line feed,
12   and then the parameter.
144. Command can only have one parameter.
165. One char commands can be separated by just ';' char without spaces. This is
17   used for example to dump large memory blocks with 'M' command.
19=== Comments ===
216. Comments are defined with chars '/' or '#':
22   * lines beginning with '/' are completly ignored
23   * lines beginning with '#' are printed out but ignored
25=== One char commands ===
277. 'M' is used to dump the content from currently known address. The known
28   address is always initialized with 'a' command. As memory is dump, the known
29   address is updated to point to the next memory block. Dumps are done by block
30   of 8 kilo-bytes.
328. 'P' is used to peek the word pointed by the currently known address. Address
33   is then updated to the next word.
359. 'S' is used to set the stack address to the currently known address. This can
36   be useful when testing boot loaders in case the current stack may be reset to
37   zeros.
3910. 'c' is used to call a program from the currently known address. The program
40   should return and the returned value is logged.
4211. 'b' is used to boot to the last known address. Program should not return.
4412. 'e' is used to specify the end of the commands. No other command will be
45    read after this command.
4713. 'D' is used to ask a download from the OMAP device to a file. The filename
48    must have been spécified earlier as if it is still exists, the download will
49    only occur if the CRC32 of the local file is different from the remote CRC32
50    of the checked memory.
52=== One parameter commands ===
5413. 'a' must be used to update the currently known address in the OMAP device.
55    The address should be specified as hexadecimal with 8 digits as in the
56    following format:
57    a 0x12345678
5914. 'f' is used to load a file into the device memory. The start address must
60    has been set with 'a' command just before. The parameter must be the path to
61    the file to load.
6315. 'd' is used to save to a file the content of the memory downloaded with 'm'
64    command. The parameter id the path to path to write.
65    If the file exists, it is just overwritten.
66    The file size will be the size of the downloaded memory.
6816. 'F' is used to prepare a next download. The parameter must be the path to
69    the file to be created or updated. This command is necessary if you must to
70    update an existing file only if CRC32 of local file is different from remote
71    memory CRC32 check. This is accomplish by using the 'C' command with '0' as
72    parameter. Later, the 'D' command must be used to update the file. As in the
73    following example:
75    F /tmp/memory-dump.raw
76    C 0
77    // Dump 1 Mb from address 0x10000000
78    a 0x10000000
79    m 1024
80    # Updating file is CRC32 has changed
81    D
8317. 'C' is used to set a CRC32 is to be checked on the next memory download. The
84    parameter is an unsigned integer. It should be specified as an 8-digit
85    hexadecimal number or just set to 0. If it is set to 0 and a file has been
86    specified with the 'F' command, then the sent CRC32 will be computed from
87    the file content. On the next download with 'm' command, this CRC32 will be
88    compared to the one found for the targeted memory part.
9018. 'm' is used to just download a memory part to a computer buffer. The
91    parameter is an unsigned integer specifying the size of the memory part to
92    download. The start address of that part must has been set just before with
93    the 'a' command. If a CRC32 has been sent with the 'C' command, you will
94    receive an empty part if the CRC32 match the targeted memory part CRC32.
9619. 'k' is used while you want to start a linux kernel. The parameter must be an
97    integer specifying the device id. For example, for OMAP P2 device id should
98    be set to 491. This id must match one from "linux/arch/arm/tools/mach-types"
99    linux kernel source file. The address to boot the kernel must has been
100    specified with 'a' command.
101    By default, some other ATAG are still set:
102    ATAG_MEM memory start is set to 0x10000000 and size to 64 Mbytes.
103    ATAG_CORE has defaults (check 2nd.bin sources if you are interested)
104    ATAG_INITRD is not set as defaumt initrd size is zero.
105    ATAG_CMDLINE is set to:
106    "mem=64M console=ttyS0,115200 noinitrd root=/dev/mtdblock_bbs5"
108    If you need other defaults, you should edit 2nd/config.h or/and the
109    set_kernel_args() function in 2nd/main.c and cross-compile 2nd.bin before
110    using tt-loader.
113 * Authorize to override some ATAG default values to boot linux kernel
114 * Add a command to validate the CRC32 of the uploaded file to be definitively
115   paranoid in some critical case. If the content should be flash to a NAND
116   critical part for example.
Note: See TracBrowser for help on using the repository browser.