]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: k3_fit_atf: Add support for providing ATF load address using a Kconfig symbol
authorAswath Govindraju <a-govindraju@ti.com>
Fri, 4 Jun 2021 16:30:31 +0000 (22:00 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Wed, 9 Jun 2021 16:53:44 +0000 (22:23 +0530)
Add support for providing ATF load address with a Kconfig symbol.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Suman Anna <s-anna@ti.com>
Link: https://lore.kernel.org/r/20210604163043.12811-2-a-govindraju@ti.com
arch/arm/mach-k3/Kconfig
arch/arm/mach-k3/config.mk
tools/k3_fit_atf.sh

index bfbce44bfa5938881a1d801e05484bf216e2b1e6..21b2fc2230d423439aa49362e597c652f404b2b4 100644 (file)
@@ -147,6 +147,13 @@ config SYS_K3_SPL_ATF
          Enabling this will try to start Cortex-A (typically with ATF)
          after SPL from R5.
 
+config K3_ATF_LOAD_ADDR
+       hex "Load address of ATF image"
+       default 0x70000000
+       help
+         The load address for the ATF image. This value defaults to 0x70000000
+         if not provided in the board defconfig file.
+
 source "board/ti/am65x/Kconfig"
 source "board/ti/am64x/Kconfig"
 source "board/ti/j721e/Kconfig"
index 41fee2b5a172caa1ac8028cdfd487a21825b0484..6744890682048a2b95f00265e926b18273be7717 100644 (file)
@@ -67,6 +67,7 @@ endif
 quiet_cmd_k3_mkits = MKITS   $@
 cmd_k3_mkits = \
        $(srctree)/tools/k3_fit_atf.sh \
+       $(CONFIG_K3_ATF_LOAD_ADDR) \
        $(patsubst %,$(obj)/dts/%.dtb,$(subst ",,$(LIST_OF_DTB))) > $@
 
 $(SPL_ITS): FORCE
index 4e9f69c0878944fd912cb7b5c6babc07892efdc0..2c0287a63394773b1660b4b1565dab6890ac3db7 100755 (executable)
@@ -5,7 +5,7 @@
 # ATF, OPTEE, SPL and multiple device trees (given on the command line).
 # Inspired from board/sunxi/mksunxi_fit_atf.sh
 #
-# usage: $0 <dt_name> [<dt_name> [<dt_name] ...]
+# usage: $0 <atf_load_addr> <dt_name> [<dt_name> [<dt_name] ...]
 
 [ -z "$ATF" ] && ATF="bl31.bin"
 
@@ -40,8 +40,8 @@ cat << __HEADER_EOF
                        arch = "arm64";
                        compression = "none";
                        os = "arm-trusted-firmware";
-                       load = <0x70000000>;
-                       entry = <0x70000000>;
+                       load = <$1>;
+                       entry = <$1>;
                };
                tee {
                        description = "OPTEE";
@@ -65,6 +65,9 @@ cat << __HEADER_EOF
                };
 __HEADER_EOF
 
+# shift through ATF load address in the command line arguments
+shift
+
 for dtname in $*
 do
        cat << __FDT_IMAGE_EOF