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