1.. SPDX-License-Identifier: GPL-2.0+ 2 3U-Boot for JetHub J80 4====================== 5 6JetHome Jethub H1 (http://jethome.ru/jethub-h1) is a home automation 7controller manufactured by JetHome with the following specifications: 8 9 - Amlogic S905W (ARM Cortex-A53) quad-core up to 1.5GHz 10 - No video out 11 - 1GB DDR3 12 - 8/16GB eMMC flash 13 - 2 x USB 2.0 14 - 1 x 10/100Mbps ethernet 15 - SDIO WiFi / Bluetooth RTL8822CS IEEE 802.11a/b/g/n/ac, Bluetooth 5.0. 16 - TI CC2538 + CC2592 Zigbee Wireless Module with up to 20dBm output 17 power and Zigbee 3.0 support. 18 - MicroSD 2.x/3.x/4.x DS/HS cards. 19 - 1 x gpio LED 20 - ADC user Button 21 - DC source 5V microUSB 22 - Square plastic case 23 24U-Boot compilation 25------------------ 26 27.. code-block:: bash 28 29 $ export CROSS_COMPILE=aarch64-none-elf- 30 $ make jethub_j80_defconfig 31 $ make 32 33Image creation 34-------------- 35 36Amlogic doesn't provide sources for the firmware and for tools needed 37to create the bootloader image, so it is necessary to obtain binaries 38from the git tree published by the board vendor: 39 40.. code-block:: bash 41 42 $ git clone https://github.com/jethome-ru/jethub-aml-tools jethub-u-boot 43 $ cd jethub-u-boot 44 $ export FIPDIR=$PWD 45 46Go back to mainline U-Boot source tree then : 47 48.. code-block:: bash 49 50 $ mkdir fip 51 52 $ cp $FIPDIR/j80/bl2.bin fip/ 53 $ cp $FIPDIR/j80/acs.bin fip/ 54 $ cp $FIPDIR/j80/bl21.bin fip/ 55 $ cp $FIPDIR/j80/bl30.bin fip/ 56 $ cp $FIPDIR/j80/bl301.bin fip/ 57 $ cp $FIPDIR/j80/bl31.img fip/ 58 $ cp u-boot.bin fip/bl33.bin 59 60 $ $FIPDIR/blx_fix.sh \ 61 fip/bl30.bin \ 62 fip/zero_tmp \ 63 fip/bl30_zero.bin \ 64 fip/bl301.bin \ 65 fip/bl301_zero.bin \ 66 fip/bl30_new.bin \ 67 bl30 68 69 $ python $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 70 71 $ $FIPDIR/blx_fix.sh \ 72 fip/bl2_acs.bin \ 73 fip/zero_tmp \ 74 fip/bl2_zero.bin \ 75 fip/bl21.bin \ 76 fip/bl21_zero.bin \ 77 fip/bl2_new.bin \ 78 bl2 79 80 $ $FIPDIR/j80/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin 81 $ $FIPDIR/j80/aml_encrypt_gxl --bl3enc --input fip/bl31.img 82 $ $FIPDIR/j80/aml_encrypt_gxl --bl3enc --input fip/bl33.bin --compress lz4 83 $ $FIPDIR/j80/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig 84 $ $FIPDIR/j80/aml_encrypt_gxl --bootmk \ 85 --output fip/u-boot.bin \ 86 --bl2 fip/bl2.n.bin.sig \ 87 --bl30 fip/bl30_new.bin.enc \ 88 --bl31 fip/bl31.img.enc \ 89 --bl33 fip/bl33.bin.enc 90 91and then write the image to SD/eMMC with: 92 93.. code-block:: bash 94 95 $ DEV=/dev/your_sd_device 96 $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 97 $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 98