blob: 47a854e916379b925a3bc092f5800897790c04ff [file] [log] [blame]
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +03001.. SPDX-License-Identifier: GPL-2.0+
2
3U-Boot for the ASUS/Google Nexus 7 (2012)
4=========================================
5
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +02006``DISCLAMER!`` Moving your ASUS/Google Nexus 7 (2012) to use U-Boot assumes
7replacement of the vendor ASUS bootloader. Vendor android firmwares will no
8longer be able to run on the device. This replacement IS reversible.
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +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
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030016- Boot
17- Self Upgrading
18
19Build U-Boot
20------------
21
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020022Device support is implemented by applying config fragment to a generic board
23defconfig. Valid fragments are ``tilapia.config``, ``grouper_E1565.config``
24and ``grouper_PM269.config``.
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030025
26.. code-block:: bash
27
28 $ export CROSS_COMPILE=arm-linux-gnueabi-
29 $ make grouper_common_defconfig grouper_E1565.config # For maxim based grouper
30 $ make
31
32After the build succeeds, you will obtain the final ``u-boot-dtb-tegra.bin``
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020033image, ready for further processing.
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030034
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020035Process U-Boot
36--------------
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030037
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020038``DISCLAMER!`` All questions related to the re-crypt work should be asked
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030039in re-crypt repo issues. NOT HERE!
40
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020041re-crypt is a tool that processes the ``u-boot-dtb-tegra.bin`` binary into form
42usable by device. This process is required only on the first installation or
43to recover the device in case of a failed update. You need to know your
44tablet's individual SBK to continue.
45
46Permanent installation can be performed either by using the nv3p protocol or by
47pre-loading just built U-Boot into RAM.
48
49Processing for the NV3P protocol
50********************************
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030051
52.. code-block:: bash
53
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020054 $ 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
58where SBK has next form ``0xXXXXXXXX`` ``0xXXXXXXXX`` ``0xXXXXXXXX`` ``0xXXXXXXXX``
59
60The script will produce a ``repart-block.bin`` ready to flash.
61
62Processing for pre-loaded U-Boot
63********************************
64
65The 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
67to flash.
68
69Flashing U-Boot into the eMMC
70-----------------------------
71
72``DISCLAMER!`` All questions related to NvFlash should be asked in the proper
73place. NOT HERE! Flashing U-Boot will erase all eMMC, so make a backup before!
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030074
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020075Permanent installation can be performed either by using the nv3p protocol or by
76pre-loading just built U-Boot into RAM.
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030077
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020078Flashing with the NV3P protocol
79*******************************
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030080
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020081Nv3p is a custom Nvidia protocol used to recover bricked devices. Devices can
82enter it either by using ``wheelie`` with the correct ``blob.bin`` file or by
83pre-loading vendor bootloader with the Fusée Gelée.
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030084
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020085With nv3p, ``repart-block.bin`` is used. It contains BCT and a bootloader in
86encrypted state in form, which can just be written RAW at the start of eMMC.
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030087
88.. code-block:: bash
89
90 $ wheelie --blob blob.bin
91 $ nvflash --resume --rawdevicewrite 0 1024 repart-block.bin
92
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +020093When flashing is done, reboot the device.
94
95Flashing with a pre-loaded U-Boot
96*********************************
97
98U-Boot pre-loaded into RAM acts the same as when it was booted "cold". Currently
99U-Boot supports bootmenu entry fastboot, which allows to write a processed copy
100of U-Boot permanently into eMMC.
101
102While pre-loading U-Boot, hold the ``volume down`` button which will trigger
103the bootmenu. There, select ``fastboot`` using the volume and power buttons.
104After, 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
112Device will reboot.
113
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +0300114Boot
115----
116
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +0200117To boot Linux, U-Boot will look for an ``extlinux.conf`` on eMMC. Additionally,
118if the Volume Down button is pressed while booting, the device will enter
119bootmenu. Bootmenu contains entries to mount eMMC as mass storage, fastboot,
120reboot, reboot RCM, poweroff, enter U-Boot console and update bootloader (check
121the next chapter).
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +0300122
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +0200123Flashing ``repart-block.bin`` eliminates vendor restrictions on eMMC and allows
124the user to use/partition it in any way the user desires.
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +0300125
126Self Upgrading
127--------------
128
Svyatoslav Ryhelc8931972023-12-24 10:16:34 +0200129Place your ``u-boot-dtb-tegra.bin`` on the first partition of the eMMC (using
130ability of u-boot to mount it). Enter bootmenu, choose update bootloader option
131with Power button and U-Boot should update itself. Once the process is
132completed, U-Boot will ask to press any button to reboot.