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: 10919207 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7C18B912 for ; Fri, 26 Apr 2019 13:34:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6947C28BAD for ; Fri, 26 Apr 2019 13:34:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D89F28C42; Fri, 26 Apr 2019 13:34:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0E44428CC7 for ; Fri, 26 Apr 2019 13:34:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1G6jihYoVY6Jd7FdBTkF/1YKgRjrdaAfF8ZMPW1SZpQ=; b=Sb/jPfmUoggcqL IPOqfVFISHKVK78qoKsMsxi1I/+iwTcWP+JmY1Wrw891z3gExRSDDTAth8XMmEzIH68tvfvfdfIQ6 xy/zUXb2WCsWCRBXEZtYI1BDSjS+oSVpBTvtmfErgz1Lac0dmsJVB8pq3wo+q2lDbsgjVlFzCYWKM 9dVPwIxozasViSkBOUIahCHGHUuf4gG/KDirnetMsJBysaxRoXdjgv/X4IvcXwIJ7m/OpLKESBRl6 qw5LEmOxpGTYdnESd+5eACQjfPeyIyf8Oci8srYeE6E2OoHZ0MhravBivgYMcLISkfa+k7ZfR0LnA gH17gotNH1bT3GY4sRcQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK10A-0005HC-1O; Fri, 26 Apr 2019 13:34:54 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK107-0005El-K4 for linux-rockchip@lists.infradead.org; Fri, 26 Apr 2019 13:34:52 +0000 Received: by mail-pf1-x444.google.com with SMTP id 188so1739179pfd.8 for ; Fri, 26 Apr 2019 06:34:51 -0700 (PDT) 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:content-transfer-encoding; bh=rlO5qGYy6kjT+AKhiquK187CEtLKOidUD7eBDX9VmMA=; b=fv6iqiY3vqiX6p9qN7h53EyhZlkqqaCtWQ2vwqtJ64+ftqv8XcTxRflQHoKHvS0dbw KRFk38auPgbtgQUEirEwAFhiDZBj/4HImYuxz6HW0y4nXmh8b+SqdVZeX0aKufdodkMG k3FvFhrxaLi/KtyXHauzKgPhdoqA2rhr/tVM4= 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:content-transfer-encoding; bh=rlO5qGYy6kjT+AKhiquK187CEtLKOidUD7eBDX9VmMA=; b=BIRBP+y2pCWO130Fn9Ao93bK763gYzKCBKBe//LtLqce/yIq6NGubh9gtdZkO2U1ED SN860DwsUEC0wBOvrYxhiqYp81c+19yiPKEMPrUSYWr3aICtDazV11gt17hSBWlGuHI4 iLZh5CHS36hyP2Z+5BS/h9S+AAURriHmPuVh11CmqumuI/SOlE+iJ4AFvytAAnwvZpZD 85tr4CjFZG5vqpYT+yiqzDISI+MRuVrXR8xLFG0MNYZ1NOAP0NIM0tQWcRJ5MWudfGAp DiZ5Ue8aw7BdeapzaAQKRi3D3LXRRvwLj+A7zpf67GuVa/ARvlPh3Q0YkGJQiRtc0T6s jKpQ== X-Gm-Message-State: APjAAAVJrHK5xRhKCTABHB4J1C61pY8YeB6Z3XjUy7Lho5YPd9coLeJj GFIEaoP68dLs9YBQ7PMm3OR6rg== X-Google-Smtp-Source: APXvYqzBuceABntJltOnulpc53413kx1N6Heyg6GzdX/DW4Iy0Q5tJjSnNEU7MzoohiWynX2xzd0QA== 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190426_063451_658688_B42AE26A X-CRM114-Status: GOOD ( 10.14 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Kocialkowski , linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , u-boot@lists.denx.de Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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