From patchwork Fri Apr 26 13:34:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 264 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 142983F033 for ; Fri, 26 Apr 2019 15:34:54 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id i35sf2025801plb.7 for ; Fri, 26 Apr 2019 06:34:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1556285691; cv=pass; d=google.com; s=arc-20160816; b=m4/LF4cYBx4ZtzQtaOPl4mOE98SHIRprUqDU8NhyIa0GBUp3yDwGE0HkX0AcJjZgC2 TNbJIBQ8zokr+su+hz0MU1rKWaUxNXfPqr+hmhh6/wG0TQfLaF61Yx6rwKL7rhwor7Ml zFTAWY6xf9P/VQQi8KqOnAgP5zTw77zNdmdMP1cbSstLirut9kapaFvuqxWKAyJcFmbP sGzErKyFlo4IwoQsSGF3xaqis9uDi9PL8lpDRuZjEY3pXsLd7wtSixxLv15ICBwUd1xP djpYjuDEEAykJWE7lpsGiWbYhkCC6E3v3QgNH7AWyRxFChhY3Hr6EG2ffB+bnFiduu3h 0bnw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zSETp9SXFGrIEzRbMH1N7kecwKLCIeExBvhupcyjm+s=; b=z3XZ1quJeMtxHWZd5i/Ft2vvn3X1/O9Kd6wlxvlASV3Uk/xpZXaV5/dXQ05M9Aj8z2 p2PaCxaC93mbwHZwKTSe59HhJnEMStFaq/kQfUAyDvJpo0G8dbAAgzxv8GOhyLptiCdt UNfXDIGkO8enP++ema/s3Fy0A+VKkDwu/O4TcDjDYpGC4V/u0HUd+lCiz0dhuXP84MV1 YZ5AGG/I1mxCLGJjkpWLNGGmPdUTx6RpLVpqZTsvYmAVcGF2uTTHe458yRyZOMvIPN1/ 0BtzbPsTFYG+x+4aLNgqOTNSO4QGHzkHkDs8D8rpoN+A2L2//gzDwz/dMwcyfyd41OtE QK6g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fv6iqiY3; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=zSETp9SXFGrIEzRbMH1N7kecwKLCIeExBvhupcyjm+s=; b=Xy7Uj6bMsCfgtjTW4mMhttLVUUbsv+JuMJxwmawZzxjLoZYRRuESq8O7vlA1G0qIAk /YPV4TkZne9vOpjWmja5YcfUCeVlL80vCVQ3yQ9I8tAKhymIWuitUTWVKGIg+B5BE4Dz DHfq8h/Qz4s5PgBRIRxxQsv7BHa5VR/13YFp8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=zSETp9SXFGrIEzRbMH1N7kecwKLCIeExBvhupcyjm+s=; b=HbuddP8s8fvDnj/hjO1YPIy/WaAUS7eYqs0btPXnCqKkrqQiJ2QFsmE1AB4L+OZJjK dex//19umZF8P0qiuJ7rPmWoqykL9wylYUhxCXDsGn6wF/mzXAg2pwI0l8Xzp/HtBnt0 IQGOzEDidtb3efU1v/aEmyxGhgL5yWGHDwlYElbMTtmEgTeN1NamvVQZiZIYYcN3t2bv JKRKzlv4qa1s9NNR0yJFDg6GVw2wLQrOyoejvVJKgGplcxa69uF/OXdwwrAagSZi0Ext +ZAqNB18+beF3+fy09GQqOYBWHm6lIQWZOsMa52kjjVVwqu4OKsPuY3ABmg3VFnhpuLQ 1lbQ== X-Gm-Message-State: APjAAAUE/Smq1hJ0g5rvdbtm94OFUSthviBm2k5r9N1i0QKFneOW44wG dRPvBy7KZIK43ZoPcBVhoBFcjxNl X-Google-Smtp-Source: APXvYqwq0yFA7OBdQQhOUnfNs+0V5KTqHD5MhCJK3DOCcm5ndups5eUEOTVpttHAjn77CnR/vAF7Gg== X-Received: by 2002:a17:902:b589:: with SMTP id a9mr21642242pls.66.1556285691414; Fri, 26 Apr 2019 06:34:51 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:4104:: with SMTP id o4ls2760015pfa.4.gmail; Fri, 26 Apr 2019 06:34:51 -0700 (PDT) X-Received: by 2002:a63:8bc9:: with SMTP id j192mr121415pge.212.1556285691056; Fri, 26 Apr 2019 06:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556285691; cv=none; d=google.com; s=arc-20160816; b=SFtUiRwkYDa443qxBTZXTjNz2CZoSGrwRl99zCvq8ihPk0FSGKBeHvpI/1Ocwnlsx0 bzvZKXq1mUd3QcZ7UhVeKFDolwCWzQAgYDIgpiedb4yvYkK9W/IUL/bmRF/GWytduY5T U/f0rOKYhFugg1NcqDfiocAuBQdSadYHdjX5h+09sV3tZEG69g1WrcD8nrNKpMFQOVn+ ehwX473EUYhjq1S4IvU+g4hP2HEe6U0l3QWo54P9GQcKhMsRHmEe2Bgb13vPsVRUoDpo /ZuL20hPYHsFEJouwJACAJ7DSLwH4dQtn17v8OLwe6U05wpB5kUOjHlSA8B8EwtAiKIS gUaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=rlO5qGYy6kjT+AKhiquK187CEtLKOidUD7eBDX9VmMA=; b=SzcDjnrk/ZIXuUhYJRI3nS1Un/ixrn06tHl7hR99a6aEc7+J1yht5WdFfru8bD1zkT oSCwVRHluWrJgeySwU4WUOMHc8YVgpeMT9sxWXHw07T61QRARb9DduG+Gglg9GoM3Jd2 i1ius3JglFfda5nhm7KS0fxWdHsu9YgHulcuaX1QHonIr+ImnVplr9zcqH8Zz2an+qe+ PrkLp5Vv1kjdlyN4FdTykSEzoOnq2YsJt5MCkyNIl/AB8QYgvuIa9jrIlY5bSuwj3ADv zE/S7nD5yk8LEZOoc6eT1rtyvfwWGiOBsbwlS4n19yJqaT2K9jxLkiX6Rz2TMBYSO5Wz yMxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fv6iqiY3; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id t11sor595964pfh.36.2019.04.26.06.34.51 for (Google Transport Security); Fri, 26 Apr 2019 06:34:51 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a62:4115:: with SMTP id o21mr46870056pfa.153.1556285690767; Fri, 26 Apr 2019 06:34:50 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id y19sm36946770pfn.164.2019.04.26.06.34.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Apr 2019 06:34:50 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , Akash Gajjar , Tom Rini , Manivannan Sadhasivam Cc: Paul Kocialkowski , linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de, Jagan Teki Subject: [PATCH 2/5] rockchip: rk3399: Get bl31.elf via BL31 env Date: Fri, 26 Apr 2019 19:04:27 +0530 Message-Id: <20190426133430.17802-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190426133430.17802-1-jagan@amarulasolutions.com> References: <20190426133430.17802-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fv6iqiY3; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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