blob: dd1ed68b9ce284f65b0d5f376a5560fda0c01f88 [file] [log] [blame]
Vyacheslav Bocharov2ae38222021-09-20 11:40:16 +03001.. SPDX-License-Identifier: GPL-2.0+
2
3U-Boot for JetHub J100
4=======================
5
Vyacheslav Bocharov5a9e5922022-04-26 08:26:33 +03006JetHome Jethub D1 (http://jethome.ru/jethub-d1) is a series of home
7automation controller manufactured by JetHome with the following
8specifications:
Vyacheslav Bocharov2ae38222021-09-20 11:40:16 +03009
10 - Amlogic A113X (ARM Cortex-A53) quad-core up to 1.5GHz
11 - no video out
Vyacheslav Bocharov5a9e5922022-04-26 08:26:33 +030012 - 512MB/1GB DDR3 or 2GB DDR4 SDRAM
13 - 8/16/32GB eMMC flash
Vyacheslav Bocharov2ae38222021-09-20 11:40:16 +030014 - 1 x USB 2.0
15 - 1 x 10/100Mbps ethernet
Vyacheslav Bocharov5a9e5922022-04-26 08:26:33 +030016 - WiFi / Bluetooth one from:
17 - AMPAK AP6255 (Broadcom BCM43455) IEEE 802.11a/b/g/n/ac, Bluetooth 4.2
18 - RTL8822CS IEEE 802.11a/b/g/n/ac, Bluetooth 5.0
19 - Amlogic W155S1 WiFi5 IEEE 802.11a/b/g/n/ac, Bluetooth 5.2
Vyacheslav Bocharov2ae38222021-09-20 11:40:16 +030020 - 2 x gpio LEDS
21 - GPIO user Button
Vyacheslav Bocharov5a9e5922022-04-26 08:26:33 +030022 - DC source with a voltage of 9 to 56 V / Passive POE
23 - DIN Rail Mounting case
24
25Basic version also has:
26
27 - TI CC2538 + CC2592 Zigbee Wireless Module with up to 20dBm output
28 power and Zigbee 3.0 support.
Vyacheslav Bocharov2ae38222021-09-20 11:40:16 +030029 - 1 x 1-Wire
30 - 2 x RS-485
31 - 4 x dry contact digital GPIO inputs
32 - 3 x relay GPIO outputs
Vyacheslav Bocharov2ae38222021-09-20 11:40:16 +030033
34U-Boot compilation
35------------------
36
37.. code-block:: bash
38
39 $ export CROSS_COMPILE=aarch64-none-elf-
40 $ make jethub_j100_defconfig
41 $ make
42
43Image creation
44--------------
45
Neil Armstrong4c605122022-03-02 10:42:22 +010046For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `jethub-j100`
47
Vyacheslav Bocharov2ae38222021-09-20 11:40:16 +030048Amlogic doesn't provide sources for the firmware and for tools needed
49to create the bootloader image, so it is necessary to obtain binaries
50from the git tree published by the board vendor:
51
52.. code-block:: bash
53
54 $ git clone https://github.com/jethome-ru/jethub-aml-tools jethub-u-boot
55 $ cd jethub-u-boot
56 $ export FIPDIR=$PWD
57
58Go back to mainline U-boot source tree then :
59
60.. code-block:: bash
61
62 $ mkdir fip
63
64 $ cp $FIPDIR/j100/bl2.bin fip/
65 $ cp $FIPDIR/j100/acs.bin fip/
66 $ cp $FIPDIR/j100/bl21.bin fip/
67 $ cp $FIPDIR/j100/bl30.bin fip/
68 $ cp $FIPDIR/j100/bl301.bin fip/
69 $ cp $FIPDIR/j100/bl31.img fip/
70 $ cp u-boot.bin fip/bl33.bin
71
72 $ $FIPDIR/blx_fix.sh \
73 fip/bl30.bin \
74 fip/zero_tmp \
75 fip/bl30_zero.bin \
76 fip/bl301.bin \
77 fip/bl301_zero.bin \
78 fip/bl30_new.bin \
79 bl30
80
81 $ $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0
82
83 $ $FIPDIR/blx_fix.sh \
84 fip/bl2_acs.bin \
85 fip/zero_tmp \
86 fip/bl2_zero.bin \
87 fip/bl21.bin \
88 fip/bl21_zero.bin \
89 fip/bl2_new.bin \
90 bl2
91
92 $ $FIPDIR/j100/aml_encrypt_axg --bl3sig --input fip/bl30_new.bin \
93 --output fip/bl30_new.bin.enc \
94 --level v3 --type bl30
95 $ $FIPDIR/j100/aml_encrypt_axg --bl3sig --input fip/bl31.img \
96 --output fip/bl31.img.enc \
97 --level v3 --type bl31
98 $ $FIPDIR/j100/aml_encrypt_axg --bl3sig --input fip/bl33.bin --compress lz4 \
99 --output fip/bl33.bin.enc \
100 --level v3 --type bl33
101 $ $FIPDIR/j100/aml_encrypt_axg --bl2sig --input fip/bl2_new.bin \
102 --output fip/bl2.n.bin.sig
103 $ $FIPDIR/j100/aml_encrypt_axg --bootmk \
104 --output fip/u-boot.bin \
105 --bl2 fip/bl2.n.bin.sig \
106 --bl30 fip/bl30_new.bin.enc \
107 --bl31 fip/bl31.img.enc \
108 --bl33 fip/bl33.bin.enc --level v3
109
110and then write the image to eMMC with:
111
112.. code-block:: bash
113
114 $ DEV=/dev/your_emmc_device
115 $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
116 $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444