Svyatoslav Ryhel | fcb1d91 | 2023-06-30 10:29:05 +0300 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | U-Boot for the LG X3 T30 device family |
| 4 | ====================================== |
| 5 | |
| 6 | ``DISCLAMER!`` Moving your LG P880 or P895 to use U-Boot |
| 7 | assumes replacement of the vendor LG bootloader. Vendor |
| 8 | android firmwares will no longer be able to run on the |
| 9 | device. This replacement IS reversible. |
| 10 | |
| 11 | Quick 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 | |
| 20 | Build U-Boot |
| 21 | ------------ |
| 22 | |
| 23 | Device support is implemented by applying config fragment to a generic |
| 24 | board 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 | |
| 32 | After the build succeeds, you will obtain the final ``u-boot-dtb-tegra.bin`` |
| 33 | image, ready for flashing (but check the next section for additional |
| 34 | adjustments). |
| 35 | |
| 36 | Pack U-Boot into repar-block |
| 37 | ---------------------------- |
| 38 | |
| 39 | ``DISCLAMER!`` All questions related to re-crypt work should be |
| 40 | asked in re-crypt repo issues. NOT HERE! |
| 41 | |
| 42 | re-crypt is a small script which packs ``u-boot-dtb-tegra.bin`` in |
| 43 | form usable by device. This process is required only on the first |
| 44 | installation 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 | |
| 52 | Script will produce you a ``repart-block.bin`` ready to flash. |
| 53 | |
| 54 | Flash repart-block into the eMMC |
| 55 | -------------------------------- |
| 56 | |
| 57 | ``DISCLAMER!`` All questions related to NvFlash should be asked |
| 58 | in the proper place. NOT HERE! Flashing repart-block will erase |
| 59 | all your eMMC, so make a backup before! |
| 60 | |
| 61 | ``repart-block.bin`` contains BCT and bootloader in encrypted state |
| 62 | in 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 | |
| 69 | Boot |
| 70 | ---- |
| 71 | |
| 72 | After flashing ``repart-block.bin`` the device should reboot and turn |
| 73 | itself off. This is normal behavior if no boot configuration is |
| 74 | found. |
| 75 | |
| 76 | To boot Linux, U-Boot will look for an ``extlinux.conf`` on MicroSD |
| 77 | and then on eMMC. Additionally if Volume Down button is pressed |
| 78 | while booting device will enter bootmenu. Bootmenu contains entries |
| 79 | to mount MicroSD and eMMC as mass storage, fastboot, reboot, reboot |
| 80 | RCM, poweroff, enter U-Boot console and update bootloader (check next |
| 81 | chapter). |
| 82 | |
| 83 | Flashing ``repart-block.bin`` eliminates vendor restriction on eMMC |
| 84 | and allows the user to use/partition it in any way the user desires. |
| 85 | |
| 86 | Self Upgrading |
| 87 | -------------- |
| 88 | |
| 89 | Place your ``u-boot-dtb-tegra.bin`` on the first partition of the |
| 90 | eMMC (using ability of u-boot to mount it). Enter bootmenu, choose |
| 91 | update bootloader option with Power button and U-Boot should update |
| 92 | itself. Once the process is completed, U-Boot will ask to press any |
| 93 | button to reboot. |