Svyatoslav Ryhel | f8700e4 | 2023-02-14 19:35:38 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+: |
| 2 | |
| 3 | ebtupdate command |
Tom Rini | 79a2dbb | 2023-02-23 17:32:22 -0500 | [diff] [blame] | 4 | ================= |
Svyatoslav Ryhel | f8700e4 | 2023-02-14 19:35:38 +0200 | [diff] [blame] | 5 | |
| 6 | Synopsis |
| 7 | -------- |
| 8 | |
| 9 | :: |
| 10 | |
| 11 | ebtupdate [<bct> [<ebt>] [<size>]] |
| 12 | |
| 13 | Description |
| 14 | ----------- |
| 15 | |
| 16 | The "ebtupdate" command is used to self-update bootloader on Tegra 2 and Tegra 3 |
| 17 | production devices which were processed using re-cryption. |
| 18 | |
| 19 | The "ebtupdate" performs encryption of new bootloader and decryption, patching |
| 20 | and re-encryption of BCT "in situ". After BCT and bootloader can be written in |
| 21 | their respective places. |
| 22 | |
| 23 | bct |
| 24 | address of BCT block pre-loaded into RAM. |
| 25 | |
| 26 | ebt |
| 27 | address of the bootloader pre-loaded into RAM. |
| 28 | |
| 29 | size |
| 30 | size of the pre-loaded bootloader. |
| 31 | |
| 32 | Example |
| 33 | ------- |
| 34 | |
| 35 | This is the boot log of a LG Optimus Vu: |
| 36 | |
| 37 | :: |
| 38 | |
| 39 | => mmc dev 0 1 |
| 40 | switch to partitions #1, OK |
| 41 | mmc0(part 1) is current device |
| 42 | => mmc read $kernel_addr_r 0 $boot_block_size |
| 43 | MMC read: dev # 0, block # 0, count 4096 ... 4096 blocks read: OK |
| 44 | => load mmc 0:1 $ramdisk_addr_r $bootloader_file |
| 45 | 684783 bytes read in 44 ms (14.8 MiB/s) |
| 46 | => size mmc 0:1 $bootloader_file |
| 47 | => ebtupdate $kernel_addr_r $ramdisk_addr_r $filesize |
| 48 | => mmc dev 0 1 |
| 49 | switch to partitions #1, OK |
| 50 | mmc0(part 1) is current device |
| 51 | => mmc write $kernel_addr_r 0 $boot_block_size |
| 52 | MMC write: dev # 0, block # 0, count 4096 ... 4096 blocks written: OK |
| 53 | => mmc dev 0 2 |
| 54 | switch to partitions #2, OK |
| 55 | mmc0(part 2) is current device |
| 56 | => mmc write $ramdisk_addr_r 0 $boot_block_size |
| 57 | MMC write: dev # 0, block # 0, count 4096 ... 4096 blocks written: OK |
| 58 | |
| 59 | Configuration |
| 60 | ------------- |
| 61 | |
| 62 | The ebtupdate command is only available if CONFIG_CMD_EBTUPDATE=y and |
| 63 | only on Tegra 2 and Tegra 3 configurations. |
| 64 | |
| 65 | Return value |
| 66 | ------------ |
| 67 | |
| 68 | The return value $? is set to 0 (true) if everything went successfully. If an |
| 69 | error occurs, the return value $? is set to 1 (false). |