From patchwork Fri May 17 08:45:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 1100889 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="T+/h7rXl"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45522J5vXJz9sB3 for ; Fri, 17 May 2019 18:46:16 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 57C1B868A8; Fri, 17 May 2019 08:46:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gple7Et4OL8J; Fri, 17 May 2019 08:46:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 834318775E; Fri, 17 May 2019 08:46:13 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id E59F81BF327 for ; Fri, 17 May 2019 08:46:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E207A8685B for ; Fri, 17 May 2019 08:46:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JYOINuyExRqR for ; Fri, 17 May 2019 08:46:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 3E2B585F98 for ; Fri, 17 May 2019 08:46:09 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id 198so6096647wme.3 for ; Fri, 17 May 2019 01:46:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cDjXDa9jHZ3ZIsKlvYivVxZvC/82ava5nSFhIZzuYfk=; b=T+/h7rXlxbTh+9YOaJJ8F/hTO9VGSn+Y8gRVc9iiwTNkhHXBdqCELz7yoGRMjR5OyL wSmrkIUGS8Jx6AdjJ5jq21Mll/phQlLKWJrk2EOXKCLOBDet2cGDFjcW3mkJdnlBGe6X 4o0MyagBuN1dMvNdO3I7wotMhXVasevonBZDjEwkylqLifHuFbB329l16c/DA2crvyNX fhDL2zur6u40z+vXdkgN8JYgW6kF18rbHw/sXzbFWesnuJX3/RARJbqmxWq0g3o1FZFT fmKTGSlIn6hODx3hphVedMtFowPIa4nXyo5hGjhPmvmoFpRgQGKdW4cQL8iHNOh9pOVM gaUg== 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=cDjXDa9jHZ3ZIsKlvYivVxZvC/82ava5nSFhIZzuYfk=; b=HBpwNsTF6h9vZu6XoCxrLEdichdV6cU7HD3ytyYMQdakiG7yCs9JHXH2FdwyrM6dF9 soi7bld5l1JJakpKud0x5L7Sh+S7yUc1r4hJeu0fwTYZViUgLPCWKIvALIO46oJLtBNz FLXpUzAt9aXgGpo46IHQmWuUrPa0FjuHfAKD+PFwhg9VM9QETC8LLqR64dmr3yheUTr4 5pR6MiEr9fyoU4LDoEzmAEKGuP3urlAPFVA20iQOjGS213P/NEnhmfKjomZnsJBjYB7I GqW+iDvTmMy/v7LFm8mNnP4SK4dRkCqstTFLBYlzQfAp40u5nof2hQ7GYRtDkK19acj6 7L+A== X-Gm-Message-State: APjAAAVKcIijRDH9QjH7M2H/fDiZ0yBWOaJ4JL0TaxtrkFRnbPgTi0kc afspG5IGOL3RKItqBOdtUCTdncV2Y60= X-Google-Smtp-Source: APXvYqwYhQQ/SH8+0KYp/M7xoBCfLrnPvX5wMslHoyHYti1YHqUXUrn0dVVlEXbJxMpZG1T3am2d1w== X-Received: by 2002:a1c:7e10:: with SMTP id z16mr1380866wmc.98.1558082767566; Fri, 17 May 2019 01:46:07 -0700 (PDT) Received: from lmecxl0524.lme.st.com ([80.215.153.220]) by smtp.gmail.com with ESMTPSA id k30sm11657141wrd.0.2019.05.17.01.46.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 May 2019 01:46:07 -0700 (PDT) From: Etienne Carriere To: buildroot@buildroot.org Date: Fri, 17 May 2019 10:45:56 +0200 Message-Id: <20190517084556.12242-4-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190517084556.12242-1-etienne.carriere@linaro.org> References: <20190517084556.12242-1-etienne.carriere@linaro.org> Subject: [Buildroot] [PATCH 4/4] boot/optee-os: allow external SDK to build in-tree TAs X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Etienne Carriere MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When BR2_TARGET_OPTEE_OS_CORE is disabled, optee-os in-tree trusted applications are not built along with with OP-TEE OS core. This change allows one to build in-tree trusted application even when not building OP-TEE OS core. In this case, the SDK must be provided either from package build (BR2_TARGET_OPTEE_OS_SDK) or from an external path (BR2_TARGET_OPTEE_OS_SDK_PATH). Signed-off-by: Etienne Carriere --- boot/optee-os/optee-os.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/boot/optee-os/optee-os.mk b/boot/optee-os/optee-os.mk index 750516ad94..77493a720d 100644 --- a/boot/optee-os/optee-os.mk +++ b/boot/optee-os/optee-os.mk @@ -77,6 +77,22 @@ endef endif # BR2_TARGET_OPTEE_OS_CORE ifeq ($(BR2_TARGET_OPTEE_OS_SERVICES),y) +ifneq ($(BR2_TARGET_OPTEE_OS_CORE),y) +# If not building core, one can still build TAs from built SDK or external SDK +ifeq ($(BR2_TARGET_OPTEE_OS_SDK),y) +OPTEE_OS_TAS_SDK = $(OPTEE_OS_LOCAL_SDK) +else +OPTEE_OS_TAS_SDK = $(OPTEE_OS_EXTERNAL_SDK) +endif +define OPTEE_OS_BUILD_TAS_ONLY + $(foreach f,$(wildcard $(@D)/ta/*/Makefile), \ + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \ + TA_DEV_KIT_DIR=$(OPTEE_OS_TAS_SDK) \ + -C $(dir $f) all + ) +endef +endif # !BR2_TARGET_OPTEE_OS_CORE define OPTEE_OS_INSTALL_TARGET_CMDS $(if $(wildcard $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/ta/*/*.ta), $(INSTALL) -D -m 444 -t $(TARGET_DIR)/lib/optee_armtz \ @@ -122,6 +138,7 @@ endif # BR2_TARGET_OPTEE_OS_SDK_PATH define OPTEE_OS_BUILD_CMDS $(OPTEE_OS_BUILD_CORE) $(OPTEE_OS_BUILD_SDK) + $(OPTEE_OS_BUILD_TAS_ONLY) endef define OPTEE_OS_INSTALL_IMAGES_CMDS