sei510.rst 4.4 KB

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