From patchwork Thu Feb 1 02:27:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 126420 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1291610ljc; Wed, 31 Jan 2018 18:27:52 -0800 (PST) X-Google-Smtp-Source: AH8x225IxYwDzHedBPQMj5Tgn9SOSrt3QBXJbmsbe8RTD5vO4nW6GqC8rkXzF4OpRhp6mbJykRdH X-Received: by 10.55.8.150 with SMTP id 144mr50095912qki.8.1517452071887; Wed, 31 Jan 2018 18:27:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517452071; cv=none; d=google.com; s=arc-20160816; b=pGfKcIZWwjOwHCPUmV7dZmbHGy0QdM+ZWEqxEcmT7ZCb6T73TpGvOqZp+awrvJFdq1 fBTyEmRuDIBJYddCChiB9uOHx37US5n99fpUdeP1gadCUHW/MfBuIag/QERbFHa+NBd4 F29c5/e3rp5bJn3dXRqbw0N8tdywJeyedp9v5vWnC784R96swmwMrGnYbUYfGLnJaShm 1Ei1fX7TRTVTHN7xSCTv2Y9ggrzKIG1vg+dAqCkDzf1c3hIvpHJZ9owJkwMiW6I9pURT OISvEACFqi8F4SGMIqayE6uzguHy1BbdsUHSUyP60sKKWmMXxw0ZsFt2VNfU4BkNJQI+ vC8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to :arc-authentication-results; bh=+gk1maZmmgJ1YDZ2mcP7kxBuYMeHTakIrjfnmPWpro4=; b=xDUOvgUycOeO9yBa1UlnubGjs5gU+5WRwVDShuGBzERwp4vNwQWfJt/xQ24btAUoQ4 2A0A5cqfdag5jFLgUtsRDBKNS8IFFdElJhMyx/u+35Xi0cJwsi4zHr6eTY7a0HlWJr0b y3s4By6eCa76UJ0ctnFa3J4ya8323jY9PzmIHa3PULPCDNhEkmNYRP6XqOZjdL5JdOn/ A58m2glIwZJM28KLbCZKkjwMS0iwwmxijlNKPmBJAVo2UH3eNk7QVEuNQ23WXivPjz8p PrbrdsngVrR3tY2g1hXvPHh4gd+V+dC1hwt0nkopVxhSrCdYZlmsxT5s/IzEBtq4flE/ MUuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id l189si3542411qkb.172.2018.01.31.18.27.50; Wed, 31 Jan 2018 18:27:51 -0800 (PST) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 6347F61698; Thu, 1 Feb 2018 02:27:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 149A560834; Thu, 1 Feb 2018 02:27:47 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 6C3F8609A8; Thu, 1 Feb 2018 02:27:45 +0000 (UTC) Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by lists.linaro.org (Postfix) with ESMTPS id 4FB2860834 for ; Thu, 1 Feb 2018 02:27:44 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id z17so11650129pgc.4 for ; Wed, 31 Jan 2018 18:27:44 -0800 (PST) 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; bh=QR5o9WOOja5KcxzPqZ1/9WJB8eoRJzwawSyr1o8AA2w=; b=pzfz8essawipCquI00+aPYVeCCdrMmWG98KCXc4eUntsRXk/eFC5URU59hd/PYPrdh u7dijeDFzTOFxqymLWyRsNan2xqeA4WpDR9AgxWNQR3/9JL/tx4KAP4qredPCN/04KO0 8TAZ423Z1SNHRUipaCWYJhhtWOWE9sSsi1lLgvsb7ZXeLwOp/svR62tzxb+25QXjFRE8 ZCYD34yiwp5uP/efzfLdvvk0io27nungtIyvfcyvg+qavsEGa8yoVkUd4O9PWpa8nuPx JD8HA8vID8ygRp61rWT/mgMF2tkWi4fS9iZzH82ooyH7GZPJwTlXFNjmQaoB2/Dx+Uo+ nIBA== X-Gm-Message-State: AKwxytdHMn70hCniWRfrC669xyzUnyWB7FD+HGnxD8h7ECez5wpGCiiG 8YhBi9VLrPgkuEwUNng3s7MaYh7tyXupRg== X-Received: by 10.101.77.144 with SMTP id p16mr28557776pgq.106.1517452063562; Wed, 31 Jan 2018 18:27:43 -0800 (PST) Received: from localhost.localdomain ([45.56.159.147]) by smtp.gmail.com with ESMTPSA id c83sm849064pfk.34.2018.01.31.18.27.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Jan 2018 18:27:41 -0800 (PST) From: Haojian Zhuang To: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org Date: Thu, 1 Feb 2018 10:27:30 +0800 Message-Id: <1517452050-8127-1-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [Linaro-uefi] [PATCH v2] atf-build: migrate to bl2_el3 X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "For discussions about Linaro-related UEFI development. Not a substitute for edk2-devel." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" When migrate to BL2_EL3 in ARM Trusted Firmware, bl2.bin should be built out of fip.bin. Otherwise, non-TF ROM failes to load bl2.bin because it doesn't recognize fip.bin format. So copy bl2.bin to UEFI folder after ATF built. Signed-off-by: Haojian Zhuang Reviewed-by: Leif Lindholm --- atf-build.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/atf-build.sh b/atf-build.sh index 65d4dbc..234ddde 100755 --- a/atf-build.sh +++ b/atf-build.sh @@ -182,9 +182,17 @@ function build_platform # Copy resulting images to UEFI image dir # if [ $VERBOSE -eq 1 ]; then - echo "Copying bl1.bin and fip.bin to "$WORKSPACE/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/"" + echo "Copying bl1.bin bl2.bin and fip.bin to "$WORKSPACE/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/"" + echo "Copying images to '$WORKSPACE/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/':" + CPPFLAGS="-v" + else + CPPFLAGS="" fi - cp -a build/"$ATF_PLATFORM/$BUILD_TYPE"/{bl1,fip}.bin "$WORKSPACE/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/" + for file in build/"$ATF_PLATFORM/$BUILD_TYPE"/{bl1,bl2,fip}.bin; do + if [ -f "$file" ]; then + cp -a $CPPFLAGS "$file" "$WORKSPACE/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV" + fi + done else return 1 fi