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