Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | U-Boot for the ASUS/Google Nexus 7 (2012) |
| 4 | ========================================= |
| 5 | |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 6 | ``DISCLAMER!`` Moving your ASUS/Google Nexus 7 (2012) to use U-Boot assumes |
| 7 | replacement of the vendor ASUS bootloader. Vendor android firmwares will no |
| 8 | longer be able to run on the device. This replacement IS reversible. |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 9 | |
| 10 | Quick Start |
| 11 | ----------- |
| 12 | |
| 13 | - Build U-Boot |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 14 | - Process U-Boot |
| 15 | - Flashing U-Boot into the eMMC |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 16 | - Boot |
| 17 | - Self Upgrading |
| 18 | |
| 19 | Build U-Boot |
| 20 | ------------ |
| 21 | |
Svyatoslav Ryhel | 84686d8 | 2024-08-01 16:42:24 +0300 | [diff] [blame] | 22 | U-Boot features ability to detect grouper board revision on which it is |
| 23 | loaded. Currently are supported both TI and MAXIM based WiFi-only models |
| 24 | along with cellular one. |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 25 | |
| 26 | .. code-block:: bash |
| 27 | |
| 28 | $ export CROSS_COMPILE=arm-linux-gnueabi- |
Svyatoslav Ryhel | 84686d8 | 2024-08-01 16:42:24 +0300 | [diff] [blame] | 29 | $ make grouper_defconfig # For all grouper versions and tilapia |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 30 | $ make |
| 31 | |
| 32 | After the build succeeds, you will obtain the final ``u-boot-dtb-tegra.bin`` |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 33 | image, ready for further processing. |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 34 | |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 35 | Process U-Boot |
| 36 | -------------- |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 37 | |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 38 | ``DISCLAMER!`` All questions related to the re-crypt work should be asked |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 39 | in re-crypt repo issues. NOT HERE! |
| 40 | |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 41 | re-crypt is a tool that processes the ``u-boot-dtb-tegra.bin`` binary into form |
| 42 | usable by device. This process is required only on the first installation or |
| 43 | to recover the device in case of a failed update. You need to know your |
| 44 | tablet's individual SBK to continue. |
| 45 | |
| 46 | Permanent installation can be performed either by using the nv3p protocol or by |
| 47 | pre-loading just built U-Boot into RAM. |
| 48 | |
| 49 | Processing for the NV3P protocol |
| 50 | ******************************** |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 51 | |
| 52 | .. code-block:: bash |
| 53 | |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 54 | $ git clone https://gitlab.com/grate-driver/re-crypt.git |
| 55 | $ cd re-crypt # place your u-boot-dtb-tegra.bin here |
| 56 | $ ./re-crypt.py --dev grouper --sbk <your sbk> |
| 57 | |
| 58 | where SBK has next form ``0xXXXXXXXX`` ``0xXXXXXXXX`` ``0xXXXXXXXX`` ``0xXXXXXXXX`` |
| 59 | |
| 60 | The script will produce a ``repart-block.bin`` ready to flash. |
| 61 | |
| 62 | Processing for pre-loaded U-Boot |
| 63 | ******************************** |
| 64 | |
| 65 | The procedure is the same, but the ``--split`` argument is used with the |
| 66 | ``re-crypt.py``. The script will produce ``bct.img`` and ``ebt.img`` ready |
| 67 | to flash. |
| 68 | |
| 69 | Flashing U-Boot into the eMMC |
| 70 | ----------------------------- |
| 71 | |
| 72 | ``DISCLAMER!`` All questions related to NvFlash should be asked in the proper |
| 73 | place. NOT HERE! Flashing U-Boot will erase all eMMC, so make a backup before! |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 74 | |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 75 | Permanent installation can be performed either by using the nv3p protocol or by |
| 76 | pre-loading just built U-Boot into RAM. |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 77 | |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 78 | Flashing with the NV3P protocol |
| 79 | ******************************* |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 80 | |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 81 | Nv3p is a custom Nvidia protocol used to recover bricked devices. Devices can |
| 82 | enter it either by using ``wheelie`` with the correct ``blob.bin`` file or by |
| 83 | pre-loading vendor bootloader with the Fusée Gelée. |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 84 | |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 85 | With nv3p, ``repart-block.bin`` is used. It contains BCT and a bootloader in |
| 86 | encrypted state in form, which can just be written RAW at the start of eMMC. |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 87 | |
| 88 | .. code-block:: bash |
| 89 | |
| 90 | $ wheelie --blob blob.bin |
| 91 | $ nvflash --resume --rawdevicewrite 0 1024 repart-block.bin |
| 92 | |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 93 | When flashing is done, reboot the device. |
| 94 | |
| 95 | Flashing with a pre-loaded U-Boot |
| 96 | ********************************* |
| 97 | |
| 98 | U-Boot pre-loaded into RAM acts the same as when it was booted "cold". Currently |
| 99 | U-Boot supports bootmenu entry fastboot, which allows to write a processed copy |
| 100 | of U-Boot permanently into eMMC. |
| 101 | |
| 102 | While pre-loading U-Boot, hold the ``volume down`` button which will trigger |
| 103 | the bootmenu. There, select ``fastboot`` using the volume and power buttons. |
| 104 | After, on host PC, do: |
| 105 | |
| 106 | .. code-block:: bash |
| 107 | |
| 108 | $ fastboot flash 0.1 bct.img |
| 109 | $ fastboot flash 0.2 ebt.img |
| 110 | $ fastboot reboot |
| 111 | |
| 112 | Device will reboot. |
| 113 | |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 114 | Boot |
| 115 | ---- |
| 116 | |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 117 | To boot Linux, U-Boot will look for an ``extlinux.conf`` on eMMC. Additionally, |
| 118 | if the Volume Down button is pressed while booting, the device will enter |
| 119 | bootmenu. Bootmenu contains entries to mount eMMC as mass storage, fastboot, |
| 120 | reboot, reboot RCM, poweroff, enter U-Boot console and update bootloader (check |
| 121 | the next chapter). |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 122 | |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 123 | Flashing ``repart-block.bin`` eliminates vendor restrictions on eMMC and allows |
| 124 | the user to use/partition it in any way the user desires. |
Svyatoslav Ryhel | 88fd156 | 2023-06-30 10:29:04 +0300 | [diff] [blame] | 125 | |
| 126 | Self Upgrading |
| 127 | -------------- |
| 128 | |
Svyatoslav Ryhel | c893197 | 2023-12-24 10:16:34 +0200 | [diff] [blame] | 129 | Place your ``u-boot-dtb-tegra.bin`` on the first partition of the eMMC (using |
| 130 | ability of u-boot to mount it). Enter bootmenu, choose update bootloader option |
| 131 | with Power button and U-Boot should update itself. Once the process is |
| 132 | completed, U-Boot will ask to press any button to reboot. |