public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] rockchip: rk3399: Get bl31.elf via BL31 env
Date: Fri, 26 Apr 2019 19:04:27 +0530	[thread overview]
Message-ID: <20190426133430.17802-3-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20190426133430.17802-1-jagan@amarulasolutions.com>

Right now rockchip platform need to copy bl31.elf into u-boot
source directory to make use of building u-boot.itb.

So, add environment variable BL31 like Allwinner SoC so-that the
bl31.elf would available via BL31.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 arch/arm/mach-rockchip/make_fit_atf.py | 5 ++++-
 doc/README.rockchip                    | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip/make_fit_atf.py
index d1faff1957..99cf6f43dc 100755
--- a/arch/arm/mach-rockchip/make_fit_atf.py
+++ b/arch/arm/mach-rockchip/make_fit_atf.py
@@ -194,8 +194,11 @@ def get_bl31_segments_info(bl31_file_name):
 
 def main():
     uboot_elf="./u-boot"
-    bl31_elf="./bl31.elf"
     FIT_ITS=sys.stdout
+    if "BL31" in os.environ:
+        bl31_elf=os.getenv("BL31");
+    else:
+        sys.exit("ERROR: Please export BL31 file, check doc/README.rockchip")
 
     opts, args = getopt.getopt(sys.argv[1:], "o:u:b:h")
     for opt, val in opts:
diff --git a/doc/README.rockchip b/doc/README.rockchip
index e8f6a2dfba..0db4771162 100644
--- a/doc/README.rockchip
+++ b/doc/README.rockchip
@@ -138,8 +138,8 @@ For example:
      => make realclean
      => make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399
 
-     (copy bl31.elf U-Boot root dir)
-     => cp build/rk3399/release/bl31/bl31.elf /path/to/u-boot
+     (export bl31.elf)
+     => export BL31=/path/to/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf
 
    - Compile U-Boot
 
-- 
2.18.0.321.gffc6fa0e3

  parent reply	other threads:[~2019-04-26 13:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-26 13:34 [U-Boot] [PATCH 0/5] rk3399: make u-boot-rockchip-with-spl.bin Jagan Teki
2019-04-26 13:34 ` [U-Boot] [PATCH 1/5] arm64: rockchip: dts: rk3399: Create -u-boot.dtsi files Jagan Teki
2019-04-26 18:00   ` Paul Kocialkowski
2019-04-26 18:09     ` Jagan Teki
2019-04-26 13:34 ` Jagan Teki [this message]
2019-04-26 13:34 ` [U-Boot] [PATCH 3/5] Kconfig: Add u-boot.itb BUILD_TARGET for Rockchip Jagan Teki
2019-04-26 13:34 ` [U-Boot] [PATCH 4/5] Makefile.spl: Create u-boot-spl-rockchip.bin for rk3399 Jagan Teki
2019-04-26 13:34 ` [U-Boot] [PATCH 5/5] rockchip: rk3399: Create single image using BINMAN Jagan Teki
2019-04-26 17:52 ` [U-Boot] [PATCH 0/5] rk3399: make u-boot-rockchip-with-spl.bin Jagan Teki
2019-04-26 17:55   ` Paul Kocialkowski
2019-04-26 17:59     ` Tom Rini
2019-04-26 18:03     ` Jagan Teki

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=20190426133430.17802-3-jagan@amarulasolutions.com \
    --to=jagan@amarulasolutions.com \
    --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