From patchwork Fri Mar 1 16:47:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 1050307 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.133; helo=hemlock.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="XlbrIjFn"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 449wMM3Z42z9s8m for ; Sat, 2 Mar 2019 03:47:43 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 96D9587E9C; Fri, 1 Mar 2019 16:47:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oYcL3Q+2Fw26; Fri, 1 Mar 2019 16:47:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id C2B9A87E94; Fri, 1 Mar 2019 16:47:37 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 2B51F1BF2B6 for ; Fri, 1 Mar 2019 16:47:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 27BFD87E81 for ; Fri, 1 Mar 2019 16:47:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Td2GHq+rCW9b for ; Fri, 1 Mar 2019 16:47:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by hemlock.osuosl.org (Postfix) with ESMTPS id 6977687E7B for ; Fri, 1 Mar 2019 16:47:27 +0000 (UTC) Received: by mail-wr1-f47.google.com with SMTP id d17so26536556wre.10 for ; Fri, 01 Mar 2019 08:47:27 -0800 (PST) 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 :in-reply-to:references; bh=Ocmz4eGbZ2StpDBSWGEaqOrRx/cWRovQUPrutvW3laA=; b=XlbrIjFnYsJwpw+wykWBABZwOgo/s1vx5QwS8VwJBezRnZnf2MiYbxmjgtwMSPQN8Y egno5fWtuyNcOmoSqySwJFGd6v41/iJSK+jXvlO2zJbFhWA1rwAcDNCIK4k1569ygVa9 n93Wdzi+152RMVNqiKJBNZjFgqXL5wctNyW5lwKZgNLMZlFdw7GKbLU00UBBz+X9fpTl T0dt6SHOScfIuV0EWAaSvz7neiPrlSM6GJeFEg/sTPRSL3SgbHmAROT9GIKOxX68oS8a TpgzVoRD3ArBIzXTAOZ1CooAAJ3XhCWx1KfUYtckGY5E5hucNoWt2n1jz9BYHtgdUvxl w6Dw== 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:in-reply-to:references; bh=Ocmz4eGbZ2StpDBSWGEaqOrRx/cWRovQUPrutvW3laA=; b=VbXlb4jI5vTZTXM3Y6d5K8B/D3KeBesWwNEUG75Xmp4Pd+BhYpaDbMtgpQxTsXkY3x FkQ4hlgUCtOBcU/KAqtJkHb6soTzw58pecDZTR5Stf9/1LUQUqA6JwTsJVpG8Vt+y9lX tFcTUO1FlaojdxA4sedrUX4rP4+2KoIqdAFhVsoHcVtN7ncVZ4Me1EFc/ejYWrIF1mQS 0YnuODeA16FSpVwlHnZhYlSnH5RWWSgNGgWazYA8S6Uk6MGQs/3M4XMyWiE/Lwj3Je2D W9AWGFdJueIJ5MwFnVzTVbilPODQNtqOVmysbCu036k+vUhFT9VCxYc7n8VvzaGe76Wh egcA== X-Gm-Message-State: APjAAAXkQp5yN+YekzqP//wd0ik4oOrHr6uDJfb8EanTW92k+9S7mzBp GO60wdIlHZdeY4Z3f+Vz9zPIbPZxngo= X-Google-Smtp-Source: APXvYqxyAz7BLfruLBxXqRWZUQRwrPoQAbG2+5o/mT609/dqo2bQ583FNPj7PIBj/I3BWPoebhu85g== X-Received: by 2002:a5d:570a:: with SMTP id a10mr465433wrv.85.1551458845760; Fri, 01 Mar 2019 08:47:25 -0800 (PST) Received: from lmenx29q.lme.st.com. ([80.215.103.67]) by smtp.gmail.com with ESMTPSA id l18sm20826744wrv.20.2019.03.01.08.47.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Mar 2019 08:47:25 -0800 (PST) From: Etienne Carriere To: buildroot@buildroot.org Date: Fri, 1 Mar 2019 17:47:13 +0100 Message-Id: <6d46c9a3c321d623029f2670f4ab98393825da98.1551458062.git.etienne.carriere@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Subject: [Buildroot] [PATCH/next 9/9] boot/optee-os: support alternate image files 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" Some platform may generate specific boot image files instead of the generic files tee.bin and tee-*_v2.bin when building OP-TEE OS package. This change introduces optee-os configuration directive BR2_TARGET_OPTEE_OS_CORE_IMAGES that allows board configuration to specify its expected boot image file names. Signed-off-by: Etienne Carriere --- boot/optee-os/Config.in | 13 +++++++++++++ boot/optee-os/optee-os.mk | 7 +++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/boot/optee-os/Config.in b/boot/optee-os/Config.in index a1f1b91..0f2df27 100644 --- a/boot/optee-os/Config.in +++ b/boot/optee-os/Config.in @@ -99,4 +99,17 @@ config BR2_TARGET_OPTEE_OS_ADDITIONAL_VARIABLES Additional parameters for the OP-TEE OS build E.g. 'CFG_TEE_CORE_LOG_LEVEL=3 CFG_UNWIND=y' +config BR2_TARGET_OPTEE_OS_CORE_IMAGES + string "Binary boot image filenames" + default "tee-header_v2.bin tee-pager_v2.bin" + help + Names of generated image files that are installed in the + output images/ directory. + + With OP-TEE pager disabled, defaults are tee-header_v2.bin + and tee-pager_v2.bin. + + With OP-TEE pager enabled, one would select the 3 files + tee-header_v2.bin, tee-pager_v2.bin and tee-pageable_v2.bin. + endif # BR2_TARGET_OPTEE_OS diff --git a/boot/optee-os/optee-os.mk b/boot/optee-os/optee-os.mk index df481c9..e445e72 100644 --- a/boot/optee-os/optee-os.mk +++ b/boot/optee-os/optee-os.mk @@ -62,6 +62,8 @@ OPTEE_OS_LOCAL_SDK = $(OPTEE_OS_BUILDDIR_OUT)/export-ta_arm32 OPTEE_OS_STAGING_SDK = $(STAGING_DIR)/lib/optee/export-ta_arm32 endif +OPTEE_OS_IMAGE_FILES = $(call qstrip,$(BR2_TARGET_OPTEE_OS_CORE_IMAGES)) + ifeq ($(BR2_TARGET_OPTEE_OS_CORE),y) define OPTEE_OS_BUILD_CORE $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) O=$(OPTEE_OS_BUILDDIR_OUT) \ @@ -69,8 +71,9 @@ define OPTEE_OS_BUILD_CORE endef define OPTEE_OS_INSTALL_IMAGES_CORE mkdir -p $(BINARIES_DIR) - cp -dpf $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/tee.bin $(BINARIES_DIR) - cp -dpf $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/tee-*_v2.bin $(BINARIES_DIR) + $(foreach f,$(OPTEE_OS_IMAGE_FILES), \ + cp -dpf $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/$(f) $(BINARIES_DIR)/ + ) endef endif # BR2_TARGET_OPTEE_OS_CORE