From patchwork Tue Aug 22 17:40:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 715775 Delivered-To: patch@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp393077wrp; Tue, 22 Aug 2023 10:42:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/24UdTZgkewAkEiO99ka+XFx+aa+xzno/tXAoIoiAPdhn2hYaNpua/SK9Jifo7QD7hFbF X-Received: by 2002:a05:6000:1245:b0:31a:eb77:2ae7 with SMTP id j5-20020a056000124500b0031aeb772ae7mr7874720wrx.64.1692726129298; Tue, 22 Aug 2023 10:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692726129; cv=none; d=google.com; s=arc-20160816; b=Yxo2M+Q7W7Q0RysywIzvbKWKUk+rzy6bSETTk5C7PA9bWiFb1u5srTG8/OD7wTzwkG ZJP2GtKjbJgNwmffQhfiHJrKvcEVxG9A+R8XXv724fOjmPr5vxvR1p3Q676O84MRRHoY yuXHQcMByl+0ccE8KKTVl/dvK7n9e4bq0s3iDgIOfwjytdeWY6StXYCV5TqZDBnANK4+ 9rjEH46BcuWuXT6De+k2Ztsqi/UC14MpTO0k1AYeDpkJIUcpO1/PTRZL9YM/9zb/sn7x zxYZFjC0hZPcWFrg6gx8bwS8leStqBry5QVL/xTfgeyzHChTWGEAe9IY6jlM/fdWcNV+ 5rXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=yIRYgI7k+0BKiIrb6xYWmdFAWql0wHABdcl7zOweobg=; fh=ikJSK2WVWLZPtKfyjzYjMbDKcRMYT5CY2x/iGdlGnWY=; b=EXHY+Pg/9ADKPVNkbjgnqgl2deNto7K3gfIWv7H7ZR/kzLTMpXwLZZPyZK3ZfXzsGZ 7UwCWu+k+deC5KQLBiRDTeHT6JeN5sas4fwhZB+mW9rZ8DvOljHSFgWkIPJuPvmvQ7n7 oY8fuud42iksGD34xx4nC1+8w9W87XZ9xkaMsZyKwX0TgEK72skxI2SZ02cpnnFaCUQH XG/jxRQg1ClUNtH8DwARN7DIZ7xcEUCSUsP8leWMBSw+UKXjVSCKucjsBAuu0vMXGzDZ r2jZ7SsiqnYNleMYnLtov/kUsdITe5AnznCiaFKU7nhoLWrtFKOLPUneAHK6jY4hX2u5 lmow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id n1-20020adffe01000000b003180a6954besi5167798wrr.1022.2023.08.22.10.42.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 10:42:09 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AF570864D7; Tue, 22 Aug 2023 19:41:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 3390C864D4; Tue, 22 Aug 2023 19:41:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 6C9F9864D3 for ; Tue, 22 Aug 2023 19:40:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B142A11FB; Tue, 22 Aug 2023 10:41:37 -0700 (PDT) Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.46.7]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9B4193F762; Tue, 22 Aug 2023 10:40:54 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Tom Rini , Sughosh Ganu Subject: [PATCH v11 08/15] doc: Add documentation to highlight capsule generation related updates Date: Tue, 22 Aug 2023 23:10:01 +0530 Message-Id: <20230822174008.626239-9-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230822174008.626239-1-sughosh.ganu@linaro.org> References: <20230822174008.626239-1-sughosh.ganu@linaro.org> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean The EFI capsules can now be generated as part of U-Boot build, through binman. Highlight these changes in the documentation. Signed-off-by: Sughosh Ganu Acked-by: Heinrich Schuchardt --- Changes since V10: * Add an example binman capsule node which shows how a capsule can be generated through binman. doc/develop/uefi/uefi.rst | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst index a7a41f2fac..f27cabbcce 100644 --- a/doc/develop/uefi/uefi.rst +++ b/doc/develop/uefi/uefi.rst @@ -318,6 +318,9 @@ Run the following command --guid \ +Capsule with firmware version +***************************** + The UEFI specification does not define the firmware versioning mechanism. EDK II reference implementation inserts the FMP Payload Header right before the payload. It coutains the fw_version and lowest supported version, @@ -345,6 +348,43 @@ add --fw-version option in mkeficapsule tool. If the --fw-version option is not set, FMP Payload Header is not inserted and fw_version is set as 0. +Capsule Generation through binman +********************************* + +Support has also been added to generate capsules during U-Boot build +through binman. This requires the platform's DTB to be populated with +the capsule entry nodes for binman. The capsules then can be generated +by specifying the capsule parameters as properties in the capsule +entry node. + +Check the test/py/tests/test_efi_capsule/capsule_gen_binman.dts file +as reference for how a typical binman node for capsule generation +looks like. For generating capsules as part of the platform's build, a +capsule node would then have to be included into the platform's +devicetree. + +A typical binman node for generating a capsule would look like:: + + capsule { + filename = "u-boot.capsule"; + efi-capsule { + image-index = <0x1>; + image-guid = "09d7cf52-0720-4710-91d1-08469b7fe9c8"; + + u-boot { + }; + }; + }; + +In the above example, a capsule file named u-boot.capsule will be +generated with u-boot.bin as it's input payload. The capsule +generation parameters like image-index and image-guid are being +specified as properties. Similarly, other properties like the private +and public key certificate can be specified for generating signed +capsules. Refer :ref:`etype_efi_capsule` for documentation about the +efi-capsule binman entry type, which describes all the properties that +can be specified. + Performing the update *********************