Add document which clarifies how to build and install U-Boot on Retronix R-Car Gen4 V4H Sparrow Hawk board.
Signed-off-by: Marek Vasut <[email protected]> --- Cc: Heinrich Schuchardt <[email protected]> Cc: Nobuhiro Iwamatsu <[email protected]> Cc: Tom Rini <[email protected]> Cc: [email protected] --- V2: No change --- doc/board/renesas/index.rst | 1 + doc/board/renesas/rcar-gen4-sparrow-hawk.rst | 91 ++++++++++++++++++++ doc/board/renesas/renesas.rst | 2 +- 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 doc/board/renesas/rcar-gen4-sparrow-hawk.rst diff --git a/doc/board/renesas/index.rst b/doc/board/renesas/index.rst index f04fd74cb17..68b11ebb455 100644 --- a/doc/board/renesas/index.rst +++ b/doc/board/renesas/index.rst @@ -18,4 +18,5 @@ Renesas rcar-gen3-install rcar-gen3-install-hf rcar-gen3-install-sf + rcar-gen4-sparrow-hawk rzn1 diff --git a/doc/board/renesas/rcar-gen4-sparrow-hawk.rst b/doc/board/renesas/rcar-gen4-sparrow-hawk.rst new file mode 100644 index 00000000000..a1b92ecab57 --- /dev/null +++ b/doc/board/renesas/rcar-gen4-sparrow-hawk.rst @@ -0,0 +1,91 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Retronix R-Car Gen4 V4H Sparrow Hawk board +========================================== + +- Retronix R-Car V4H Sparrow Hawk board: https://www.retronix.com.tw/en/product_sbc.html +- Retronix R-Car V4H Sparrow Hawk documenation: https://rcar-community.github.io/Sparrow-Hawk/index.html + +Build U-Boot +------------ + +Please follow :doc:`Renesas 64-bit ARM SoC build environment setup <build-env-aarch64>` +to correctly set up the build environment before attempting to build U-Boot. + +Clone up to date U-Boot source code and change directory into the +newly cloned source directory: + +.. code-block:: console + + $ git clone https://source.denx.de/u-boot/u-boot.git/ + $ cd u-boot + +Configure U-Boot: + +.. code-block:: console + + $ make r8a779g3_sparrowhawk_defconfig + +Compile U-Boot: + +.. code-block:: console + + $ make + +To speed up build process, -jN option can be passed to make to start +multiple jobs at the same time, this is beneficial especially on SMP +systems. The following example starts up to number of CPUs in the +system jobs, which is the recommended amount: + +.. code-block:: console + + $ make -j$(nproc) + +Install U-Boot +-------------- + +In order to install U-Boot using write into SPI NOR, first build U-Boot +for this target and collect ``flash.bin`` build artifact. Then start the +target, drop into U-Boot shell, and load the build artifact into DRAM at +well known address: + +.. code-block:: console + + => tftp 0x50000000 flash.bin + +Finally, write U-Boot into SPI NOR: + +.. code-block:: console + + => sf probe && sf update 0x50000000 0 ${filesize} + +Bundle TFA BL31 into Linux kernel fitImage +------------------------------------------ + +The Retronix R-Car V4H Sparrow Hawk board starts both TFA BL31 and Linux +kernel from U-Boot. Both TFA BL31, Linux kernel and DT blob have to be +bundled into the fitImage. + +Perform the following steps to build TFA at least v2.14.y: + +.. code-block:: console + + $ git clone https://github.com/ARM-software/arm-trusted-firmware.git + $ cd arm-trusted-firmware + $ make -j$(nproc) bl31 \ + PLAT=rcar_gen4 ARCH=aarch64 LSI=V4H SPD=none \ + CTX_INCLUDE_AARCH32_REGS=0 MBEDTLS_COMMON_MK=1 \ + PTP_NONSECURE_ACCESS=1 LOG_LEVEL=20 DEBUG=0 \ + ENABLE_ASSERTIONS=0 + +The bundling is done using U-Boot ``mkimage`` tool: + +.. code-block:: console + + mkimage \ + -f auto -E -A arm64 -C none -e 0x50200000 -a 0x50200000 \ + -d /path/to/linux/arch/arm64/boot/Image \ + -b /path/to/linux/arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk.dtb \ + -y /path/to/arm-trusted-firmware/build/rcar_gen4/*/bl31.bin \ + -Y 0x46400000 \ + /path/to/output/fitImage diff --git a/doc/board/renesas/renesas.rst b/doc/board/renesas/renesas.rst index 6aaf1b13f29..234094a4259 100644 --- a/doc/board/renesas/renesas.rst +++ b/doc/board/renesas/renesas.rst @@ -187,7 +187,7 @@ Renesas is a SoC solutions provider for automotive and industrial applications. - r8a779g0_whitehawk_defconfig * - - - Sparrow Hawk + - :doc:`Sparrow Hawk <rcar-gen4-sparrow-hawk>` - R8A779G3 (V4H) - :doc:`arm64 <build-env-aarch64>` - r8a779g3_sparrowhawk_defconfig -- 2.53.0

