Merge tag 'v2022.04-rc5' into next
[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 For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `jethub-j100`
41
42 Amlogic doesn't provide sources for the firmware and for tools needed
43 to create the bootloader image, so it is necessary to obtain binaries
44 from the git tree published by the board vendor:
45
46 .. code-block:: bash
47
48     $ git clone https://github.com/jethome-ru/jethub-aml-tools jethub-u-boot
49     $ cd jethub-u-boot
50     $ export FIPDIR=$PWD
51
52 Go back to mainline U-boot source tree then :
53
54 .. code-block:: bash
55
56     $ mkdir fip
57
58     $ cp $FIPDIR/j100/bl2.bin fip/
59     $ cp $FIPDIR/j100/acs.bin fip/
60     $ cp $FIPDIR/j100/bl21.bin fip/
61     $ cp $FIPDIR/j100/bl30.bin fip/
62     $ cp $FIPDIR/j100/bl301.bin fip/
63     $ cp $FIPDIR/j100/bl31.img fip/
64     $ cp u-boot.bin fip/bl33.bin
65
66     $ $FIPDIR/blx_fix.sh \
67         fip/bl30.bin \
68         fip/zero_tmp \
69         fip/bl30_zero.bin \
70         fip/bl301.bin \
71         fip/bl301_zero.bin \
72         fip/bl30_new.bin \
73         bl30
74
75     $ $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0
76
77     $ $FIPDIR/blx_fix.sh \
78         fip/bl2_acs.bin \
79         fip/zero_tmp \
80         fip/bl2_zero.bin \
81         fip/bl21.bin \
82         fip/bl21_zero.bin \
83         fip/bl2_new.bin \
84         bl2
85
86     $ $FIPDIR/j100/aml_encrypt_axg --bl3sig --input fip/bl30_new.bin \
87                                         --output fip/bl30_new.bin.enc \
88                                         --level v3 --type bl30
89     $ $FIPDIR/j100/aml_encrypt_axg --bl3sig --input fip/bl31.img \
90                                         --output fip/bl31.img.enc \
91                                         --level v3 --type bl31
92     $ $FIPDIR/j100/aml_encrypt_axg --bl3sig --input fip/bl33.bin --compress lz4 \
93                                         --output fip/bl33.bin.enc \
94                                         --level v3 --type bl33
95     $ $FIPDIR/j100/aml_encrypt_axg --bl2sig --input fip/bl2_new.bin \
96                                         --output fip/bl2.n.bin.sig
97     $ $FIPDIR/j100/aml_encrypt_axg --bootmk \
98                 --output fip/u-boot.bin \
99                 --bl2 fip/bl2.n.bin.sig \
100                 --bl30 fip/bl30_new.bin.enc \
101                 --bl31 fip/bl31.img.enc \
102                 --bl33 fip/bl33.bin.enc --level v3
103
104 and then write the image to eMMC with:
105
106 .. code-block:: bash
107
108     $ DEV=/dev/your_emmc_device
109     $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
110     $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444