sei610.rst 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. U-Boot for Amlogic SEI610
  3. =========================
  4. SEI610 is a customer board manufactured by SEI Robotics with the following
  5. specifications:
  6. - Amlogic S905X3 ARM Cortex-A55 quad-core SoC
  7. - 2GB DDR4 SDRAM
  8. - 10/100 Ethernet (Internal PHY)
  9. - 1 x USB 3.0 Host
  10. - 1 x USB Type-C DRD
  11. - 1 x FTDI USB Serial Debug Interface
  12. - eMMC
  13. - SDcard
  14. - Infrared receiver
  15. - SDIO WiFi Module
  16. U-Boot compilation
  17. ------------------
  18. .. code-block:: bash
  19. $ export CROSS_COMPILE=aarch64-none-elf-
  20. $ make sei610_defconfig
  21. $ make
  22. Image creation
  23. --------------
  24. Amlogic doesn't provide sources for the firmware and for tools needed
  25. to create the bootloader image, so it is necessary to obtain them from
  26. the git tree published by the board vendor:
  27. .. code-block:: bash
  28. $ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz
  29. $ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz
  30. $ tar xvfJ gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz
  31. $ tar xvfJ gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz
  32. $ export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH
  33. $ git clone https://github.com/BayLibre/u-boot.git -b buildroot-openlinux-4.9-g12a-201904 amlogic-u-boot
  34. $ cd amlogic-u-boot
  35. $ make sm1_ac200_v1_defconfig
  36. $ make
  37. $ export UBOOTDIR=$PWD
  38. Download the latest Amlogic Buildroot package, and extract it :
  39. .. code-block:: bash
  40. $ wget http://openlinux2.amlogic.com:8000/ARM/filesystem/buildroot-openlinux-A113-201901.tgz
  41. $ tar xfz buildroot-openlinux-A113-201901.tgz buildroot-openlinux-A113-201901/bootloader
  42. $ export BRDIR=$PWD/buildroot-openlinux-A113-201901
  43. $ export FIPDIR=$BRDIR/bootloader/uboot-repo/fip
  44. Go back to mainline U-Boot source tree then :
  45. .. code-block:: bash
  46. $ mkdir fip
  47. $ wget https://github.com/BayLibre/u-boot/releases/download/v2017.11-libretech-cc/blx_fix_g12a.sh -O fip/blx_fix.sh
  48. $ cp $UBOOTDIR/build/scp_task/bl301.bin fip/
  49. $ cp $UBOOTDIR/build/board/amlogic/g12a_u200_v1/firmware/acs.bin fip/
  50. $ cp $BRDIR/bootloader/uboot-repo/bl2/bin/g12a/bl2.bin fip/
  51. $ cp $BRDIR/bootloader/uboot-repo/bl30/bin/g12a/bl30.bin fip/
  52. $ cp $BRDIR/bootloader/uboot-repo/bl31_1.3/bin/g12a/bl31.img fip/
  53. $ cp $FIPDIR/g12a/ddr3_1d.fw fip/
  54. $ cp $FIPDIR/g12a/ddr4_1d.fw fip/
  55. $ cp $FIPDIR/g12a/ddr4_2d.fw fip/
  56. $ cp $FIPDIR/g12a/diag_lpddr4.fw fip/
  57. $ cp $FIPDIR/g12a/lpddr4_1d.fw fip/
  58. $ cp $FIPDIR/g12a/lpddr4_2d.fw fip/
  59. $ cp $FIPDIR/g12a/piei.fw fip/
  60. $ cp u-boot.bin fip/bl33.bin
  61. $ sh fip/blx_fix.sh \
  62. fip/bl30.bin \
  63. fip/zero_tmp \
  64. fip/bl30_zero.bin \
  65. fip/bl301.bin \
  66. fip/bl301_zero.bin \
  67. fip/bl30_new.bin \
  68. bl30
  69. $ sh fip/blx_fix.sh \
  70. fip/bl2.bin \
  71. fip/zero_tmp \
  72. fip/bl2_zero.bin \
  73. fip/acs.bin \
  74. fip/bl21_zero.bin \
  75. fip/bl2_new.bin \
  76. bl2
  77. $ $FIPDIR/g12a/aml_encrypt_g12a --bl30sig --input fip/bl30_new.bin \
  78. --output fip/bl30_new.bin.g12a.enc \
  79. --level v3
  80. $ $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl30_new.bin.g12a.enc \
  81. --output fip/bl30_new.bin.enc \
  82. --level v3 --type bl30
  83. $ $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl31.img \
  84. --output fip/bl31.img.enc \
  85. --level v3 --type bl31
  86. $ $FIPDIR/g12a/aml_encrypt_g12a --bl3sig --input fip/bl33.bin --compress lz4 \
  87. --output fip/bl33.bin.enc \
  88. --level v3 --type bl33
  89. $ $FIPDIR/g12a/aml_encrypt_g12a --bl2sig --input fip/bl2_new.bin \
  90. --output fip/bl2.n.bin.sig
  91. $ $FIPDIR/g12a/aml_encrypt_g12a --bootmk \
  92. --output fip/u-boot.bin \
  93. --bl2 fip/bl2.n.bin.sig \
  94. --bl30 fip/bl30_new.bin.enc \
  95. --bl31 fip/bl31.img.enc \
  96. --bl33 fip/bl33.bin.enc \
  97. --ddrfw1 fip/ddr4_1d.fw \
  98. --ddrfw2 fip/ddr4_2d.fw \
  99. --ddrfw3 fip/ddr3_1d.fw \
  100. --ddrfw4 fip/piei.fw \
  101. --ddrfw5 fip/lpddr4_1d.fw \
  102. --ddrfw6 fip/lpddr4_2d.fw \
  103. --ddrfw7 fip/diag_lpddr4.fw \
  104. --level v3
  105. and then write the image to SD with:
  106. .. code-block:: bash
  107. $ DEV=/dev/your_sd_device
  108. $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
  109. $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444