From patchwork Sun Jan 19 00:28:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Muellner X-Patchwork-Id: 1225315 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=theobroma-systems.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 480bHm4BQmz9sRV for ; Sun, 19 Jan 2020 11:28:18 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id B6BF085B4A; Sun, 19 Jan 2020 00:28:14 +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 3OfKHEdgmJWw; Sun, 19 Jan 2020 00:28:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 040C485A96; Sun, 19 Jan 2020 00:28:14 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 1ED7D1BF95D for ; Sun, 19 Jan 2020 00:28:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 17BC0855D9 for ; Sun, 19 Jan 2020 00:28:13 +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 keZ6+w8huL8q for ; Sun, 19 Jan 2020 00:28:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.theobroma-systems.com (vegas.theobroma-systems.com [144.76.126.164]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7EEA7855B4 for ; Sun, 19 Jan 2020 00:28:11 +0000 (UTC) Received: from ip092042140082.rev.nessus.at ([92.42.140.82]:59052 helo=purcell.lan) by mail.theobroma-systems.com with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1isyRl-0003fa-4m; Sun, 19 Jan 2020 01:28:09 +0100 From: Christoph Muellner To: buildroot@buildroot.org Date: Sun, 19 Jan 2020 01:28:05 +0100 Message-Id: <20200119002805.2103-1-christoph.muellner@theobroma-systems.com> X-Mailer: git-send-email 2.11.0 Subject: [Buildroot] [PATCH 1/1] boot/uboot: add support for bundling TEE in ELF format into U-Boot 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: christoph.muellner@theobroma-systems.com MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Some U-Boot platforms (e.g. rockchip) can bundle OPTEE's tee.elf into the U-Boot image. This patch brings the necessary changes to enable this feature. Signed-off-by: Christoph Muellner --- boot/uboot/Config.in | 10 ++++++++++ boot/uboot/uboot.mk | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index ffc441d670..1c1ab3907a 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -202,6 +202,16 @@ config BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF endchoice +config BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE + bool "U-Boot needs OPTEE TEE" + depends on BR2_TARGET_OPTEE_OS_CORE + help + Some platforms (such as Rockchip) encapsulate the TEE + inside U-Boot. This option makes sure optee-os gets + built prior to U-Boot, and that the TEE variable + pointing to OPTEE's tee.elf, is passed during the + Buildroot build. + menu "U-Boot binary format" config BR2_TARGET_UBOOT_FORMAT_AIS diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index a4879bb8b2..8dc932def6 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -150,6 +150,11 @@ UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.bin endif endif +ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE),y) +UBOOT_DEPENDENCIES += optee-os +UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf +endif + ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y) UBOOT_DEPENDENCIES += host-dtc endif