jethub-j100.rst 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. U-Boot for JetHub J100 (A113X)
  3. ==============================
  4. JetHome Jethub D1 (http://jethome.ru/jethub-d1) is a home automation controller device
  5. manufactured by JetHome with the following specifications:
  6. - Amlogic A113X (ARM Cortex-A53) quad-core up to 1.5GHz
  7. - no video out
  8. - 512MB/1GB DDR3 or 2GB DDR4 SDRAM
  9. - 8/16/32GB eMMC flash
  10. - 1 x USB 2.0
  11. - 1 x 10/100Mbps ethernet
  12. - WiFi / Bluetooth one from:
  13. - AMPAK AP6255 (Broadcom BCM43455) IEEE 802.11a/b/g/n/ac, Bluetooth 4.2
  14. - RTL8822CS IEEE 802.11a/b/g/n/ac, Bluetooth 5.0
  15. - Amlogic W155S1 WiFi5 IEEE 802.11a/b/g/n/ac, Bluetooth 5.2
  16. - 2 x gpio LEDS
  17. - GPIO user Button
  18. - DC source with a voltage of 9 to 56 V / Passive POE
  19. - DIN Rail Mounting case
  20. The basic version also has:
  21. - TI CC2538 + CC2592 Zigbee Wireless with upto 20dBm output power and Zigbee 3.0
  22. - 1 x 1-Wire
  23. - 2 x RS-485
  24. - 4 x dry contact digital GPIO inputs
  25. - 3 x relay GPIO outputs
  26. U-Boot Compilation
  27. ------------------
  28. .. code-block:: bash
  29. $ export CROSS_COMPILE=aarch64-none-elf-
  30. $ make jethub_j100_defconfig
  31. $ make
  32. U-Boot Signing with Pre-Built FIP repo
  33. --------------------------------------
  34. .. code-block:: bash
  35. $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1
  36. $ cd amlogic-boot-fip
  37. $ mkdir my-output-dir
  38. $ ./build-fip.sh jethub-j100 /path/to/u-boot/u-boot.bin my-output-dir
  39. U-Boot Manual Signing
  40. ---------------------
  41. Amlogic does not provide sources for the firmware and tools needed to create a bootloader
  42. image so it is necessary to obtain binaries from sources published by the board vendor:
  43. .. code-block:: bash
  44. $ git clone https://github.com/jethome-ru/jethub-aml-tools jethub-u-boot
  45. $ cd jethub-u-boot
  46. $ export FIPDIR=$PWD
  47. Go back to the mainline U-Boot source tree then:
  48. .. code-block:: bash
  49. $ mkdir fip
  50. $ cp $FIPDIR/j100/bl2.bin fip/
  51. $ cp $FIPDIR/j100/acs.bin fip/
  52. $ cp $FIPDIR/j100/bl21.bin fip/
  53. $ cp $FIPDIR/j100/bl30.bin fip/
  54. $ cp $FIPDIR/j100/bl301.bin fip/
  55. $ cp $FIPDIR/j100/bl31.img fip/
  56. $ cp u-boot.bin fip/bl33.bin
  57. $ $FIPDIR/blx_fix.sh \
  58. fip/bl30.bin \
  59. fip/zero_tmp \
  60. fip/bl30_zero.bin \
  61. fip/bl301.bin \
  62. fip/bl301_zero.bin \
  63. fip/bl30_new.bin \
  64. bl30
  65. $ $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0
  66. $ $FIPDIR/blx_fix.sh \
  67. fip/bl2_acs.bin \
  68. fip/zero_tmp \
  69. fip/bl2_zero.bin \
  70. fip/bl21.bin \
  71. fip/bl21_zero.bin \
  72. fip/bl2_new.bin \
  73. bl2
  74. $ $FIPDIR/j100/aml_encrypt_axg --bl3sig --input fip/bl30_new.bin \
  75. --output fip/bl30_new.bin.enc \
  76. --level v3 --type bl30
  77. $ $FIPDIR/j100/aml_encrypt_axg --bl3sig --input fip/bl31.img \
  78. --output fip/bl31.img.enc \
  79. --level v3 --type bl31
  80. $ $FIPDIR/j100/aml_encrypt_axg --bl3sig --input fip/bl33.bin --compress lz4 \
  81. --output fip/bl33.bin.enc \
  82. --level v3 --type bl33
  83. $ $FIPDIR/j100/aml_encrypt_axg --bl2sig --input fip/bl2_new.bin \
  84. --output fip/bl2.n.bin.sig
  85. $ $FIPDIR/j100/aml_encrypt_axg --bootmk \
  86. --output fip/u-boot.bin \
  87. --bl2 fip/bl2.n.bin.sig \
  88. --bl30 fip/bl30_new.bin.enc \
  89. --bl31 fip/bl31.img.enc \
  90. --bl33 fip/bl33.bin.enc --level v3
  91. Then write U-Boot to SD or eMMC with:
  92. .. code-block:: bash
  93. $ DEV=/dev/boot_device
  94. $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
  95. $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440