From patchwork Tue May 7 18:52:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 375 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 8BF533F085 for ; Tue, 7 May 2019 20:53:23 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id 93sf7983959plf.14 for ; Tue, 07 May 2019 11:53:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1557255202; cv=pass; d=google.com; s=arc-20160816; b=ffqWJWagJrtDTgM0bxpFNie9CCS5/MLhVCNaP+DYD7fF+NGemakLisP8QHAYFehNOU 5J5A7sqtLGydvDRg5elB2CJ+ieB0MklFCUV87Ow75c30hO0LDKWo4kAK9htsPSjTZ03I 6+EhzyWds/OOHvT8RayZVqC9N0cUvzki085BvQnbTkYZTORAYODSjVRSFx2gbqbpjWC6 L52llfKsZYrQ3rJg9Uh/MFFabpPIlpf6AQVgbb5x/6GxKllbmplZ2Yi953oFevTdy4Bj 3v+bRMzSjxmOSdPQK6kHxQcZ0mhm9fr6dk0vvhbW8RrLXWV/f4iDTNku5r0smSlvOepe LwjA== 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=RwB7xc8BrkumiUKIlQlfvtx3+v+1/zIvqxfD2RQpiJ4=; b=da3w6pD63jHBCwq1vP0Jf1LcVy1h+/s7HmZOtV5HxkhqBrSStK+Vel25s7RNSEuOw3 iYNXH/mjALRT7bkJ0FjE1BvYueTxDmO0lC+yUi1E66Ed3jmeOGiSQ9Bhue8y+oH8AHGe Vt1fNn5p984d3G3dF/XwZJM4wiIt3dBbxnTWk6t2F2MUtAoFo/2vpDw6dQ4Nj/shbkXD Uss9P0JyhrcrJYAtGKUS4BUxHNHVjBzG4VTMto1RlPnO6n55N8aARdj0VUaV9T26Gfmy 3ZOczA/bYwKC1HAGRrDpoM2OVFQ6GnpjZLRuQAoxTXNrbvt1XUSJ4cvgZLtptW1eRx6Q ddhg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=i6eOFKkZ; 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=RwB7xc8BrkumiUKIlQlfvtx3+v+1/zIvqxfD2RQpiJ4=; b=j8b41fHWsona7FjG6LQag9igdvmzfAklwJrLfQ1F8tinDUAb/4fVjzR4Qo4e7dc5y4 u6CusmWJDtNQjxheGzRqvSp2hW37CF66KlhCJmxxp+WXONM5TXxVgVusGa8XBoz6zwRq lZcCVNtezCoZc3H8jYWWo7qqQNNarQ8MGyaW8= 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=RwB7xc8BrkumiUKIlQlfvtx3+v+1/zIvqxfD2RQpiJ4=; b=VDfxIITrxpS7RZgVOwJkCG4SSFtFSBXGfISitdgQNOEw2KKBHk+1VjSHBsZggSc7+e GOM0+8IoVvSL0kYPKq5Rvk7Y2eiEpQHGIoji2xGjZSNeVqG0bOFZpUaOX8t8uiDrpumL b46Pj/Y6CHvUU6Tfean/PlROkyFokC64AuxGNS8YHrOHtijaL9kwLiB9UEMCo+3LYvOv E8l/9LZGyggXVjD/BvaWVxVdlpAEQ5hA3KLZrYrkXRBH9qg2DNhmrEg1cuji5f+bToaZ Jjszv7T+VayCIQ+kB/syUtCUUpsdftebEO9N+Nzs54WlQBKE6QyOFxoBa2r5CwjfOqBZ 1Hxw== X-Gm-Message-State: APjAAAUZrWgNjIURP7QNC94btG1l5WUw8uHmhJMz7Bl8yyX4Kyg9rvBj 6ard1oIu4pGAdHmKIn6bQ/jkGzbn X-Google-Smtp-Source: APXvYqyQGENrvEIFcCCDw8foclbAJAAE2Gccg+jUk3oEaBIIDhD1iQzCKpr3OrOBmJya8/ETxPeLHA== X-Received: by 2002:a17:902:f20a:: with SMTP id gn10mr41559148plb.90.1557255202383; Tue, 07 May 2019 11:53:22 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:8085:: with SMTP id v5ls4705271pff.5.gmail; Tue, 07 May 2019 11:53:22 -0700 (PDT) X-Received: by 2002:aa7:8212:: with SMTP id k18mr42487144pfi.50.1557255202019; Tue, 07 May 2019 11:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557255202; cv=none; d=google.com; s=arc-20160816; b=zyzRCPiZOzTEOu/+7bJBQrP8vl6O0D327UChb6qrR6NVFXQGrBQ/8ETN1G8rO3JSh7 mWKyVWXiSQjrCwXiCbxTWSVf84XAPKT6jIDIckbPBFGFAyZRf79VWViLtdTlqTu7BeMR 0LB/TFCXQTTxQRsJj08ojNJ+RvQx79w8rSxIQUYMRYuEgIBRnkZ4sXXUrDC1SLcTNTCv D1OEkWx1vR6AgCy8AGqWKbueZucDi9x2CwAJP5cZlwL7i3bXP7NuBuvJDTR/barGTGGE 0z8ZIgIutB07VRtLPEg2U1VgkSwx3an9bCZFW0DwevvZREOw7Qc3k5qwCPZkC9ItSmdO eckQ== 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=ImNKcjJPl5FDOV/JNbJNwcLPUBrNQElhulqr/rR/aLM=; b=kDJdbmO8+cniofZLbQq1IhZSAa5GSX+ZzsIZzHbTdvaOd38w58L+yfuHIVahew0OZE KRDX6PKXH44DxTT0M4o35tatr+sIObt3e77uD65QVm2uXcCCT691jMKU8JYizlAuiHmy JJ9fmnxuIqWfULD/3HdrpylDB1akFlwWbxu6mpqA3a/mNgtlkMHKZCPhkYyUZXqCquWH rWHCquVD2aezUecO9Mrb4udrC6bvQCb1IQfSL14iafAqq19/i3LYltkW1q4C5rP4cAC1 QqVPWkjBR/RdXFnhl7P/ruaIpZSkKTspERgCzAaKgAN0bMDLwYSafpdH/ffPAFswzQq6 wJEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=i6eOFKkZ; 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 o5sor5400501pgo.4.2019.05.07.11.53.22 for (Google Transport Security); Tue, 07 May 2019 11:53:22 -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:a63:1d1d:: with SMTP id d29mr13318423pgd.63.1557255201725; Tue, 07 May 2019 11:53:21 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id l83sm14668086pfi.150.2019.05.07.11.53.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 May 2019 11:53:21 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang Cc: linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de, Jagan Teki Subject: [PATCH v3 4/6] rockchip: rk3399: Get bl31.elf via BL31 Date: Wed, 8 May 2019 00:22:13 +0530 Message-Id: <20190507185215.15441-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190507185215.15441-1-jagan@amarulasolutions.com> References: <20190507185215.15441-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=i6eOFKkZ; 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. 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. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- 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 64c7976f7e..c5078b95b7 100644 --- a/Makefile +++ b/Makefile @@ -1814,7 +1814,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