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. From patchwork Thu Feb 8 09:19:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 127275 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1298718ljc; Thu, 8 Feb 2018 01:20:39 -0800 (PST) X-Google-Smtp-Source: AH8x224sPKsCB3b5W8CRTAF9agfiEtPXkCTOLsTbTjqEOGmd1KNJuNthC7Q8VNj52KVbHZc8OszH X-Received: by 10.237.54.201 with SMTP id f67mr29465qtb.252.1518081639452; Thu, 08 Feb 2018 01:20:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518081639; cv=none; d=google.com; s=arc-20160816; b=pfwV4qKb6AFZOfH97Elq4+N+VlhH7HTPesVJW8MXz/weyZHQ2EHbezXTAkxvMxY3cN Y2jUG96P3dDfo4fqZH9gsXtWjW7JQkRaE4jQNCrYqpDoc+zjCTCrbqzoZ4ZaSwtkxbsa x9AVxSxyc+FlarKnqy7qy7+XsUKL/csmrJzwOH+0GS7SnL1ZxySt0dYVx92iDqKdsDcn eCv3paqmOP532qMW1te5u+Eze28eQVnO/1hq3lMFUPyGsyEpoGUx5AjfO9a7W+GsaZnQ q1AEbj6TXNSF+h7eskHFBWr2p3r50ttrNx9LfxD9W0O3VWz+oTfFDb04VtHC3HIVIDah nYvA== 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=sEqNhXux8wFfdsG3RkR67NVXTCR0s/woBlZrFnvBgqc=; b=TNG7oDeSBEXJKSiRmXi/201FKCGXt2eXCfwAfRzd8Qf/zuuz0YESpIeY3NKlie+Oj4 L5FZT2mHA8IGNy1ocULdIHgXTz+1oSmSBqFibkUdId7tMOlIpJ1jtQUVEzObqUkpQCo0 Rj8+NboecSM2HMKjkOJ3/3kK0D6rj49I8nuDda8AgRzQUWs7tSNws8Bv8CByD9MrO7Ld icU7qJ2UVz6/4YK9GQOAgScmjQI/EVBMm9VzTZzLLom52BDRZKtt7t3lv79FIdmratFL /OSGjZnXtOxuSmoGO/Fv9Jav6jIxY5wpt/Ajsvyif/TRT8ytdq+++LMrhvlMUy5uQdtG aMTQ== 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 c67si2237435qkj.217.2018.02.08.01.20.39; Thu, 08 Feb 2018 01:20:39 -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 152D560855; Thu, 8 Feb 2018 09:20:39 +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 8414B608A9; Thu, 8 Feb 2018 09:20:21 +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 9D7AD60855; Thu, 8 Feb 2018 09:20:16 +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 0472B617FA for ; Thu, 8 Feb 2018 09:20:05 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id a11so1407462pgu.13 for ; Thu, 08 Feb 2018 01:20:04 -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=hjkqjVYg/ooI8nsBfOEuum4hMXYJ1wsD0Onsr5ba214=; b=fHaj4wkYV8BjEnqg12DcEvIOxWJO+ubQrid4i/h0BBLFEL19dmYeXQMXg5go3SJ473 JKpFAM2XT3SL+vMObWowjRk1B2vZ3tQwfT5h7sJ7+o8h1YTwGfBR6ibSzLre6gb8CDSF AiG9YbtIKjBCDP0vw7EROzCKaiAfQJ4GlAR0UESuwJlq570gh0/sgSjHHRVIVFCBOip7 EYaf8mQ61SU6w2/wYbYzDogupc7JR96Z8W5Ok77WVYSV05v0y6sxiSsLtiSVeSDN52yT /ZrV2glF3CHte9FCryBFAr23DjGtmTi7hH1AwfOI8cXANd2eJ/1o8O3BTbyBTDYXz/pd BZLA== X-Gm-Message-State: APf1xPAMIX//bTGYCOWhcIvwPYPjW8mkJSYYJRRSSlP6senTdpZnbTso drc2SHylTVqmopvHnLQnKxtbTAq8NSYFFA== X-Received: by 10.98.33.82 with SMTP id h79mr8733623pfh.139.1518081604002; Thu, 08 Feb 2018 01:20:04 -0800 (PST) Received: from localhost.localdomain ([64.64.108.77]) by smtp.gmail.com with ESMTPSA id 65sm9373352pfm.152.2018.02.08.01.19.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Feb 2018 01:20:03 -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:39 +0800 Message-Id: <1518081579-2195-3-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 2/2] edk2-platforms.config: build ATF & OPTEE for hikey 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" Add content to build ATF & OPTEE for HiKey platform. Signed-off-by: Haojian Zhuang --- edk2-platforms.config | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/edk2-platforms.config b/edk2-platforms.config index 5c09afe..8ef82d1 100644 --- a/edk2-platforms.config +++ b/edk2-platforms.config @@ -106,6 +106,20 @@ ARCH=AARCH64 LONGNAME=HiKey DSC=Platform/Hisilicon/HiKey/HiKey.dsc ARCH=AARCH64 +BUILD_ATF=yes +UEFI_BIN=BL33_AP_UEFI.fd +UEFI_IMAGE_DIR=HiKey +SCP_BIN=Platform/Hisilicon/HiKey/mcuimage.bin +ATF_SPD=opteed +TOS_BIN=tee-pager.bin +TOS_PLATFORM_FLAVOR=hikey +BUILD_TOS=yes +# Uncomment this to use UART0 as the EDK2 console +#BUILDFLAGS=-DSERIAL_BASE=0xF8015000 +# Uncomment this to use UART0 as the ARM Trusted Firmware console +#ATF_BUILDFLAGS=CONSOLE_BASE=PL011_UART0_BASE CRASH_CONSOLE_BASE=PL011_UART0_BASE +# Uncomment this to use UART0 as the OP-TEE Trusted OS console +#TOS_BUILDFLAGS=CFG_CONSOLE_UART=0 [d02] LONGNAME=Hisilicon D02