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