doc: boards: amlogic: Add documentation on pre-generated FIP files
authorNeil Armstrong <narmstrong@baylibre.com>
Wed, 2 Mar 2022 09:42:22 +0000 (10:42 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 20 Mar 2022 10:03:06 +0000 (11:03 +0100)
It add documentation on licencing & provides links to the amlogic-boot-fip
pre-built files collections.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
25 files changed:
doc/board/amlogic/beelink-gtking.rst
doc/board/amlogic/beelink-gtkingpro.rst
doc/board/amlogic/index.rst
doc/board/amlogic/jethub-j100.rst
doc/board/amlogic/jethub-j80.rst
doc/board/amlogic/khadas-vim.rst
doc/board/amlogic/khadas-vim2.rst
doc/board/amlogic/khadas-vim3.rst
doc/board/amlogic/khadas-vim3l.rst
doc/board/amlogic/libretech-ac.rst
doc/board/amlogic/libretech-cc.rst
doc/board/amlogic/nanopi-k2.rst
doc/board/amlogic/odroid-c2.rst
doc/board/amlogic/odroid-c4.rst
doc/board/amlogic/odroid-n2.rst
doc/board/amlogic/p200.rst
doc/board/amlogic/p201.rst
doc/board/amlogic/p212.rst
doc/board/amlogic/pre-generated-fip.rst [new file with mode: 0644]
doc/board/amlogic/radxa-zero.rst
doc/board/amlogic/s400.rst
doc/board/amlogic/sei510.rst
doc/board/amlogic/sei610.rst
doc/board/amlogic/u200.rst
doc/board/amlogic/wetek-core2.rst

index 56ce2cb..2fb50c5 100644 (file)
@@ -44,6 +44,8 @@ https://github.com/LibreELEC/amlogic-boot-fip/tree/master/beelink-s922x
 NB: Beelink use a common board config for GT-King, GT-King Pro and the
 GS-King-X model, hence the "beelink-s922x" name.
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `beelink-s922x`
+
 .. code-block:: bash
 
     $ wget https://github.com/LibreELEC/amlogic-boot-fip/archive/master.zip
index d750351..07bb04b 100644 (file)
@@ -45,6 +45,8 @@ https://github.com/LibreELEC/amlogic-boot-fip/tree/master/beelink-s922x
 NB: Beelink use a common board config for GT-King, GT-King Pro and the
 GS-King-X model, hence the "beelink-s922x" name.
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `beelink-s922x`
+
 .. code-block:: bash
 
     $ wget https://github.com/LibreELEC/amlogic-boot-fip/archive/master.zip
index 189b1ef..9ef1440 100644 (file)
@@ -74,6 +74,14 @@ This matrix concerns the actual source code version.
 | PCIe (+NVMe)                  | *N/A*     | *N/A*           | *N/A*        | **Yes**     | **Yes**    | **Yes**     | **Yes**      |
 +-------------------------------+-----------+-----------------+--------------+-------------+------------+-------------+--------------+
 
+Boot Documentation
+------------------
+
+.. toctree::
+   :maxdepth: 1
+
+   pre-generated-fip
+
 Board Documentation
 -------------------
 
index 5860278..d54519a 100644 (file)
@@ -37,6 +37,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `jethub-j100`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain binaries
 from the git tree published by the board vendor:
index 6b7bdc7..f669a01 100644 (file)
@@ -33,6 +33,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `jethub-j80`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain binaries
 from the git tree published by the board vendor:
index bbb61c2..04025d7 100644 (file)
@@ -30,6 +30,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `khadas-vim`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index c57d96d..7ac3bdc 100644 (file)
@@ -31,6 +31,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `khadas-vim2`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index 8b7196d..73dc32b 100644 (file)
@@ -57,6 +57,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `khadas-vim3`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index aed8955..692ab3d 100644 (file)
@@ -57,6 +57,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `khadas-vim3l`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index 39bae86..7a915f9 100644 (file)
@@ -30,6 +30,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `lafrite`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index 94c74c5..596ce45 100644 (file)
@@ -54,6 +54,8 @@ These binaries and the tools required below have been collected and prebuilt
 for convenience at <https://github.com/BayLibre/u-boot/releases/>. These
 apply to both v1 and v2.
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `lepotato`
+
 Download and extract the libretech-cc release from there, and set FIPDIR to
 point to the `fip` subdirectory.
 
index 1222ee4..76ff874 100644 (file)
@@ -30,6 +30,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `nanopi-k2`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index 966c18b..8a1be4b 100644 (file)
@@ -30,6 +30,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `odroid-c2`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index f66d60a..b512c6a 100644 (file)
@@ -34,6 +34,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `odroid-c4` or `odroid-hc4`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index fe63113..7aad36e 100644 (file)
@@ -29,6 +29,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `odroid-n2` or `odroid-n2-plus`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index 1c84f1c..5e7c6b0 100644 (file)
@@ -31,6 +31,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `p200`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index a3d451c..2cd2365 100644 (file)
@@ -31,6 +31,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `p201`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index e2f3fe3..c1b73e8 100644 (file)
@@ -31,6 +31,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `p212`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
diff --git a/doc/board/amlogic/pre-generated-fip.rst b/doc/board/amlogic/pre-generated-fip.rst
new file mode 100644 (file)
index 0000000..c63ea61
--- /dev/null
@@ -0,0 +1,93 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Pre-Generated FIP file set
+==========================
+
+The Amlogic ARMv8 based SoCs uses a vendor variant of the Trusted Firmware-A
+boot architecture.
+
+You can find documentation on the Trusted Firmware-A architecture on: https://www.trustedfirmware.org/projects/tf-a/
+
+The Trusted Firmware-A uses the following boot elements (simplified):
+
+- BL1: First boot step, implemented in ROM on Amlogic SoCs
+- BL2: Second boot step, used to initialize the SoC main clocks & DDR interface. The BL21 and ACS board-specific binaries are "inserted" in the BL32 binary before signing/packaging in order to be flashed on the platform.
+- BL30: Amlogic Secure Co-Processor (SCP) firmware used to handle all the system management operations (DVFS, suspend/resume, ...)
+- BL301: Amlogic Secure Co-Processor (SCP) board-specific firmware "plug-in" to handle custom DVFS & suspend-resume parameters
+- BL31: Initializes the interrupt controller and the system management interface (PSCI)
+- BL32 (Optional): Is the Trusted Environment Execution (TEE) Operating System to run secure Trusted Apps, e.g. OP-TEE
+- BL33: Is the last non-secure step, usually U-Boot which loads Linux
+
+Amlogic provides in binary form:
+
+- bl2.bin
+- bl30.bin
+- bl30.bin
+- bl31.img
+- bl32.bin
+
+And for lastest SoCs, Amlogic also provides the DDR drivers used by the BL2 binary.
+
+The licence of these files wasn't clear until recently, the currently Amlogic distribution licence
+is the following:
+
+.. code-block:: C
+
+    // Copyright (C) 2018 Amlogic, Inc. All rights reserved.
+    //
+    // All information contained herein is Amlogic confidential.
+    //
+    // This software is provided to you pursuant to Software License
+    // Agreement (SLA) with Amlogic Inc ("Amlogic"). This software may be
+    // used only in accordance with the terms of this agreement.
+    //
+    // Redistribution and use in source and binary forms, with or without
+    // modification is strictly prohibited without prior written permission
+    // from Amlogic.
+    //
+    // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+    // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+    // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+    // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+    // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The following files are generated from the Amlogic U-Boot fork:
+
+- acs.bin: contains the PLL & DDR parameters for the board
+- bl301.bin: contains the DVFS & suspend-resume handling code for the board
+- bl33.bin: U-boot binary image
+
+The acs.bin & bl301.bin uses the U-Boot GPL-2.0+ headers & build systems, thus those
+are considered issued from GPL-2.0+ source code.
+
+The tools used to sign & package those binary files are delivered in binary format
+for Intel x86-64 and Python 2.x only.
+
+A collection of pre-built with the corresponding Amlogic binaries for the common
+commercially available boards were collected in the https://github.com/LibreELEC/amlogic-boot-fip
+repository.
+
+Using this collection for a commercially available board is very easy.
+
+Here considering the Libre Computer AML-S905X-CC, which codename is `lepotato`:
+
+.. code-block:: bash
+
+    $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1
+    $ cd amlogic-boot-fip
+    $ mkdir my-output-dir
+    $ ./build-fip.sh lepotato /path/to/u-boot/u-boot.bin my-output-dir
+
+and then write the image to SD with:
+
+.. code-block:: bash
+
+    $ DEV=/dev/your_sd_device
+    $ dd if=my-output-dir/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
+    $ dd if=my-output-dir/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444
index 423403f..f5611f5 100644 (file)
@@ -34,6 +34,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `radxa-zero`
+
 Amlogic does not provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 git trees published by the board vendor:
index 52c7b27..c92817b 100644 (file)
@@ -31,6 +31,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `s400`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index 2d296b1..c55e778 100644 (file)
@@ -27,6 +27,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `sei510`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index 9434e6f..2d75449 100644 (file)
@@ -29,6 +29,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `sei610`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index 5aa3936..53213fd 100644 (file)
@@ -32,6 +32,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `u200`
+
 Amlogic doesn't provide sources for the firmware and for tools needed
 to create the bootloader image, so it is necessary to obtain them from
 the git tree published by the board vendor:
index 1012079..0147d5f 100644 (file)
@@ -29,6 +29,8 @@ U-Boot compilation
 Image creation
 --------------
 
+For simplified usage, pleaser refer to :doc:`pre-generated-fip` with codename `wetek-core2`
+
 Amlogic does not provide sources for the firmware or the tools needed
 to create the bootloader image, and WeTek has not publicly shared the
 precompiled FIP binaries. However the public Khadas VIM2 sources also