radxa-zero2.rst 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. U-Boot for Radxa Zero2 (A311D)
  3. ==============================
  4. Radxa Zero2 is a small form factor SBC based on the Amlogic A311D chipset with the
  5. following specification:
  6. - Amlogic A311D (Quad A73 + Dual A53) CPU
  7. - 4GB LPDDR4 RAM
  8. - 32/64/128GB eMMC
  9. - Mali G52-MP4 GPU
  10. - HDMI 2.1 output (micro)
  11. - BCM4345 WiFi (2.4/5GHz a/b/g/n/ac) and BT 5.0
  12. - 1x USB 2.0 port - Type C (OTG)
  13. - 1x USB 3.0 port - Type C (Host)
  14. - 1x micro SD Card slot
  15. - 40 Pin GPIO header
  16. Schematics are available on request from Radxa.
  17. U-Boot Compilation
  18. ------------------
  19. .. code-block:: bash
  20. $ export CROSS_COMPILE=aarch64-none-elf-
  21. $ make radxa-zero2_defconfig
  22. $ make
  23. U-Boot Signing with Pre-Built FIP repo
  24. --------------------------------------
  25. .. code-block:: bash
  26. $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1
  27. $ cd amlogic-boot-fip
  28. $ mkdir my-output-dir
  29. $ ./build-fip.sh radxa-zero2 /path/to/u-boot/u-boot.bin my-output-dir
  30. U-Boot Manual Signing
  31. ---------------------
  32. Amlogic does not provide sources for the firmware and tools needed to create a bootloader
  33. image so it is necessary to obtain binaries from sources published by the board vendor:
  34. .. code-block:: bash
  35. $ git clone -b radxa-zero-v2021.07 https://github.com/radxa/u-boot.git
  36. $ git clone https://github.com/radxa/fip.git
  37. $ sudo apt-get install -y gcc-aarch64-linux-gnu device-tree-compiler libncurses5 libncurses5-dev
  38. $ sudo apt-get install -y bc python dosfstools flex build-essential libssl-dev mtools
  39. $ wget https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
  40. $ sudo tar xvf gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz -C /opt
  41. $ export CROSS_COMPILE=/opt/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin/aarch64-none-elf-
  42. $ export ARCH=arm
  43. $ cd u-boot
  44. $ make radxa-zero2_defconfig
  45. $ make
  46. $ cp u-boot.bin ../fip/radxa-zero2/bl33.bin
  47. $ cd ../fip/radxa-zero2
  48. $ make
  49. This will generate the signed U-Boot binaries:
  50. .. code-block:: bash
  51. $ u-boot.bin u-boot.bin.sd.bin u-boot.bin.usb.bl2 u-boot.bin.usb.tpl
  52. Then write U-Boot to SD or eMMC with:
  53. .. code-block:: bash
  54. $ DEV=/dev/boot_device
  55. $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
  56. $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440