u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Christian Hewitt <christianshewitt@gmail.com>
To: u-boot@lists.denx.de, u-boot-amlogic@groups.io,
	linux-amlogic@lists.infradead.org
Cc: Christian Hewitt <christianshewitt@gmail.com>
Subject: [PATCH 03/33] doc: boards: amlogic: update documentation for pre-generated-fip's
Date: Mon, 20 Mar 2023 11:45:39 +0000	[thread overview]
Message-ID: <20230320114609.930145-4-christianshewitt@gmail.com> (raw)
In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com>

Improve documentation.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
---
 doc/board/amlogic/pre-generated-fip.rst | 138 +++++++++++++++---------
 1 file changed, 88 insertions(+), 50 deletions(-)

diff --git a/doc/board/amlogic/pre-generated-fip.rst b/doc/board/amlogic/pre-generated-fip.rst
index c63ea616b8..6a43d776d4 100644
--- a/doc/board/amlogic/pre-generated-fip.rst
+++ b/doc/board/amlogic/pre-generated-fip.rst
@@ -1,24 +1,57 @@
 .. SPDX-License-Identifier: GPL-2.0+
 
-Pre-Generated FIP file set
-==========================
+Pre-Generated FIP File Repo
+===========================
 
-The Amlogic ARMv8 based SoCs uses a vendor variant of the Trusted Firmware-A
-boot architecture.
+Pre-built Flattened Image Package (FIP) sources and Amlogic signing binaries for many
+commercially available boards and some Android STB devices are collected for use with
+distro build-systems here: https://github.com/LibreELEC/amlogic-boot-fip
 
-You can find documentation on the Trusted Firmware-A architecture on: https://www.trustedfirmware.org/projects/tf-a/
+Using the pre-built FIP sources to sign U-Boot is simple, e.g. for LePotato:
 
-The Trusted Firmware-A uses the following boot elements (simplified):
+.. 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
+
+Then write U-Boot to SD or eMMC with:
+
+.. code-block:: bash
+
+    $ DEV=/dev/boot_device
+    $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
+    $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440
+
+Files Included
+--------------
+
+Amlogic ARMv8 SoCs use a vendor modified variant of the ARM Trusted Firmware-A boot
+architecture. See documentation here: https://www.trustedfirmware.org/projects/tf-a/
+
+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. BL21
+  and ACS board-specific binaries must be "inserted" into the BL2 binary before signing
+  and packaging in order to be flashed on the platform
+
+- BL30: Amlogic Secure Co-Processor (SCP) firmware used to handle all system management
+  operations (DVFS, suspend/resume, ..)
+
+- BL301: Amlogic Secure Co-Processor (SCP) board-specific firmware "plug-in" to handle
+  custom DVFS & suspend-resume parameters
 
-- 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
+
+- BL32 (Optional): Is the Trusted Environment Execution (TEE) Operating System used 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:
+Amlogic sources provide the following binaries:
 
 - bl2.bin
 - bl30.bin
@@ -26,10 +59,50 @@ Amlogic provides in binary form:
 - bl31.img
 - bl32.bin
 
-And for lastest SoCs, Amlogic also provides the DDR drivers used by the BL2 binary.
+For G12A/B and SM1 Amlogic also provides DDR drivers used by the BL2 binary:
+
+- ddr4_1d.fw
+- ddr4_2d.fw
+- ddr3_1d.fw
+- piei.fw
+- lpddr4_1d.fw
+- lpddr4_2d.fw
+- diag_lpddr4.fw
+- aml_ddr.fw
+
+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 and bl301.bin files use U-Boot GPL-2.0+ headers and U-Boot build system and
+are thus considered to be issued from GPL-2.0+ source code.
+
+Amlogic alo provides pre-compiled x86_64 and Python2 binaries:
 
-The licence of these files wasn't clear until recently, the currently Amlogic distribution licence
-is the following:
+- aml_encrypt_gxb
+- aml_encrypt_gxl
+- aml_encrypt_g12a
+- aml_encrypt_g12b
+- acs_tool.pyc
+
+The repo replaces the pre-compiled acs_tool.pyc with a Python3 acs_tool.py that can be
+used with modern build hosts.
+
+The repo also provides the following files used with GXBB boards:
+
+- bl1.bin.hardkernel
+- aml_chksum
+
+The repo also supports the open-source 'gxlimg' signing tool that can be used to sign
+U-Boot binaries for GXL/GXM/G12A/G12B/SM1 boards: https://github.com/repk/gxlimg
+
+Licensing
+---------
+
+The licence of Amlogic provided binaries was not historically clear but has now been
+clarified. The current Amlogic distribution licence is below:
 
 .. code-block:: C
 
@@ -56,38 +129,3 @@ is the following:
     // 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
-- 
2.34.1


  parent reply	other threads:[~2023-03-20 12:55 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 11:45 [PATCH 00/33] doc: board: amlogic: spring clean-up of Amlogic docs Christian Hewitt
2023-03-20 11:45 ` [PATCH 01/33] doc: boards: amlogic: update documentation for index page Christian Hewitt
2023-03-20 11:45 ` [PATCH 02/33] doc: boards: amlogic: update documentation for boot-flow Christian Hewitt
2023-03-20 11:45 ` Christian Hewitt [this message]
2023-03-20 11:45 ` [PATCH 04/33] doc: boards: amlogic: update documentation for Beelink GT-King Christian Hewitt
2023-03-20 11:45 ` [PATCH 05/33] doc: boards: amlogic: update documentation for Beelink GT-King Pro Christian Hewitt
2023-03-20 11:45 ` [PATCH 06/33] doc: boards: amlogic: update documentation for JetHub J100 Christian Hewitt
2023-03-20 11:45 ` [PATCH 07/33] doc: boards: amlogic: update documentation for JetHub J80 Christian Hewitt
2023-03-20 11:45 ` [PATCH 08/33] doc: boards: amlogic: update documentation for Khadas VIM Christian Hewitt
2023-03-20 11:45 ` [PATCH 09/33] doc: boards: amlogic: update documentation for Khadas VIM2 Christian Hewitt
2023-03-20 11:45 ` [PATCH 10/33] doc: boards: amlogic: update documentation for Khadas VIM3 Christian Hewitt
2023-03-20 11:45 ` [PATCH 11/33] doc: boards: amlogic: update documentation for Khadas VIM3L Christian Hewitt
2023-03-20 11:45 ` [PATCH 12/33] doc: boards: amlogic: update documentation for LaFrite Christian Hewitt
2023-03-20 11:45 ` [PATCH 13/33] doc: boards: amlogic: update documentation for LePotato Christian Hewitt
2023-03-20 11:45 ` [PATCH 14/33] doc: boards: amlogic: update documentation for NanoPi-K2 Christian Hewitt
2023-03-20 11:45 ` [PATCH 15/33] doc: boards: amlogic: update documentation for ODROID-C2 Christian Hewitt
2023-03-20 11:45 ` [PATCH 16/33] doc: boards: amlogic: update documentation for ODROID-C4 Christian Hewitt
2023-03-20 11:45 ` [PATCH 17/33] doc: boards: amlogic: update documentation for ODROID GO ULTRA Christian Hewitt
2023-03-20 11:45 ` [PATCH 18/33] doc: boards: amlogic: update documentation for ODROID-N2/N2+ Christian Hewitt
2023-03-20 11:45 ` [PATCH 19/33] doc: boards: amlogic: update documentation for ODROID-N2L Christian Hewitt
2023-03-20 11:45 ` [PATCH 20/33] doc: boards: amlogic: update documentation for P200 Christian Hewitt
2023-03-20 11:45 ` [PATCH 21/33] doc: boards: amlogic: update documentation for P201 Christian Hewitt
2023-03-20 11:45 ` [PATCH 22/33] doc: boards: amlogic: update documentation for Q200 Christian Hewitt
2023-03-20 11:45 ` [PATCH 23/33] doc: boards: amlogic: update documentation for Radxa Zero Christian Hewitt
2023-03-20 11:46 ` [PATCH 24/33] doc: boards: amlogic: update documentation for S400 Christian Hewitt
2023-03-20 11:46 ` [PATCH 25/33] doc: boards: amlogic: update documentation for SEI510 Christian Hewitt
2023-03-20 11:46 ` [PATCH 26/33] doc: boards: amlogic: update documentation for SEI610 Christian Hewitt
2023-03-20 11:46 ` [PATCH 27/33] doc: boards: amlogic: update documentation for U200 Christian Hewitt
2023-03-20 11:46 ` [PATCH 28/33] doc: boards: amlogic: update documentation for W400 Christian Hewitt
2023-03-20 11:46 ` [PATCH 29/33] doc: boards: amlogic: update documentation for WeTek Core2 Christian Hewitt
2023-03-20 18:40   ` Simon Glass
2023-03-21  5:10     ` Christian Hewitt
2023-04-01  6:33       ` Simon Glass
2023-03-20 11:46 ` [PATCH 30/33] doc: boards: amlogic: add documentation for BananaPi CM4IO Christian Hewitt
2023-03-20 12:13   ` Neil Armstrong
2023-03-20 12:23     ` Christian Hewitt
2023-03-20 12:25       ` neil.armstrong
2023-03-20 11:46 ` [PATCH 31/33] doc: boards: amlogic: add documentation for BananaPi M5 Christian Hewitt
2023-03-20 11:46 ` [PATCH 32/33] doc: boards: amlogic: add documentation for GS-King-X Christian Hewitt
2023-03-20 11:46 ` [PATCH 33/33] doc: boards: amlogic: add documentation for ODROID-HC4 Christian Hewitt
2024-04-05  8:03   ` Heinrich Schuchardt
2023-03-22 14:26 ` [PATCH 00/33] doc: board: amlogic: spring clean-up of Amlogic docs Neil Armstrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230320114609.930145-4-christianshewitt@gmail.com \
    --to=christianshewitt@gmail.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=u-boot-amlogic@groups.io \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).