Chris Morgan | 8c4e304 | 2023-04-21 10:59:19 -0500 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | U-Boot for Anbernic RGxx3 Devices |
| 4 | ================================= |
| 5 | |
| 6 | This allows U-Boot to boot the following Anbernic devices: |
| 7 | |
| 8 | - Anbernic RG353M |
| 9 | - Anbernic RG353P |
| 10 | - Anbernic RG353V |
| 11 | - Anbernic RG353VS |
| 12 | - Anbernic RG503 |
| 13 | |
| 14 | The correct device is detected automatically by comparing ADC values |
| 15 | from ADC channel 1. In the event of an RG353V, an attempt is then made |
| 16 | to probe for an eMMC and if it fails the device is assumed to be an |
| 17 | RG353VS. Based on the detected device, the environment variables |
| 18 | "board", "board_name", and "fdtfile" are set to the correct values |
| 19 | corresponding to the board which can be read by a boot script to boot |
| 20 | with the correct device tree. |
| 21 | |
| 22 | Please note that there are some versions of the RG353 devices with |
| 23 | different panels. Panel auto-detection is planned for a later date. |
| 24 | |
| 25 | Building U-Boot |
| 26 | --------------- |
| 27 | |
| 28 | .. code-block:: bash |
| 29 | |
| 30 | $ export CROSS_COMPILE=aarch64-none-elf- |
| 31 | $ export BL31=../rkbin/bin/rk35/rk3568_bl31_v1.34.elf |
| 32 | $ export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3568_ddr_1056MHz_v1.13.bin |
| 33 | $ make anbernic-rgxx3_defconfig |
| 34 | $ make |
| 35 | |
| 36 | This will build ``u-boot-rockchip.bin`` which can be written to an SD |
| 37 | card. |
| 38 | |
| 39 | Image installation |
| 40 | ------------------ |
| 41 | |
| 42 | Write the ``u-boot-rockchip.bin`` to an SD card offset 32kb from the |
| 43 | start. |
| 44 | |
| 45 | .. code-block:: bash |
| 46 | |
| 47 | $ dd if=u-boot-rockchip.bin of=/dev/mmcblk0 bs=512 seek=64 |