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