beelink-gt1-ultimate.rst 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. U-Boot for Beelink GT1 Ultimate (S912)
  3. ======================================
  4. Beelink GT1 Ultimate is an Android STB manufactured by Shenzen AZW (Beelink) with the
  5. following specification:
  6. - 2GB or 3GB DDR3 RAM
  7. - 32GB eMMC
  8. - HDMI 2.1 video
  9. - S/PDIF optical output
  10. - 10/100/1000 Ethernet
  11. - AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.2)
  12. - 3x USB 2.0 ports
  13. - IR receiver
  14. - 1x micro SD card slot
  15. - 1x Power LED (white)
  16. - 1x Reset button (internal)
  17. The GT1 (non-ultimate) board has QCA9377 WiFi/BT but is otherwise identical and should
  18. be capable of booting images prepared for the Ultimate box (NB: there are known clones
  19. of both boxes which may differ in specifications).
  20. Beelink do not provide public schematics, but have been willing to share them with known
  21. distro developers on request.
  22. U-Boot Compilation
  23. ------------------
  24. .. code-block:: bash
  25.     $ export CROSS_COMPILE=aarch64-none-elf-
  26.     $ make beelink-gt1-ultimate_defconfig
  27.     $ make
  28. U-Boot Signing with Pre-Built FIP repo
  29. --------------------------------------
  30. .. code-block:: bash
  31.     $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1
  32.     $ cd amlogic-boot-fip
  33.     $ mkdir my-output-dir
  34.     $ ./build-fip.sh beelink-gt1 /path/to/u-boot/u-boot.bin my-output-dir
  35. U-Boot Manual Signing
  36. ---------------------
  37. Amlogic does not provide firmware sources or tools needed to create the bootloader image
  38. and Beelink has not publicly shared the U-Boot sources needed to build the FIP binaries
  39. for signing. However you can download them from the amlogic-fip-repo.
  40. .. code-block:: bash
  41.     $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1
  42.     $ cd amlogic-boot-fip/beelink-gt1
  43.     $ export FIPDIR=$PWD
  44. Go back to the mainline U-Boot source tree then:
  45. .. code-block:: bash
  46.     $ mkdir fip
  47.     $ cp $FIPDIR/bl2.bin fip/
  48.     $ cp $FIPDIR/acs.bin fip/
  49.     $ cp $FIPDIR/bl21.bin fip/
  50.     $ cp $FIPDIR/bl30.bin fip/
  51.     $ cp $FIPDIR/bl301.bin fip/
  52.     $ cp $FIPDIR/bl31.img fip/
  53.     $ cp u-boot.bin fip/bl33.bin
  54.     $ $FIPDIR/blx_fix.sh \
  55.               fip/bl30.bin \
  56.               fip/zero_tmp \
  57.               fip/bl30_zero.bin \
  58.               fip/bl301.bin \
  59.               fip/bl301_zero.bin \
  60.               fip/bl30_new.bin \
  61.               bl30
  62.     $ python $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0
  63.     $ $FIPDIR/blx_fix.sh \
  64.               fip/bl2_acs.bin \
  65.               fip/zero_tmp \
  66.               fip/bl2_zero.bin \
  67.               fip/bl21.bin \
  68.               fip/bl21_zero.bin \
  69.               fip/bl2_new.bin \
  70.               bl2
  71.     $ $FIPDIR/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin
  72.     $ $FIPDIR/aml_encrypt_gxl --bl3enc --input fip/bl31.img
  73.     $ $FIPDIR/aml_encrypt_gxl --bl3enc --input fip/bl33.bin
  74.     $ $FIPDIR/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig
  75.     $ $FIPDIR/aml_encrypt_gxl --bootmk \
  76.                               --output fip/u-boot.bin \
  77.                               --bl2 fip/bl2.n.bin.sig \
  78.                               --bl30 fip/bl30_new.bin.enc \
  79.                               --bl31 fip/bl31.img.enc \
  80.                               --bl33 fip/bl33.bin.enc
  81. Then write U-Boot to SD or eMMC with:
  82. .. code-block:: bash
  83.     $ DEV=/dev/boot_device
  84.     $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
  85.     $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440