riscv: add a generic FIT generator script
authorLukas Auer <lukas.auer@aisec.fraunhofer.de>
Wed, 21 Aug 2019 19:14:47 +0000 (21:14 +0200)
committerAndes <uboot@andestech.com>
Mon, 26 Aug 2019 08:07:42 +0000 (16:07 +0800)
commit89fe196c996f1974640841cd7a3d905e5030ffcc
treec36752819c1668f75b3802d664a5e0a3416c41c9
parentc7e1effb965a3ec7e33d8e83925f04636771c91b
riscv: add a generic FIT generator script

Add a generic FIT generator script for RISC-V to generate images
containing U-Boot, OpenSBI FW_DYNAMIC firmware, and optionally one or
more device trees. The location of the OpenSBI firmware binary can be
specified with the OPENSBI environment variable. By default, it is
assumed to be "fw_dynamic.bin", located in the U-Boot top-level. Device
trees are passed as arguments to the generator script. A separate
configuration entry is created for each device tree.

The load addresses of U-Boot and OpenSBI are parsed from the U-Boot
configuration. They can be overwritten with the UBOOT_LOAD_ADDR and
OPENSBI_LOAD_ADDR environment variables.

The script is based on the i.MX (arch/arm/mach-imx/mkimage_fit_atf.sh)
and Allwinner sunxi (board/sunxi/mksunxi_fit_atf.sh) FIT generator
scripts.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
arch/riscv/lib/mkimage_fit_opensbi.sh [new file with mode: 0755]