blob: ff9792dc0fc5dc7fba8c0f6122b5d365b7dd3174 [file] [log] [blame]
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +03001.. SPDX-License-Identifier: GPL-2.0+
2
3U-Boot for the ASUS Transformer device family
4=============================================
5
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +02006``DISCLAMER!`` Moving your ASUS Transformer to use U-Boot assumes replacement
7of the vendor ASUS bootloader. Vendor Android firmwares will no longer be
8able to run on the device. This replacement IS reversible.
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +03009
10Quick Start
11-----------
12
13- Build U-Boot
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020014- Process U-Boot
15- Flashing U-Boot into the eMMC
16- Flashing U-Boot into the SPI flash
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +030017- Boot
18- Self Upgrading
19
20Build U-Boot
21------------
22
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020023Device support is implemented by applying a config fragment to a generic board
24defconfig. Valid fragments are ``tf201.config``, ``tf300t.config``,
25``tf300tg.config``, ``tf300tl.config``, ``tf700t.config``, ``tf600t.config`` and
26``p1801-t.config``.
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +030027
28.. code-block:: bash
29
30 $ export CROSS_COMPILE=arm-linux-gnueabi-
31 $ make transformer_t30_defconfig tf201.config # For TF201
32 $ make
33
34After the build succeeds, you will obtain the final ``u-boot-dtb-tegra.bin``
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020035image, ready for further processing.
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +030036
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020037Process U-Boot
38--------------
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +030039
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020040``DISCLAMER!`` All questions related to the re-crypt work should be asked
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +030041in re-crypt repo issues. NOT HERE!
42
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020043re-crypt is a tool that processes the ``u-boot-dtb-tegra.bin`` binary into form
44usable by device. This process is required only on the first installation or
45to recover the device in case of a failed update. You need to know your
46tablet's individual SBK to continue.
47
48Permanent installation can be performed either by using the nv3p protocol or by
49pre-loading just built U-Boot into RAM.
50
51Processing for the NV3P protocol
52********************************
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +030053
54.. code-block:: bash
55
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020056 $ git clone https://gitlab.com/grate-driver/re-crypt.git
57 $ cd re-crypt # place your u-boot-dtb-tegra.bin here
58 $ ./re-crypt.py --dev tf201 --sbk <your sbk>
59
60where SBK has next form ``0xXXXXXXXX`` ``0xXXXXXXXX`` ``0xXXXXXXXX`` ``0xXXXXXXXX``
61
62The script will produce a ``repart-block.bin`` ready to flash.
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +030063
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020064Processing for pre-loaded U-Boot
65********************************
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +030066
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020067The procedure is the same, but the ``--split`` argument is used with the
68``re-crypt.py``. The script will produce ``bct.img`` and ``ebt.img`` ready
69to flash.
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +030070
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020071Flashing U-Boot into the eMMC
72-----------------------------
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +030073
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020074``DISCLAMER!`` All questions related to NvFlash should be asked in the proper
75place. NOT HERE! Flashing U-Boot will erase all eMMC, so make a backup before!
76
77Permanent installation can be performed either by using the nv3p protocol or by
78pre-loading just built U-Boot into RAM.
79
80Flashing with the NV3P protocol
81*******************************
82
83Nv3p is a custom Nvidia protocol used to recover bricked devices. Devices can
84enter it either by using ``wheelie`` with the correct ``blob.bin`` file or by
85pre-loading vendor bootloader with the Fusée Gelée.
86
87With nv3p, ``repart-block.bin`` is used. It contains BCT and a bootloader in
88encrypted state in form, which can just be written RAW at the start of eMMC.
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +030089
90.. code-block:: bash
91
92 $ wheelie --blob blob.bin
93 $ nvflash --resume --rawdevicewrite 0 1024 repart-block.bin
94
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020095When flashing is done, reboot the device.
96
97Flashing with a pre-loaded U-Boot
98*********************************
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +030099
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +0200100U-Boot pre-loaded into RAM acts the same as when it was booted "cold". Currently
101U-Boot supports bootmenu entry fastboot, which allows to write a processed copy
102of U-Boot permanently into eMMC.
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +0300103
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +0200104While pre-loading U-Boot, hold the ``volume down`` button which will trigger
105the bootmenu. There, select ``fastboot`` using the volume and power buttons.
106After, on host PC, do:
107
108.. code-block:: bash
109
110 $ fastboot flash 0.1 bct.img
111 $ fastboot flash 0.2 ebt.img
112 $ fastboot reboot
113
114Device will reboot.
115
116Flashing U-Boot into the SPI Flash
117----------------------------------
118
119Some of Transformers use a separate 4 MB SPI flash, which contains all data
120required for boot. It is flashed from within U-Boot itself, preloaded into RAM
121using Fusée Gelée.
122
123After creating your ``repart-block.bin`` you have to place it on a 1st partition
124of microSD card formated in fat. Then insert this microSD card into your tablet
125and boot it using Fusée Gelée and U-Boot, which was included into
126``repart-block.bin``, while booting you must hold the ``volume down`` button.
127
128The process should take less than a minute, if everything goes correctly,
129on microSD will appear ``spi-flash-backup.bin`` file, which is the dump of your
130SPI Flash content and can be used to restore UEFI, do not lose it, tablet will
131power itself off.
132
133Self-updating of U-Boot is performed by placing ``u-boot-dtb-tegra.bin`` on 1st
134partition of microSD, inserting it into the tablet and booting with a pressed
135``volume down`` button.
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +0300136
137Boot
138----
139
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +0200140To boot Linux, U-Boot will look for an ``extlinux.conf`` on MicroSD and then on
141eMMC. Additionally, if the Volume Down button is pressed while booting, the
142device will enter bootmenu. Bootmenu contains entries to mount MicroSD and eMMC
143as mass storage, fastboot, reboot, reboot RCM, poweroff, enter U-Boot console
144and update bootloader (check the next chapter).
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +0300145
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +0200146Flashing ``repart-block.bin`` eliminates vendor restrictions on eMMC and allows
147the user to use/partition it in any way the user desires.
Svyatoslav Ryhel7a25c382023-06-30 10:29:03 +0300148
149Self Upgrading
150--------------
151
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +0200152Place your ``u-boot-dtb-tegra.bin`` on the first partition of the MicroSD card
153and insert it into the tablet. Enter bootmenu, choose update the bootloader
154option with the Power button and U-Boot should update itself. Once the process
155is completed, U-Boot will ask to press any button to reboot.