Vyacheslav Bocharov | e7afdd6 | 2021-09-20 11:40:16 +0300 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | U-Boot for JetHub J80 |
| 4 | ====================== |
| 5 | |
| 6 | JetHome Jethub H1 (http://jethome.ru/jethub-h1) is a home automation |
| 7 | controller 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 | |
| 24 | U-Boot compilation |
| 25 | ------------------ |
| 26 | |
| 27 | .. code-block:: bash |
| 28 | |
| 29 | $ export CROSS_COMPILE=aarch64-none-elf- |
| 30 | $ make jethub_j80_defconfig |
| 31 | $ make |
| 32 | |
| 33 | Image creation |
| 34 | -------------- |
| 35 | |
Neil Armstrong | 2ea9868 | 2022-03-02 10:42:22 +0100 | [diff] [blame] | 36 | For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `jethub-j80` |
| 37 | |
Vyacheslav Bocharov | e7afdd6 | 2021-09-20 11:40:16 +0300 | [diff] [blame] | 38 | Amlogic doesn't provide sources for the firmware and for tools needed |
| 39 | to create the bootloader image, so it is necessary to obtain binaries |
| 40 | from the git tree published by the board vendor: |
| 41 | |
| 42 | .. code-block:: bash |
| 43 | |
| 44 | $ git clone https://github.com/jethome-ru/jethub-aml-tools jethub-u-boot |
| 45 | $ cd jethub-u-boot |
| 46 | $ export FIPDIR=$PWD |
| 47 | |
| 48 | Go back to mainline U-Boot source tree then : |
| 49 | |
| 50 | .. code-block:: bash |
| 51 | |
| 52 | $ mkdir fip |
| 53 | |
| 54 | $ cp $FIPDIR/j80/bl2.bin fip/ |
| 55 | $ cp $FIPDIR/j80/acs.bin fip/ |
| 56 | $ cp $FIPDIR/j80/bl21.bin fip/ |
| 57 | $ cp $FIPDIR/j80/bl30.bin fip/ |
| 58 | $ cp $FIPDIR/j80/bl301.bin fip/ |
| 59 | $ cp $FIPDIR/j80/bl31.img fip/ |
| 60 | $ cp u-boot.bin fip/bl33.bin |
| 61 | |
| 62 | $ $FIPDIR/blx_fix.sh \ |
| 63 | fip/bl30.bin \ |
| 64 | fip/zero_tmp \ |
| 65 | fip/bl30_zero.bin \ |
| 66 | fip/bl301.bin \ |
| 67 | fip/bl301_zero.bin \ |
| 68 | fip/bl30_new.bin \ |
| 69 | bl30 |
| 70 | |
| 71 | $ python $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0 |
| 72 | |
| 73 | $ $FIPDIR/blx_fix.sh \ |
| 74 | fip/bl2_acs.bin \ |
| 75 | fip/zero_tmp \ |
| 76 | fip/bl2_zero.bin \ |
| 77 | fip/bl21.bin \ |
| 78 | fip/bl21_zero.bin \ |
| 79 | fip/bl2_new.bin \ |
| 80 | bl2 |
| 81 | |
| 82 | $ $FIPDIR/j80/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin |
| 83 | $ $FIPDIR/j80/aml_encrypt_gxl --bl3enc --input fip/bl31.img |
| 84 | $ $FIPDIR/j80/aml_encrypt_gxl --bl3enc --input fip/bl33.bin --compress lz4 |
| 85 | $ $FIPDIR/j80/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig |
| 86 | $ $FIPDIR/j80/aml_encrypt_gxl --bootmk \ |
| 87 | --output fip/u-boot.bin \ |
| 88 | --bl2 fip/bl2.n.bin.sig \ |
| 89 | --bl30 fip/bl30_new.bin.enc \ |
| 90 | --bl31 fip/bl31.img.enc \ |
| 91 | --bl33 fip/bl33.bin.enc |
| 92 | |
| 93 | and then write the image to SD/eMMC with: |
| 94 | |
| 95 | .. code-block:: bash |
| 96 | |
| 97 | $ DEV=/dev/your_sd_device |
| 98 | $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 |
| 99 | $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 |