From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED21FC46467 for ; Sat, 7 Jan 2023 18:56:13 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7521985496; Sat, 7 Jan 2023 19:56:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="aWeYK0RL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EF8F2854CF; Sat, 7 Jan 2023 19:56:08 +0100 (CET) Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6AEA485282 for ; Sat, 7 Jan 2023 19:56:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-ed1-x531.google.com with SMTP id i15so6698004edf.2 for ; Sat, 07 Jan 2023 10:56:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6EEWmEAYFBEzdaEPbwm0TXlBFE6rh9kuX3ABMYdQ4MQ=; b=aWeYK0RL4M11EHUV+2IfUjJcXcY8NjnLeX4f2P58iJqjk3D+NG3O4EPsaRlMe8V+pZ Ai70E/FzhphBO26SZv8XRlCCKy5CtFXvi3Swu2PzUtqm6VlFw/S/LWhjz9QVQlJkSF4S NA2/iBgEODS1L9AY5lNIYkTrQ1SfFTbeU7MGY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6EEWmEAYFBEzdaEPbwm0TXlBFE6rh9kuX3ABMYdQ4MQ=; b=hlJNurwNtQ8CzPka2z3EeO7GGBWDtqcPYkmKsY296Q08F84VLodRKSxDiKUq26w7f/ ujXKx0NwEanVtyeDMq7HqZykZofS3RE3RShpqszOQEIFu8m9e16E6qBqi46vFmx4EdTB jLCb3pkwwecn7VAnkGqxo6zjy5mKwaweE6QWX3w/94MOWUA3LvJsFjQa4HyL4Tv/xoQH Ykc7Cus1tG+s7Uaw4dqNk18FJ/Na9zzTfCfSHVRbZHtcywZ9kdduf6+YI/drCaodVuvI m2jA3pdhIFLq85KeIZgIr9TomJ2Mtm3A9cHIkxaHTUTI9DXpywo2PIJ97bWEU7IQu2Ke 2OFw== X-Gm-Message-State: AFqh2kplZbshB1lYdtArdxK9mlGiVTDeWhV28e6+nZfPnxhy/jcV8pY2 eA24F7mG2qbDs5bH3qFrdpS+8iTgswZR56nD1FCq7w== X-Google-Smtp-Source: AMrXdXvZPyIf0c549rVKH2GWv/YYc+SBI1nSwQ7AJHlZUMBTz3v22DgWoeZ8bFchsziyWzvlKEgf6b0gcw51SbZqUik= X-Received: by 2002:a05:6402:194a:b0:48e:c093:c06d with SMTP id f10-20020a056402194a00b0048ec093c06dmr1494622edz.166.1673117763713; Sat, 07 Jan 2023 10:56:03 -0800 (PST) MIME-Version: 1.0 References: <20221221230726.638740-1-sjg@chromium.org> <20221221230726.638740-7-sjg@chromium.org> <39733f31-347a-53fe-6186-1891354413c6@linaro.org> <040aed51-90e8-8751-6161-056dd391d634@linaro.org> In-Reply-To: <040aed51-90e8-8751-6161-056dd391d634@linaro.org> From: Simon Glass Date: Sat, 7 Jan 2023 11:55:52 -0700 Message-ID: Subject: Re: [PATCH v8 06/13] binman: Support new op-tee binary format To: Jerome Forissier Cc: U-Boot Mailing List , Tom Rini , huang lin , Jeffy Chen , Kever Yang , Quentin Schulz , Roger Quadros , Philippe Reynes , Alper Nebi Yasak , Peter Geis Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hi Jerome, On Thu, 22 Dec 2022 at 15:20, Jerome Forissier wrote: > > > > On 12/22/22 21:23, Simon Glass wrote: > > (dropping the two bounces from cc) > > > > On Thu, 22 Dec 2022 at 13:18, Simon Glass wrote: > >> > >> Hi Jerome, > >> > >> On Thu, 22 Dec 2022 at 08:36, Jerome Forissier > >> wrote: > >>> > >>> > >>> > >>> On 12/22/22 00:07, Simon Glass wrote: > >>>> OP-TEE has a format with a binary header that can be used instead of the > >>>> ELF file. With newer versions of OP-TEE this may be required on some > >>>> platforms. > >>>> > >>>> Add support for this in binman. First, add a method to obtain the ELF > >>>> sections from an entry, then use that in the FIT support. We then end up > >>>> with the ability to support both types of OP-TEE files, depending on which > >>>> one is passed in with the entry argument (TEE=xxx in the U-Boot build). > >>> > >>> So, with: > >>> > >>> BL31=/path/to/bl31.elf TEE=/path/to/tee.bin make -C u-boot \ > >>> CROSS_COMPILE=aarch64-linux-gnu- CC=aarch64-linux-gnu-gcc \ > >>> HOSTCC=gcc BINMAN_DEBUG=1 BINMAN_VERBOSE=4 > >>> > >>> > >>> ...I get: > >>> > >>> Entry '/binman/simple-bin/fit/images/@tee-SEQ/tee-os' marked absent: uses v1 format which must be in a FIT OK, this is expected. It means that the contents are not provided. I will add some more comments. We can refine this later, but we are a year into this conversion of rk3399 to binman and I really want to land this right away before I lose interest and it sits here for another year. Do you have an influence on OP-TEE? I think the way they are adding a header here is a really back idea. We should look at packaging these blobs in a FIT complete with all the metadata that is needed, with a standard schema. > >>> > >>> > >>> More complete log at https://pastebin.com/UZzZeicQ > >> > >> Thanks. > >> > >> Is this file in the v1 binary format (with the custom header), > > Yes > > >> or is > >> is a plain binary file? At present only the former is supported, as I > >> thought that it can only be the elf or the v1 binary format these > >> days? > Correct > > >> Actually can you please send me the tee.bin ? > > Sure, here you go: https://ufile.io/f/ex5oy > > I have added bl31.elf too, although I suppose it is handled properly > being an ELF file. It seems to work for me. [..] Regards, Simon