README 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. U-Boot for Amlogic P212
  2. =======================
  3. P212 is a reference board manufactured by Amlogic with the following
  4. specifications:
  5. - Amlogic S905X ARM Cortex-A53 quad-core SoC @ 1.5GHz
  6. - ARM Mali 450 GPU
  7. - 2GB DDR3 SDRAM
  8. - 10/100 Ethernet
  9. - HDMI 2.0 4K/60Hz display
  10. - 2 x USB 2.0 Host
  11. - eMMC, microSD
  12. - Infrared receiver
  13. - SDIO WiFi Module
  14. - CVBS+Stereo Audio Jack
  15. Schematics are available from Amlogic on demand.
  16. Currently the u-boot port supports the following devices:
  17. - serial
  18. - eMMC, microSD
  19. u-boot compilation
  20. ==================
  21. > export ARCH=arm
  22. > export CROSS_COMPILE=aarch64-none-elf-
  23. > make p212_defconfig
  24. > make
  25. Image creation
  26. ==============
  27. Amlogic doesn't provide sources for the firmware and for tools needed
  28. to create the bootloader image, so it is necessary to obtain them from
  29. the git tree published by the board vendor:
  30. > wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz
  31. > wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz
  32. > tar xvfJ gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz
  33. > tar xvfJ gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz
  34. > 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
  35. > git clone https://github.com/BayLibre/u-boot.git -b n-amlogic-openlinux-20170606 amlogic-u-boot
  36. > cd amlogic-u-boot
  37. > make gxl_p212_v1_defconfig
  38. > make
  39. > export FIPDIR=$PWD/fip
  40. Go back to mainline U-boot source tree then :
  41. > mkdir fip
  42. > cp $FIPDIR/gxl/bl2.bin fip/
  43. > cp $FIPDIR/gxl/acs.bin fip/
  44. > cp $FIPDIR/gxl/bl21.bin fip/
  45. > cp $FIPDIR/gxl/bl30.bin fip/
  46. > cp $FIPDIR/gxl/bl301.bin fip/
  47. > cp $FIPDIR/gxl/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/gxl/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin
  67. > $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl31.img
  68. > $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl33.bin
  69. > $FIPDIR/gxl/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig
  70. > $FIPDIR/gxl/aml_encrypt_gxl --bootmk \
  71. --output fip/u-boot.bin \
  72. --bl2 fip/bl2.n.bin.sig \
  73. --bl30 fip/bl30_new.bin.enc \
  74. --bl31 fip/bl31.img.enc \
  75. --bl33 fip/bl33.bin.enc
  76. and then write the image to SD with:
  77. > DEV=/dev/your_sd_device
  78. > dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
  79. > dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444