From patchwork Sun Apr 28 09:09:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10920855 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 9CC42912 for ; Sun, 28 Apr 2019 09:09:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62B5C1FE8D for ; Sun, 28 Apr 2019 09:09:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51F6C2875E; Sun, 28 Apr 2019 09:09:51 +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 9B1192863D for ; Sun, 28 Apr 2019 09:09:50 +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=6aa5LLmsm+Zrm5wu8boixRR6jKosQUIisjgX+AjWP0E=; b=WYEiYZ5u3ZNO1R +RTpRN+DaDr8b1PK+R7Ht+r4vJy6eDIC/KwlYMIxEUlL8oCE+mGtauw5AnzFASlhPIjyj0WJHA66I NvdPdMrcv/1Ra0qxH6eVGxUj5kL/e+T8R2e95WvRJTDWmN1dS1Mccb7EpKDyT1Nbg5lzQfCUs6v76 9xAR3aWNuLubIWlGTbbpz8XcABrqWQ82qeZxySdRGRC0xQpO8YpQrF/AkDI7ANEtbF0whoFz+6r4b PZg8NdULcmzI/pplMSOfV27wPfqSBolDEMyXcb47JqsQpD+k6P5f5UtHZHe5uQq040boLJwGYlT3j uRZfthR5NLXMdEW4YUPg==; 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 1hKfoi-0000xH-ER; Sun, 28 Apr 2019 09:09:48 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hKfof-0000w5-A4 for linux-rockchip@lists.infradead.org; Sun, 28 Apr 2019 09:09:46 +0000 Received: by mail-pg1-x542.google.com with SMTP id z16so3693133pgv.11 for ; Sun, 28 Apr 2019 02:09:45 -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=Ksp0RJAO0k4pfRprgoggQ+F3/fOSrjeMTlEOTKA44MY=; b=PYlanwSaPXOB/LraCejmiQi3WIv28GKmrh1BXgIqi2L5xlROeSlxSB5nY0Xab7PRLz QrgXBbiqvL9DCg+VKj3x9IuvjhBCUTDclNePCFKkT0XAiDacMIo/gxht969D6L/GqIbI EATuCok56CrQUgqFR0WuFpKmRyPTAR4POU/Tg= 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=Ksp0RJAO0k4pfRprgoggQ+F3/fOSrjeMTlEOTKA44MY=; b=N2jhGBZv7Om3/A1K0L0I2R74h6WIiOG973AKO/ErdJHCOnnZvird/OZL2hhFeekoCz i2CYf8haT3+0tCdOOlQR6A7siLkrAISljTKa2zlHJiXtUPYSUWeBHDwqebxH7n+Llt+H B2ZNT21UnfgfTTYz0th+F7SXL7tgBtIhSjK/lftNcPKH5Ox/BJv+cyIrkXTF2RtidCFW prAV32PqYpiCy06B0rHX7vDLxd1t/NprKoI0qvrnd7ef5AfmHdiTPdwKZ4Jbyx8C5Y8a afY/5rWVaMFrecNfIb3hlV3ZoGEjXf0zzrVsztOvyUA0MjhHodUkaYAuuf1ZfVJCs+Pd t59w== X-Gm-Message-State: APjAAAWs7Vuaqnoh1DM+Glg+TW/FC4g/4hH4YsjFQ3iE3LbnQ9/OJADd 4YwSxa87RB0FBhVC8HvDqKRFyQ== X-Google-Smtp-Source: APXvYqw2J9p/mzfctB7/jaFBSOrpJ0WJqsw704s9YdG66TOz9bAF+If2uidFb9+/Q38fVAKGNSVcgQ== X-Received: by 2002:a63:e004:: with SMTP id e4mr53483625pgh.344.1556442584814; Sun, 28 Apr 2019 02:09:44 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id k7sm3040338pfk.93.2019.04.28.02.09.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Apr 2019 02:09:44 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , Akash Gajjar , Tom Rini , Manivannan Sadhasivam Subject: [PATCH v2 4/9] rockchip: rk3399: Get bl31.elf via BL31 Date: Sun, 28 Apr 2019 14:39:08 +0530 Message-Id: <20190428090913.10568-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190428090913.10568-1-jagan@amarulasolutions.com> References: <20190428090913.10568-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190428_020945_347263_CC21669E X-CRM114-Status: GOOD ( 11.45 ) 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: Emmanuel Vadot , u-boot@lists.denx.de, Paul Kocialkowski , linux-rockchip@lists.infradead.org, Jagan Teki , linux-amarula@amarulasolutions.com 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. If the builds are not exporting BL31 env, the make_fit_atf.py explicitly create dummy bl31.elf in u-boot root directory to satisfy travis builds and it will show the warning on console as WARNING: BL31 file bl31.elf NOT found, resulting binary is non-functional WARNING: Please read Building section in doc/README.rockchip Note, that the dummy bl31 files were created during not exporting BL31 case would be removed via clean target in Makefile. Cc: Emmanuel Vadot Signed-off-by: Jagan Teki --- Makefile | 2 +- arch/arm/mach-rockchip/make_fit_atf.py | 11 ++++++++++- doc/README.rockchip | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ba0cce9f33..2471340c71 100644 --- a/Makefile +++ b/Makefile @@ -1782,7 +1782,7 @@ clean: $(clean-dirs) -o -name 'dsdt.aml' -o -name 'dsdt.asl.tmp' -o -name 'dsdt.c' \ -o -name '*.efi' -o -name '*.gcno' -o -name '*.so' \) \ -type f -print | xargs rm -f \ - bl31_*.bin image.map + bl31.c bl31.elf bl31_*.bin image.map # mrproper - Delete all generated files, including .config # diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip/make_fit_atf.py index d1faff1957..327875d87b 100755 --- a/arch/arm/mach-rockchip/make_fit_atf.py +++ b/arch/arm/mach-rockchip/make_fit_atf.py @@ -10,6 +10,7 @@ usage: $0 [ [ bl31.c") + os.system("${CROSS_COMPILE}gcc -c bl31.c -o bl31.elf") + bl31_elf="./bl31.elf" + logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) + logging.warning(' BL31 file bl31.elf NOT found, resulting binary is non-functional') + logging.warning(' Please read Building section in 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 ca4d6473b0..98a3824e2c 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -149,8 +149,8 @@ For example: => make realclean => make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 - (copy bl31.elf into 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 PMU M0 firmware