blob: a78a1a2ff255851fdf91e9486aafd8f8d6785356 [file] [log] [blame]
Karl Chane55f0922023-03-28 04:15:15 +08001.. SPDX-License-Identifier: GPL-2.0+
2
3U-Boot for Beelink GT1 Ultimate (S912)
4======================================
5
6Beelink GT1 Ultimate is an Android STB manufactured by Shenzen AZW (Beelink) with the
7following specification:
8
9- 2GB or 3GB DDR3 RAM
10- 32GB eMMC
11- HDMI 2.1 video
12- S/PDIF optical output
13- 10/100/1000 Ethernet
14- AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.2)
15- 3x USB 2.0 ports
16- IR receiver
17- 1x micro SD card slot
18- 1x Power LED (white)
19- 1x Reset button (internal)
20
21The GT1 (non-ultimate) board has QCA9377 WiFi/BT but is otherwise identical and should
22be capable of booting images prepared for the Ultimate box (NB: there are known clones
23of both boxes which may differ in specifications).
24
25Beelink do not provide public schematics, but have been willing to share them with known
26distro developers on request.
27
28U-Boot Compilation
29------------------
30
31.. code-block:: bash
32
33    $ export CROSS_COMPILE=aarch64-none-elf-
34    $ make beelink-gt1-ultimate_defconfig
35    $ make
36
37U-Boot Signing with Pre-Built FIP repo
38--------------------------------------
39
40.. code-block:: bash
41
42    $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1
43    $ cd amlogic-boot-fip
44    $ mkdir my-output-dir
45    $ ./build-fip.sh beelink-gt1 /path/to/u-boot/u-boot.bin my-output-dir
46
47U-Boot Manual Signing
48---------------------
49
50Amlogic does not provide firmware sources or tools needed to create the bootloader image
51and Beelink has not publicly shared the U-Boot sources needed to build the FIP binaries
52for signing. However you can download them from the amlogic-fip-repo.
53
54.. code-block:: bash
55
56    $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1
57    $ cd amlogic-boot-fip/beelink-gt1
58    $ export FIPDIR=$PWD
59
60Go back to the mainline U-Boot source tree then:
61
62.. code-block:: bash
63
64    $ mkdir fip
65    $ cp $FIPDIR/bl2.bin fip/
66    $ cp $FIPDIR/acs.bin fip/
67    $ cp $FIPDIR/bl21.bin fip/
68    $ cp $FIPDIR/bl30.bin fip/
69    $ cp $FIPDIR/bl301.bin fip/
70    $ cp $FIPDIR/bl31.img fip/
71    $ cp u-boot.bin fip/bl33.bin
72
73    $ $FIPDIR/blx_fix.sh \
74              fip/bl30.bin \
75              fip/zero_tmp \
76              fip/bl30_zero.bin \
77              fip/bl301.bin \
78              fip/bl301_zero.bin \
79              fip/bl30_new.bin \
80              bl30
81
82    $ python $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0
83
84    $ $FIPDIR/blx_fix.sh \
85              fip/bl2_acs.bin \
86              fip/zero_tmp \
87              fip/bl2_zero.bin \
88              fip/bl21.bin \
89              fip/bl21_zero.bin \
90              fip/bl2_new.bin \
91              bl2
92
93    $ $FIPDIR/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin
94    $ $FIPDIR/aml_encrypt_gxl --bl3enc --input fip/bl31.img
95    $ $FIPDIR/aml_encrypt_gxl --bl3enc --input fip/bl33.bin
96    $ $FIPDIR/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig
97    $ $FIPDIR/aml_encrypt_gxl --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
103
104Then write U-Boot to SD or eMMC with:
105
106.. code-block:: bash
107
108    $ DEV=/dev/boot_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=440