diff options
| author | Tom Rini <trini@konsulko.com> | 2023-07-01 16:11:51 -0400 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2023-07-01 16:11:51 -0400 |
| commit | ac29400f1f4ae5df2542bacfe4c142db7824bd6c (patch) | |
| tree | 48b68138529a415c4a39ef734063d3fa2ebca864 /doc/usage | |
| parent | 5fa30f2351ac3c0458069896bc868eae927df410 (diff) | |
| parent | 2b17dd1d9d8ca2cfc7f5e964384d4d8418904c35 (diff) | |
Merge tag 'efi-2023-07-rc6' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2023-07-rc6
Documentation:
* man-pages for the loads and saves commands
UEFI:
* fix implementation of allow_unaligned() for armv7 and arm11
Diffstat (limited to 'doc/usage')
| -rw-r--r-- | doc/usage/cmd/loadb.rst | 2 | ||||
| -rw-r--r-- | doc/usage/cmd/loads.rst | 96 | ||||
| -rw-r--r-- | doc/usage/cmd/saves.rst | 88 | ||||
| -rw-r--r-- | doc/usage/index.rst | 2 |
4 files changed, 187 insertions, 1 deletions
diff --git a/doc/usage/cmd/loadb.rst b/doc/usage/cmd/loadb.rst index b37d1d7b596..0464b1f41ce 100644 --- a/doc/usage/cmd/loadb.rst +++ b/doc/usage/cmd/loadb.rst @@ -13,7 +13,7 @@ Synopsis Description ----------- -The loady command is used to transfer a file to the device via the serial line +The loadb command is used to transfer a file to the device via the serial line using the Kermit protocol. The number of transferred bytes is saved in environment variable filesize. diff --git a/doc/usage/cmd/loads.rst b/doc/usage/cmd/loads.rst new file mode 100644 index 00000000000..e4cb063df6d --- /dev/null +++ b/doc/usage/cmd/loads.rst @@ -0,0 +1,96 @@ +.. SPDX-License-Identifier: GPL-2.0+: + +loads command +============= + +Synopsis +-------- + +:: + + loads [offset [baud]] + +Description +----------- + +The loads command is used to transfer a file to the device via the serial line +using the Motorola S-record file format. + +offset + offset added to the addresses in the S-record file + +baud + baud rate to use for download. This parameter is only available if + CONFIG_SYS_LOADS_BAUD_CHANGE=y + +Example +------- + +As example file to be transferred we use a script printing 'hello s-record'. +Here are the commands to create the S-record file: + +.. code-block:: bash + + $ echo 'echo hello s-record' > script.txt + $ mkimage -T script -d script.txt script.scr + Image Name: + Created: Sun Jun 25 10:35:02 2023 + Image Type: PowerPC Linux Script (gzip compressed) + Data Size: 28 Bytes = 0.03 KiB = 0.00 MiB + Load Address: 00000000 + Entry Point: 00000000 + Contents: + Image 0: 20 Bytes = 0.02 KiB = 0.00 MiB + $ srec_cat script.scr -binary -CRLF -Output script.srec + $ echo -e "S9030000FC\r" >> script.srec + $ cat script.srec + S0220000687474703A2F2F737265636F72642E736F75726365666F7267652E6E65742F1D + S1230000270519566D773EB6649815E30000001700000000000000003DE3D97005070601E2 + S12300200000000000000000000000000000000000000000000000000000000000000000BC + S11A00400000000F0000000068656C6C6F20732D7265636F72640A39 + S5030003F9 + S9030000FC + $ + +The load address in the first S1 record is 0x0000. + +The terminal emulation program picocom is invoked with *cat* as the send +command to transfer the file. + +.. code-block:: + + picocom --send-cmd 'cat' --baud 115200 /dev/ttyUSB0 + +After entering the *loads* command the key sequence <CTRL-A><CTRL-S> is used to +let picocom prompt for the file name. Picocom invokes the program *cat* for the +file transfer. The loaded script is executed using the *source* command. + +.. code-block:: + + => loads $scriptaddr + ## Ready for S-Record download ... + + *** file: script.srec + $ cat script.srec + + *** exit status: 0 *** + + ## First Load Addr = 0x4FC00000 + ## Last Load Addr = 0x4FC0005B + ## Total Size = 0x0000005C = 92 Bytes + ## Start Addr = 0x00000000 + => source $scriptaddr + ## Executing script at 4fc00000 + hello s-record + => + +Configuration +------------- + +The command is only available if CONFIG_CMD_LOADS=y. The parameter to set the +baud rate is only available if CONFIG_SYS_LOADS_BAUD_CHANGE=y + +Return value +------------ + +The return value $? is 0 (true) on success, 1 (false) otherwise. diff --git a/doc/usage/cmd/saves.rst b/doc/usage/cmd/saves.rst new file mode 100644 index 00000000000..5823f883790 --- /dev/null +++ b/doc/usage/cmd/saves.rst @@ -0,0 +1,88 @@ +.. SPDX-License-Identifier: GPL-2.0+: + +saves command +============= + +Synopsis +-------- + +:: + + saves [offset [size [baud]]] + +Description +----------- + +The *saves* command is used to transfer a file from the device via the serial +line using the Motorola S-record file format. + +offset + start address of memory area to save, defaults to 0x0 + +size + size of memory area to save, defaults to 0x0 + +baud + baud rate to use for upload. This parameter is only available if + CONFIG_SYS_LOADS_BAUD_CHANGE=y + +Example +------- + +In the example the *screen* command is used to connect to the U-Boot serial +console. + +In a first screen session a file is loaded from the SD-card and the *saves* +command is invoked. <CTRL+A><k> is used to kill the screen session. + +A new screen session is started which logs the output to a file and the +<ENTER> key is hit to start the file output. <CTRL+A><k> is issued to kill the +screen session. + +The log file is converted to a binary file using the *srec_cat* command. +A negative offset of -1337982976 (= -0x4c000000) is applied to compensate for +the offset used in the *saves* command. + +.. code-block:: + + $ screen /dev/ttyUSB0 115200 + => echo $scriptaddr + 0x4FC00000 + => load mmc 0:1 $scriptaddr boot.txt + 124 bytes read in 1 ms (121.1 KiB/s) + => saves $scriptaddr $filesize + ## Ready for S-Record upload, press ENTER to proceed ... + Really kill this window [y/n] + $ screen -Logfile out.srec -L /dev/ttyUSB0 115200 + S0030000FC + S3154FC00000736574656E76206175746F6C6F616420AD + S3154FC000106E6F0A646863700A6C6F6164206D6D633E + S3154FC0002020303A3120246664745F616464725F72B3 + S3154FC00030206474620A6C6F6164206D6D6320303AC0 + S3154FC000403120246B65726E656C5F616464725F72DA + S3154FC0005020736E702E6566690A626F6F74656669C6 + S3154FC0006020246B65726E656C5F616464725F7220CB + S3114FC00070246664745F616464725F720A38 + S70500000000FA + ## S-Record upload complete + => + Really kill this window [y/n] + $ srec_cat out.srec -offset -1337982976 -Output out.txt -binary 2>/dev/null + $ cat out.txt + setenv autoload no + dhcp + load mmc 0:1 $fdt_addr_r dtb + load mmc 0:1 $kernel_addr_r snp.efi + bootefi $kernel_addr_r $fdt_addr_r + $ + +Configuration +------------- + +The command is only available if CONFIG_CMD_SAVES=y. The parameter to set the +baud rate is only available if CONFIG_SYS_LOADS_BAUD_CHANGE=y + +Return value +------------ + +The return value $? is 0 (true) on success, 1 (false) otherwise. diff --git a/doc/usage/index.rst b/doc/usage/index.rst index 29ae8a176e7..388e59f1733 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -68,6 +68,7 @@ Shell commands cmd/load cmd/loadb cmd/loadm + cmd/loads cmd/loadx cmd/loady cmd/mbr @@ -84,6 +85,7 @@ Shell commands cmd/read cmd/reset cmd/rng + cmd/saves cmd/sbi cmd/sf cmd/scp03 |
