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