From patchwork Thu Feb 8 09:19:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 127274 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1298573ljc; Thu, 8 Feb 2018 01:20:25 -0800 (PST) X-Google-Smtp-Source: AH8x227X3JCoQt71joVO8EvfQA0aS5gRST0eK9YPlNW0vBOsQrBqPH2X9lwGIqurC2B+hldtCcle X-Received: by 10.55.105.194 with SMTP id e185mr6009qkc.350.1518081625399; Thu, 08 Feb 2018 01:20:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518081625; cv=none; d=google.com; s=arc-20160816; b=IUsDUZnqQMPhr+eX+Z8ghrWIYNasxFHT/HKzAtYIsCYDq82WwOR5ECE5/W5eEDyjNe OS+mMQuwj/aqnc6PpuFV7UjZkim2ZX11z9/0nrnF2xE5UuN0E/SjR+u++r0m4V0+Logt kvND36nbu3FHuHp7UBAneo20M7Osf7Wjz86SHbeXlMLzFHpySny//f2x9aHt/KizLSw3 +zOE+ULUOgN4Drz/6jznn+LtutXWh/CFAqGneJNqHOwBSDihCtk+jcodcvGaentmIfc3 iZchKkk8wpi9bRc/HBPdoQfrQ1mYlsfXRcOccmQYxDK8OhYD60fjNd/LTKZMa1QWQw+2 qPhw== 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:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=gUHexAz3jkqH/FIvzhBVRzN9Qd9y/F1172IZ74G1vN8=; b=S+MCqkKCT/EpEQ4JcrMYG4Vnf6WVKaXxR0985ZeEFj+s0dEg8gel5ermBMIxbaFYbc NEQvDDCkaDJ8KE8mbTzqOjfWBcIUoCdLumLO9ALNywh3SplOHgOL3yX4BEsiDd/Bs+6L TpGwOoy6Fs+RH4w8SiSg7ahisUOwYrKgyFnb0t4cfgq3nfxsOmoace7n9xkWMfm2PPeW V0iybCAKI/6wd81DdHoalqE7L8qgqyy1RNXsBq8k2iN8chtk+DZCTy9FzwklbY+EzJJk xjukJN3DVQjnA733OyvIVEda4dLzbhOy6qE2X3F1jo52znik8LXktsqBN2/R5nkArxho 5f2Q== 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 l128si1871340qkd.230.2018.02.08.01.20.25; Thu, 08 Feb 2018 01:20:25 -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 1271360B17; Thu, 8 Feb 2018 09:20:25 +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 5527160670; Thu, 8 Feb 2018 09:20:20 +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 3895C617B7; Thu, 8 Feb 2018 09:20:14 +0000 (UTC) Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by lists.linaro.org (Postfix) with ESMTPS id 9CF63617B7 for ; Thu, 8 Feb 2018 09:19:59 +0000 (UTC) Received: by mail-pg0-f65.google.com with SMTP id t4so364386pgp.8 for ; Thu, 08 Feb 2018 01:19:59 -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:in-reply-to :references; bh=RyuY61nuR6oVfAfBd1YWG1tBLRIxyVmL+8f53F0na6c=; b=qmywqWNJzPE6Mph4EUgZ9Zhm+vU1Yy4f/WlJqQ+wj03/R6FVGBURhPNe3eG84LavB4 rKT/tknnAhFMpB1ggh4dK1DLMOiT8+YgAkIal/y9/31sJOmOPJvG8X5VJQidjel7ID+H fzw/FGHrXWUXCYBhTdUIKie+CeStMJed6WOVaYZphzAFCsA7SOOkIKiN0RL+JE3uBJ1U 7ghViMyR9e9hHT7w5LGfzf2WIst+VimWjkWzwrlWP2fVNcR5IcyhUBE7i5cHWEO/O0vj QQT13IY9DWQgn5lt9czv85eDd6BxoreyPrfLBfuv1WEPUb6LbP6HCnrE9RDEFfrJPNza rWEg== X-Gm-Message-State: APf1xPCRCdq12bH11vdQt5CQHF/tEK6dmmgGrUe+0UdfBNAbhny+QGE+ JGl8IT6tHj0OrPpaWwMWGbWsBeTMBumtWg== X-Received: by 10.101.75.11 with SMTP id r11mr31118pgq.36.1518081598344; Thu, 08 Feb 2018 01:19:58 -0800 (PST) Received: from localhost.localdomain ([64.64.108.77]) by smtp.gmail.com with ESMTPSA id 65sm9373352pfm.152.2018.02.08.01.19.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Feb 2018 01:19:57 -0800 (PST) From: Haojian Zhuang To: linaro-uefi@lists.linaro.org, leif.lindholm@linaro.org, ard.biesheuvel@linaro.org Date: Thu, 8 Feb 2018 17:19:38 +0800 Message-Id: <1518081579-2195-2-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518081579-2195-1-git-send-email-haojian.zhuang@linaro.org> References: <1518081579-2195-1-git-send-email-haojian.zhuang@linaro.org> Subject: [Linaro-uefi] [PATCH v2 1/2] opteed-build: export ARCH for makefile 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" In edk2-build.sh, ARCH is declared as BUILD_ARCH. Since we always build on x86, ARCH variable equals to X64. Then there's error when build OPTEE. Building opteed Trusted OS Target: AARCH64 Build: X64 Target: ARM Build: X64 CFG_ARM64_core=y CROSS_COMPILE_ta_arm64=aarch64-linux-gnu- CROSS_COMPILE=arm-linux-gnueabihf- CROSS_COMPILE_core=aarch64-linux-gnu- PROFILE=RELEASE PLATFORM=hikey PLATFORM_FLAVOR=hikey CFG_TEE_CORE_LOG_LEVEL=2 core/core.mk:10: core/arch/X64/plat-hikey/conf.mk: No such file or directory core/core.mk:12: core/arch/X64/X64.mk: No such file or directory core/core.mk:114: core/arch/X64/kernel/link.mk: No such file or directory mk/subdir.mk:151: lib/libutee/arch/X64/sub.mk: No such file or directory make: * No rule to make target 'lib/libutee/arch/X64/sub.mk'. Stop. So add TOS_ARCH. By default, TOS_ARCH is arm. Signed-off-by: Haojian Zhuang Reviewed-by: Leif Lindholm --- opteed-build.sh | 5 ++++- platforms.config | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/opteed-build.sh b/opteed-build.sh index 702860e..4de48d3 100755 --- a/opteed-build.sh +++ b/opteed-build.sh @@ -21,6 +21,9 @@ function usage function build_platform { unset CFG_ARM64_core PLATFORM PLATFORM_FLAVOR DEBUG + if [ X"$TOS_ARCH" = X"" ]; then + TOS_ARCH=arm + fi TOS_PLATFORM="`$TOOLS_DIR/parse-platforms.py $PLATFORM_CONFIG -p $1 get -o tos_platform`" if [ X"$TOS_PLATFORM" = X"" ]; then TOS_PLATFORM="`$TOOLS_DIR/parse-platforms.py $PLATFORM_CONFIG -p $1 get -o atf_platform`" @@ -94,7 +97,7 @@ function build_platform if [ $VERBOSE -eq 1 ]; then echo "Calling OP-TEE build:" fi - make -j$NUM_THREADS ${PLATFORM_BUILDFLAGS} + make ARCH=$TOS_ARCH -j$NUM_THREADS ${PLATFORM_BUILDFLAGS} if [ $? -eq 0 ]; then # # Copy resulting images to UEFI image dir diff --git a/platforms.config b/platforms.config index deb02f4..0e7dd6b 100644 --- a/platforms.config +++ b/platforms.config @@ -25,6 +25,8 @@ # Else we will not know which specific Trusted OS to # build. # Set to "debug" to create a debug build. +# - TOS_ARCH String describing the architecture to build for. +# Currently the supported architecture is ARM. # - TOS_PLATFORM Platform name for Trusted OS build, if # different from ARM Trusted Firmware platform # or UEFI platform name.