README 4.0 KB

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