summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSvyatoslav Ryhel <clamor95@gmail.com>2023-02-14 19:35:38 +0200
committerTom <twarren@nvidia.com>2023-02-23 12:55:37 -0700
commit5a8fe1ee818e0f8a74fa088f6a3d705a01b6afbe (patch)
tree86f2e6c36d8bc974b1330e1dd58ece99121d29d8 /doc
parent327ff8e0a49e2e16ac946d059cae7df964c6ea59 (diff)
ARM: tegra20: implement BCT patching
This function allows updating bootloader from u-boot on production devices without need in host PC. Be aware! It works only with re-crypt BCT. Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101 T20 Signed-off-by: Ramin Khonsari <raminterex@yahoo.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Tom <twarren@nvidia.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/usage/cmd/ebtupdate.rst69
1 files changed, 69 insertions, 0 deletions
diff --git a/doc/usage/cmd/ebtupdate.rst b/doc/usage/cmd/ebtupdate.rst
new file mode 100644
index 0000000000..040cef37ec
--- /dev/null
+++ b/doc/usage/cmd/ebtupdate.rst
@@ -0,0 +1,69 @@
+.. SPDX-License-Identifier: GPL-2.0+:
+
+ebtupdate command
+=============
+
+Synopsis
+--------
+
+::
+
+ ebtupdate [<bct> [<ebt>] [<size>]]
+
+Description
+-----------
+
+The "ebtupdate" command is used to self-update bootloader on Tegra 2 and Tegra 3
+production devices which were processed using re-cryption.
+
+The "ebtupdate" performs encryption of new bootloader and decryption, patching
+and re-encryption of BCT "in situ". After BCT and bootloader can be written in
+their respective places.
+
+bct
+ address of BCT block pre-loaded into RAM.
+
+ebt
+ address of the bootloader pre-loaded into RAM.
+
+size
+ size of the pre-loaded bootloader.
+
+Example
+-------
+
+This is the boot log of a LG Optimus Vu:
+
+::
+
+ => mmc dev 0 1
+ switch to partitions #1, OK
+ mmc0(part 1) is current device
+ => mmc read $kernel_addr_r 0 $boot_block_size
+ MMC read: dev # 0, block # 0, count 4096 ... 4096 blocks read: OK
+ => load mmc 0:1 $ramdisk_addr_r $bootloader_file
+ 684783 bytes read in 44 ms (14.8 MiB/s)
+ => size mmc 0:1 $bootloader_file
+ => ebtupdate $kernel_addr_r $ramdisk_addr_r $filesize
+ => mmc dev 0 1
+ switch to partitions #1, OK
+ mmc0(part 1) is current device
+ => mmc write $kernel_addr_r 0 $boot_block_size
+ MMC write: dev # 0, block # 0, count 4096 ... 4096 blocks written: OK
+ => mmc dev 0 2
+ switch to partitions #2, OK
+ mmc0(part 2) is current device
+ => mmc write $ramdisk_addr_r 0 $boot_block_size
+ MMC write: dev # 0, block # 0, count 4096 ... 4096 blocks written: OK
+
+Configuration
+-------------
+
+The ebtupdate command is only available if CONFIG_CMD_EBTUPDATE=y and
+only on Tegra 2 and Tegra 3 configurations.
+
+Return value
+------------
+
+The return value $? is set to 0 (true) if everything went successfully. If an
+error occurs, the return value $? is set to 1 (false).