From 1c1608e0c7afadb926032a0a649f373ce134c06b Mon Sep 17 00:00:00 2001 From: Svyatoslav Ryhel Date: Thu, 1 Aug 2024 16:42:24 +0300 Subject: board: asus: grouper: implement multi-DTB support Use board revision detection mechanism to choose correct DTB. Adjust documentation and build setup accordingly. Signed-off-by: Svyatoslav Ryhel --- doc/board/asus/grouper.rst | 132 ++++++++++++++++++++++++++++++++++++++ doc/board/asus/grouper_common.rst | 132 -------------------------------------- doc/board/asus/index.rst | 2 +- 3 files changed, 133 insertions(+), 133 deletions(-) create mode 100644 doc/board/asus/grouper.rst delete mode 100644 doc/board/asus/grouper_common.rst (limited to 'doc') diff --git a/doc/board/asus/grouper.rst b/doc/board/asus/grouper.rst new file mode 100644 index 00000000000..d56a9ca3921 --- /dev/null +++ b/doc/board/asus/grouper.rst @@ -0,0 +1,132 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +U-Boot for the ASUS/Google Nexus 7 (2012) +========================================= + +``DISCLAMER!`` Moving your ASUS/Google Nexus 7 (2012) to use U-Boot assumes +replacement of the vendor ASUS bootloader. Vendor android firmwares will no +longer be able to run on the device. This replacement IS reversible. + +Quick Start +----------- + +- Build U-Boot +- Process U-Boot +- Flashing U-Boot into the eMMC +- Boot +- Self Upgrading + +Build U-Boot +------------ + +U-Boot features ability to detect grouper board revision on which it is +loaded. Currently are supported both TI and MAXIM based WiFi-only models +along with cellular one. + +.. code-block:: bash + + $ export CROSS_COMPILE=arm-linux-gnueabi- + $ make grouper_defconfig # For all grouper versions and tilapia + $ make + +After the build succeeds, you will obtain the final ``u-boot-dtb-tegra.bin`` +image, ready for further processing. + +Process U-Boot +-------------- + +``DISCLAMER!`` All questions related to the re-crypt work should be asked +in re-crypt repo issues. NOT HERE! + +re-crypt is a tool that processes the ``u-boot-dtb-tegra.bin`` binary into form +usable by device. This process is required only on the first installation or +to recover the device in case of a failed update. You need to know your +tablet's individual SBK to continue. + +Permanent installation can be performed either by using the nv3p protocol or by +pre-loading just built U-Boot into RAM. + +Processing for the NV3P protocol +******************************** + +.. code-block:: bash + + $ git clone https://gitlab.com/grate-driver/re-crypt.git + $ cd re-crypt # place your u-boot-dtb-tegra.bin here + $ ./re-crypt.py --dev grouper --sbk + +where SBK has next form ``0xXXXXXXXX`` ``0xXXXXXXXX`` ``0xXXXXXXXX`` ``0xXXXXXXXX`` + +The script will produce a ``repart-block.bin`` ready to flash. + +Processing for pre-loaded U-Boot +******************************** + +The procedure is the same, but the ``--split`` argument is used with the +``re-crypt.py``. The script will produce ``bct.img`` and ``ebt.img`` ready +to flash. + +Flashing U-Boot into the eMMC +----------------------------- + +``DISCLAMER!`` All questions related to NvFlash should be asked in the proper +place. NOT HERE! Flashing U-Boot will erase all eMMC, so make a backup before! + +Permanent installation can be performed either by using the nv3p protocol or by +pre-loading just built U-Boot into RAM. + +Flashing with the NV3P protocol +******************************* + +Nv3p is a custom Nvidia protocol used to recover bricked devices. Devices can +enter it either by using ``wheelie`` with the correct ``blob.bin`` file or by +pre-loading vendor bootloader with the Fusée Gelée. + +With nv3p, ``repart-block.bin`` is used. It contains BCT and a bootloader in +encrypted state in form, which can just be written RAW at the start of eMMC. + +.. code-block:: bash + + $ wheelie --blob blob.bin + $ nvflash --resume --rawdevicewrite 0 1024 repart-block.bin + +When flashing is done, reboot the device. + +Flashing with a pre-loaded U-Boot +********************************* + +U-Boot pre-loaded into RAM acts the same as when it was booted "cold". Currently +U-Boot supports bootmenu entry fastboot, which allows to write a processed copy +of U-Boot permanently into eMMC. + +While pre-loading U-Boot, hold the ``volume down`` button which will trigger +the bootmenu. There, select ``fastboot`` using the volume and power buttons. +After, on host PC, do: + +.. code-block:: bash + + $ fastboot flash 0.1 bct.img + $ fastboot flash 0.2 ebt.img + $ fastboot reboot + +Device will reboot. + +Boot +---- + +To boot Linux, U-Boot will look for an ``extlinux.conf`` on eMMC. Additionally, +if the Volume Down button is pressed while booting, the device will enter +bootmenu. Bootmenu contains entries to mount eMMC as mass storage, fastboot, +reboot, reboot RCM, poweroff, enter U-Boot console and update bootloader (check +the next chapter). + +Flashing ``repart-block.bin`` eliminates vendor restrictions on eMMC and allows +the user to use/partition it in any way the user desires. + +Self Upgrading +-------------- + +Place your ``u-boot-dtb-tegra.bin`` on the first partition of the eMMC (using +ability of u-boot to mount it). Enter bootmenu, choose update bootloader option +with Power button and U-Boot should update itself. Once the process is +completed, U-Boot will ask to press any button to reboot. diff --git a/doc/board/asus/grouper_common.rst b/doc/board/asus/grouper_common.rst deleted file mode 100644 index 47a854e9163..00000000000 --- a/doc/board/asus/grouper_common.rst +++ /dev/null @@ -1,132 +0,0 @@ -.. SPDX-License-Identifier: GPL-2.0+ - -U-Boot for the ASUS/Google Nexus 7 (2012) -========================================= - -``DISCLAMER!`` Moving your ASUS/Google Nexus 7 (2012) to use U-Boot assumes -replacement of the vendor ASUS bootloader. Vendor android firmwares will no -longer be able to run on the device. This replacement IS reversible. - -Quick Start ------------ - -- Build U-Boot -- Process U-Boot -- Flashing U-Boot into the eMMC -- Boot -- Self Upgrading - -Build U-Boot ------------- - -Device support is implemented by applying config fragment to a generic board -defconfig. Valid fragments are ``tilapia.config``, ``grouper_E1565.config`` -and ``grouper_PM269.config``. - -.. code-block:: bash - - $ export CROSS_COMPILE=arm-linux-gnueabi- - $ make grouper_common_defconfig grouper_E1565.config # For maxim based grouper - $ make - -After the build succeeds, you will obtain the final ``u-boot-dtb-tegra.bin`` -image, ready for further processing. - -Process U-Boot --------------- - -``DISCLAMER!`` All questions related to the re-crypt work should be asked -in re-crypt repo issues. NOT HERE! - -re-crypt is a tool that processes the ``u-boot-dtb-tegra.bin`` binary into form -usable by device. This process is required only on the first installation or -to recover the device in case of a failed update. You need to know your -tablet's individual SBK to continue. - -Permanent installation can be performed either by using the nv3p protocol or by -pre-loading just built U-Boot into RAM. - -Processing for the NV3P protocol -******************************** - -.. code-block:: bash - - $ git clone https://gitlab.com/grate-driver/re-crypt.git - $ cd re-crypt # place your u-boot-dtb-tegra.bin here - $ ./re-crypt.py --dev grouper --sbk - -where SBK has next form ``0xXXXXXXXX`` ``0xXXXXXXXX`` ``0xXXXXXXXX`` ``0xXXXXXXXX`` - -The script will produce a ``repart-block.bin`` ready to flash. - -Processing for pre-loaded U-Boot -******************************** - -The procedure is the same, but the ``--split`` argument is used with the -``re-crypt.py``. The script will produce ``bct.img`` and ``ebt.img`` ready -to flash. - -Flashing U-Boot into the eMMC ------------------------------ - -``DISCLAMER!`` All questions related to NvFlash should be asked in the proper -place. NOT HERE! Flashing U-Boot will erase all eMMC, so make a backup before! - -Permanent installation can be performed either by using the nv3p protocol or by -pre-loading just built U-Boot into RAM. - -Flashing with the NV3P protocol -******************************* - -Nv3p is a custom Nvidia protocol used to recover bricked devices. Devices can -enter it either by using ``wheelie`` with the correct ``blob.bin`` file or by -pre-loading vendor bootloader with the Fusée Gelée. - -With nv3p, ``repart-block.bin`` is used. It contains BCT and a bootloader in -encrypted state in form, which can just be written RAW at the start of eMMC. - -.. code-block:: bash - - $ wheelie --blob blob.bin - $ nvflash --resume --rawdevicewrite 0 1024 repart-block.bin - -When flashing is done, reboot the device. - -Flashing with a pre-loaded U-Boot -********************************* - -U-Boot pre-loaded into RAM acts the same as when it was booted "cold". Currently -U-Boot supports bootmenu entry fastboot, which allows to write a processed copy -of U-Boot permanently into eMMC. - -While pre-loading U-Boot, hold the ``volume down`` button which will trigger -the bootmenu. There, select ``fastboot`` using the volume and power buttons. -After, on host PC, do: - -.. code-block:: bash - - $ fastboot flash 0.1 bct.img - $ fastboot flash 0.2 ebt.img - $ fastboot reboot - -Device will reboot. - -Boot ----- - -To boot Linux, U-Boot will look for an ``extlinux.conf`` on eMMC. Additionally, -if the Volume Down button is pressed while booting, the device will enter -bootmenu. Bootmenu contains entries to mount eMMC as mass storage, fastboot, -reboot, reboot RCM, poweroff, enter U-Boot console and update bootloader (check -the next chapter). - -Flashing ``repart-block.bin`` eliminates vendor restrictions on eMMC and allows -the user to use/partition it in any way the user desires. - -Self Upgrading --------------- - -Place your ``u-boot-dtb-tegra.bin`` on the first partition of the eMMC (using -ability of u-boot to mount it). Enter bootmenu, choose update bootloader option -with Power button and U-Boot should update itself. Once the process is -completed, U-Boot will ask to press any button to reboot. diff --git a/doc/board/asus/index.rst b/doc/board/asus/index.rst index 2b103287905..2cac04ce04a 100644 --- a/doc/board/asus/index.rst +++ b/doc/board/asus/index.rst @@ -6,6 +6,6 @@ ASUS .. toctree:: :maxdepth: 2 - grouper_common + grouper transformer_t20 transformer_t30 -- cgit v1.2.3 From 8768ade2b5cd2c39a55832322a0aabf2145fb24d Mon Sep 17 00:00:00 2001 From: Svyatoslav Ryhel Date: Thu, 1 Aug 2024 16:50:41 +0300 Subject: board: asus: transformer: implement multi-DTB support Use board revision detection mechanism to choose correct DTB. Adjust documentation and build setup accordingly. Signed-off-by: Svyatoslav Ryhel --- doc/board/asus/transformer_t30.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/board/asus/transformer_t30.rst b/doc/board/asus/transformer_t30.rst index ff9792dc0fc..bebc4b9fad3 100644 --- a/doc/board/asus/transformer_t30.rst +++ b/doc/board/asus/transformer_t30.rst @@ -20,15 +20,18 @@ Quick Start Build U-Boot ------------ -Device support is implemented by applying a config fragment to a generic board -defconfig. Valid fragments are ``tf201.config``, ``tf300t.config``, -``tf300tg.config``, ``tf300tl.config``, ``tf700t.config``, ``tf600t.config`` and -``p1801-t.config``. +U-Boot features ability to detect transformer device model on which it is +loaded. The list of supported devices include: +- ASUS Transformer Prime TF201 +- ASUS Transformer Pad (3G/LTE) TF300T/TG/TL +- ASUS Transformer Infinity TF700T +- ASUS Portable AiO P1801-T +- ASUS VivoTab RT TF600T .. code-block:: bash $ export CROSS_COMPILE=arm-linux-gnueabi- - $ make transformer_t30_defconfig tf201.config # For TF201 + $ make transformer_t30_defconfig $ make After the build succeeds, you will obtain the final ``u-boot-dtb-tegra.bin`` -- cgit v1.2.3