blob: 5c564aabc6a4d64cfe6426469fc37415ae29bf6f [file] [log] [blame]
Svyatoslav Ryhelfcb1d912023-06-30 10:29:05 +03001.. SPDX-License-Identifier: GPL-2.0+
2
3U-Boot for the LG X3 T30 device family
4======================================
5
6``DISCLAMER!`` Moving your LG P880 or P895 to use U-Boot
7assumes replacement of the vendor LG bootloader. Vendor
8android firmwares will no longer be able to run on the
9device. This replacement IS reversible.
10
11Quick Start
12-----------
13
14- Build U-Boot
15- Pack U-Boot into repart-block
16- Flash repart-block into the eMMC
17- Boot
18- Self Upgrading
19
20Build U-Boot
21------------
22
23Device support is implemented by applying config fragment to a generic
24board defconfig. Valid fragments are ``p880.config`` and ``p895.config``.
25
26.. code-block:: bash
27
28 $ export CROSS_COMPILE=arm-linux-gnueabi-
29 $ make x3_t30_defconfig p895.config # For LG Optimus Vu
30 $ make
31
32After the build succeeds, you will obtain the final ``u-boot-dtb-tegra.bin``
33image, ready for flashing (but check the next section for additional
34adjustments).
35
36Pack U-Boot into repar-block
37----------------------------
38
39``DISCLAMER!`` All questions related to re-crypt work should be
40asked in re-crypt repo issues. NOT HERE!
41
42re-crypt is a small script which packs ``u-boot-dtb-tegra.bin`` in
43form usable by device. This process is required only on the first
44installation or to recover the device in case of a failed update.
45
46.. code-block:: bash
47
48 $ git clone https://github.com/clamor-s/re-crypt.git
49 $ cd re-crypt # place your u-boot-dtb-regra.bin here
50 $ ./re-crypt.sh -d p895
51
52Script will produce you a ``repart-block.bin`` ready to flash.
53
54Flash repart-block into the eMMC
55--------------------------------
56
57``DISCLAMER!`` All questions related to NvFlash should be asked
58in the proper place. NOT HERE! Flashing repart-block will erase
59all your eMMC, so make a backup before!
60
61``repart-block.bin`` contains BCT and bootloader in encrypted state
62in form which can just be written RAW at the start of eMMC.
63
64.. code-block:: bash
65
66 $ wheelie --blob blob.bin
67 $ nvflash --resume --rawdevicewrite 0 1024 repart-block.bin
68
69Boot
70----
71
72After flashing ``repart-block.bin`` the device should reboot and turn
73itself off. This is normal behavior if no boot configuration is
74found.
75
76To boot Linux, U-Boot will look for an ``extlinux.conf`` on MicroSD
77and then on eMMC. Additionally if Volume Down button is pressed
78while booting device will enter bootmenu. Bootmenu contains entries
79to mount MicroSD and eMMC as mass storage, fastboot, reboot, reboot
80RCM, poweroff, enter U-Boot console and update bootloader (check next
81chapter).
82
83Flashing ``repart-block.bin`` eliminates vendor restriction on eMMC
84and allows the user to use/partition it in any way the user desires.
85
86Self Upgrading
87--------------
88
89Place your ``u-boot-dtb-tegra.bin`` on the first partition of the
90eMMC (using ability of u-boot to mount it). Enter bootmenu, choose
91update bootloader option with Power button and U-Boot should update
92itself. Once the process is completed, U-Boot will ask to press any
93button to reboot.