From patchwork Tue Nov 21 07:00:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 745681 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1725657wrt; Mon, 20 Nov 2023 23:00:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmaDMpVfy/rmcBajcuTTLewVi8Lzr2qogAv5X/J+5DlEXlNJ5a313Q/rggJuj120oqpCLH X-Received: by 2002:a05:6402:602:b0:548:657c:9110 with SMTP id n2-20020a056402060200b00548657c9110mr1027641edv.38.1700550057810; Mon, 20 Nov 2023 23:00:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700550057; cv=none; d=google.com; s=arc-20160816; b=FVK7QlLOKBdNTu81f3w6JmR5pBkzy5FboNGkhh+RKy6teUtxyhWNYTmfvXPtjfYbZC MI/c36EKMB9B6C8P1HiEUPCZP6Y+Y9iFfUJ1vCay8lkCEZ7U+AjSsJPeS21CGbxtTHUr RuZI0DaajqvI2ZuGnKc1lLZtsJT+kLbeAdg8pMPqj9ZlWyb2inULZfASAyHA7VcE9845 t2jdqw+C4dLEGnb4RpuAYvyM2tctw7nGljOsxcKqRbS/Oa+OghJFhzk5nDPnehHAt+P0 y7PgLbDr/ZEdN1ktOo5JBWh3dH0IiDZpmT+LLVlbeafteh187dPm1YCZ9rHiL/+YJj2b 1IRg== 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:message-id:date:subject:cc:to:from; bh=JuwR28MNz7DQMwaZwrv6YrEvoMCO8nYfstxHj4pcCrM=; fh=g+fMcKeMHJq/tipeAWYvmbhdvA0F4VdLlXvYU2N6G0Y=; b=okLPpzyvgTKnbE1T6XrHCE7x1dFj/woKJdX73FSlHSqh2It4cqP200BxuWBiGB1v0g sCvxMtjAybcN6z30H0zhmLWs4SeZCYKX+ePIp3SZnoPfzjv9Lq3sY5PZ9REvTu/i1+iB qibCREK+uddzsBsqSGFd+LGxlq4b22JsvDc8JHjNiUFKp8yUmdSB3vd6uEuoN6R4Xov1 x06nl/0Wgv8el/tFirZnlf0saqK2odoAriyZj2iOpZPQ01j6rIp39AjdqiuU7oOjX9Qo aSEArfcbJ9hOCyDLdKSO9wI5tNRLpaUzBbLv1hBXNNgnf9QEpdIeInFsmDo4zVE5gJii oSeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id a8-20020a50c308000000b005347b93c4absi5532941edb.489.2023.11.20.23.00.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 23:00:57 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 36E67871CD; Tue, 21 Nov 2023 08:00:56 +0100 (CET) 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 672B5871CD; Tue, 21 Nov 2023 08:00:50 +0100 (CET) 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,T_SCC_BODY_TEXT_LINE 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 4F36D867E2 for ; Tue, 21 Nov 2023 08:00:48 +0100 (CET) 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 28204FEC; Mon, 20 Nov 2023 23:01:34 -0800 (PST) Received: from a079122.blr.arm.com (a079122.arm.com [10.162.17.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B8E7D3F73F; Mon, 20 Nov 2023 23:00:45 -0800 (PST) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Tom Rini , Masahisa Kojima Subject: [PATCH 0/4] Generate capsules from config files Date: Tue, 21 Nov 2023 12:30:24 +0530 Message-Id: <20231121070028.2614095-1-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 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 Add support for generating capsules through a config file. Multiple capsules can be generated through a single invocation of the mkeficapsule tool, where the capsule parameters are fetched from the config file. The format of the config file pretty similar to the one used by the capsule generation tool in EDKII. The functionality is enabled on the sandbox variant and the EFI capsule update test is now configured to generate the capsules through a config file. The sandbox_flattree variant generates capsules through binman, thus covering both the paths. Sughosh Ganu (4): tools: mkeficapsule: Add support for parsing capsule params from config file doc: Document capsule generation through a config file sandbox: capsule: Add a config file for generating capsules test: capsule: Generate capsules through config file configs/sandbox_defconfig | 2 + doc/develop/uefi/uefi.rst | 70 ++++ .../test_efi_capsule/capsule_gen_binman.dts | 2 + test/py/tests/test_efi_capsule/conftest.py | 7 + .../test_efi_capsule/sandbox_capsule_cfg.txt | 162 ++++++++ tools/Kconfig | 15 + tools/Makefile | 1 + tools/eficapsule.h | 114 ++++++ tools/mkeficapsule.c | 87 +++-- tools/mkeficapsule_parse.c | 352 ++++++++++++++++++ 10 files changed, 781 insertions(+), 31 deletions(-) create mode 100644 test/py/tests/test_efi_capsule/sandbox_capsule_cfg.txt create mode 100644 tools/mkeficapsule_parse.c