README 3.1 KB

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