s400.rst 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. U-Boot for Amlogic S400
  3. =======================
  4. S400 is a reference board manufactured by Amlogic with the following
  5. specifications:
  6. - Amlogic A113DX ARM Cortex-A53 quad-core SoC @ 1.2GHz
  7. - 1GB DDR4 SDRAM
  8. - 10/100 Ethernet
  9. - 2 x USB 2.0 Host
  10. - eMMC
  11. - Infrared receiver
  12. - SDIO WiFi Module
  13. - MIPI DSI Connector
  14. - Audio HAT Connector
  15. - PCI-E M.2 Connectors
  16. Schematics are available from Amlogic on demand.
  17. U-Boot compilation
  18. ------------------
  19. .. code-block:: bash
  20. $ export CROSS_COMPILE=aarch64-none-elf-
  21. $ make s400_defconfig
  22. $ make
  23. Image creation
  24. --------------
  25. Amlogic doesn't provide sources for the firmware and for tools needed
  26. to create the bootloader image, so it is necessary to obtain them from
  27. the git tree published by the board vendor:
  28. .. code-block:: bash
  29. $ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz
  30. $ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz
  31. $ tar xvfJ gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz
  32. $ tar xvfJ gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz
  33. $ 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
  34. $ git clone https://github.com/BayLibre/u-boot.git -b n-amlogic-openlinux-20170606 amlogic-u-boot
  35. $ cd amlogic-u-boot
  36. $ make axg_s400_v1_defconfig
  37. $ make
  38. $ export FIPDIR=$PWD/fip
  39. Go back to mainline U-boot source tree then :
  40. .. code-block:: bash
  41. $ mkdir fip
  42. $ cp $FIPDIR/axg/bl2.bin fip/
  43. $ cp $FIPDIR/axg/acs.bin fip/
  44. $ cp $FIPDIR/axg/bl21.bin fip/
  45. $ cp $FIPDIR/axg/bl30.bin fip/
  46. $ cp $FIPDIR/axg/bl301.bin fip/
  47. $ cp $FIPDIR/axg/bl31.img fip/
  48. $ cp u-boot.bin fip/bl33.bin
  49. $ $FIPDIR/blx_fix.sh \
  50. fip/bl30.bin \
  51. fip/zero_tmp \
  52. fip/bl30_zero.bin \
  53. fip/bl301.bin \
  54. fip/bl301_zero.bin \
  55. fip/bl30_new.bin \
  56. bl30
  57. $ $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0
  58. $ $FIPDIR/blx_fix.sh \
  59. fip/bl2_acs.bin \
  60. fip/zero_tmp \
  61. fip/bl2_zero.bin \
  62. fip/bl21.bin \
  63. fip/bl21_zero.bin \
  64. fip/bl2_new.bin \
  65. bl2
  66. $ $FIPDIR/axg/aml_encrypt_axg --bl3sig --input fip/bl30_new.bin \
  67. --output fip/bl30_new.bin.enc \
  68. --level v3 --type bl30
  69. $ $FIPDIR/axg/aml_encrypt_axg --bl3sig --input fip/bl31.img \
  70. --output fip/bl31.img.enc \
  71. --level v3 --type bl31
  72. $ $FIPDIR/axg/aml_encrypt_axg --bl3sig --input fip/bl33.bin --compress lz4 \
  73. --output fip/bl33.bin.enc \
  74. --level v3 --type bl33
  75. $ $FIPDIR/axg/aml_encrypt_axg --bl2sig --input fip/bl2_new.bin \
  76. --output fip/bl2.n.bin.sig
  77. $ $FIPDIR/axg/aml_encrypt_axg --bootmk \
  78. --output fip/u-boot.bin \
  79. --bl2 fip/bl2.n.bin.sig \
  80. --bl30 fip/bl30_new.bin.enc \
  81. --bl31 fip/bl31.img.enc \
  82. --bl33 fip/bl33.bin.enc --level v3
  83. and then write the image to SD with:
  84. .. code-block:: bash
  85. $ DEV=/dev/your_sd_device
  86. $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
  87. $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444