Svyatoslav Ryhel | 4c5fe37 | 2023-06-30 10:29:06 +0300 | [diff] [blame^] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | U-Boot for the HTC One X (endeavoru) |
| 4 | ==================================== |
| 5 | |
| 6 | ``DISCLAMER!`` Moving your HTC ONe X to use U-Boot assumes |
| 7 | replacement of the vendor hboot. Vendor android firmwares |
| 8 | will no longer be able to run on the device. |
| 9 | 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 | .. code-block:: bash |
| 24 | |
| 25 | $ export CROSS_COMPILE=arm-linux-gnueabi- |
| 26 | $ make endeavoru_defconfig |
| 27 | $ make |
| 28 | |
| 29 | After the build succeeds, you will obtain the final ``u-boot-dtb-tegra.bin`` |
| 30 | image, ready for flashing (but check the next section for additional |
| 31 | adjustments). |
| 32 | |
| 33 | Pack U-Boot into repar-block |
| 34 | ---------------------------- |
| 35 | |
| 36 | ``DISCLAMER!`` All questions related to re-crypt work should be |
| 37 | asked in re-crypt repo issues. NOT HERE! |
| 38 | |
| 39 | re-crypt is a small script which packs ``u-boot-dtb-tegra.bin`` in |
| 40 | form usable by device. This process is required only on the first |
| 41 | installation or to recover the device in case of a failed update. |
| 42 | |
| 43 | .. code-block:: bash |
| 44 | |
| 45 | $ git clone https://github.com/clamor-s/re-crypt.git |
| 46 | $ cd re-crypt # place your u-boot-dtb-regra.bin here |
| 47 | $ ./re-crypt.sh -d endeavoru |
| 48 | |
| 49 | Script will produce you a ``repart-block.bin`` ready to flash. |
| 50 | |
| 51 | Flash repart-block into the eMMC |
| 52 | -------------------------------- |
| 53 | |
| 54 | ``DISCLAMER!`` All questions related to NvFlash should be asked |
| 55 | in the proper place. NOT HERE! Flashing repart-block will erase |
| 56 | all your eMMC, so make a backup before! |
| 57 | |
| 58 | ``repart-block.bin`` contains BCT and bootloader in encrypted state |
| 59 | in form which can just be written RAW at the start of eMMC. |
| 60 | |
| 61 | .. code-block:: bash |
| 62 | |
| 63 | $ wheelie --blob blob.bin |
| 64 | $ nvflash --resume --rawdevicewrite 0 1024 repart-block.bin |
| 65 | |
| 66 | Boot |
| 67 | ---- |
| 68 | |
| 69 | After flashing ``repart-block.bin`` the device should reboot and turn |
| 70 | itself off. This is normal behavior if no boot configuration is |
| 71 | found. |
| 72 | |
| 73 | To boot Linux, U-Boot will look for an ``extlinux.conf`` configuration |
| 74 | on eMMC. Additionally if Volume Down button is pressed while booting |
| 75 | device will enter bootmenu. Bootmenu contains entries to mount eMMC as |
| 76 | mass storage, fastboot, reboot, reboot RCM, poweroff, enter U-Boot |
| 77 | console and update bootloader (check next chapter). |
| 78 | |
| 79 | Flashing ``repart-block.bin`` eliminates vendor restriction on eMMC |
| 80 | and allows the user to use/partition it in any way the user desires. |
| 81 | |
| 82 | Self Upgrading |
| 83 | -------------- |
| 84 | |
| 85 | Place your ``u-boot-dtb-tegra.bin`` on the first partition of the |
| 86 | eMMC (using ability of u-boot to mount it). Enter bootmenu, choose |
| 87 | update bootloader option with Power button and U-Boot should update |
| 88 | itself. Once the process is completed, U-Boot will ask to press any |
| 89 | button to reboot. |