From patchwork Fri Sep 8 11:59:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 720806 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp720114wrp; Fri, 8 Sep 2023 05:00:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG7neDD39R+qmsqWckor6byqyFBufH77hE58eQxodBTOGD88yoIl0mnyFPtszqien0w4FYk X-Received: by 2002:a5d:58e2:0:b0:319:8c35:378 with SMTP id f2-20020a5d58e2000000b003198c350378mr1589698wrd.44.1694174450085; Fri, 08 Sep 2023 05:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694174450; cv=none; d=google.com; s=arc-20160816; b=tz/mGXBBkJe+iMv8ALuBlLcoKL4D/P59ApoFH/MkbdBKiVAxVUWr0exI5cnc8d3mzx 1RYS6MTiXAwv6YNWGUO0lpI2VCxYIqphpklqUmuVLSk/4x8f3SRX9se36Ds1kkIaIP4c 8/cakLjYNL658aWFptLNM0i/4Zj7JYFJeT1gYNiM3x2tPmFIoIE+nvs3M8RRyAVOBr0t wj3MZVmgFBkKlgjr7cERTAFU9y69AgygVquiOEeIdktb+BiW/+6ymW/HgfNVnpl9WFzr qgUJm4uFagHT3LNoUVDeKc3WVLVZ6BY2zrND+iXR+v2ydIBv1VSgLmozpEMvbIQ7phWx p0AQ== 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=pGBaf1ux5C1+KTDGsl8Wt3Oa0JB7bPimCRY/gX46Kf8=; fh=lo2Vjgyv/ggZk8yIty16CtyHjEqk0MugRW6STG9XbrI=; b=zYRTfWQFejiaA0kollNn+Z6wo2E7ZmtzID93/QnyHNbty1bb1tSsTKC7Fkt+AS3kNT uHlDxcwm3LJ9LV13/QKf3653R5tX1ljSzUA9W0W4iylGgoHSsP02aRSl1BWNpUHQ7rT0 kuSlvzhV+QV7XpeqZbSf8JvUFuLPtABm8zHUD84JMh/cGjdZlSBpOJUC5hlJOB65BuxT Yn01iM9A+XRBXsWtXAhEu+NHekLLKIfQ/9hxn5Sd/vVS04rsg6P3MGQIZVPwvlfdvfTZ GioQvLsTcLlCkqu5p7IRWGqIWLdhhw9pZDxvAQCGjapWGjeQlO0J82OL1khaYBigqqu7 SCzg== 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 o11-20020adfe80b000000b0031454ef5ed9si722653wrm.679.2023.09.08.05.00.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Sep 2023 05:00:50 -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 2D9F786993; Fri, 8 Sep 2023 14:00:36 +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 66A8D86A3A; Fri, 8 Sep 2023 14:00:34 +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 C384F86A1D for ; Fri, 8 Sep 2023 14:00:31 +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 483971007; Fri, 8 Sep 2023 05:01:09 -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 D65A13F67D; Fri, 8 Sep 2023 05:00:28 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Tom Rini , Malte Schmidt , Sughosh Ganu Subject: [PATCH 2/8] btool: mkeficapsule: Generate capsule through a config file Date: Fri, 8 Sep 2023 17:29:56 +0530 Message-Id: <20230908120002.29851-3-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230908120002.29851-1-sughosh.ganu@linaro.org> References: <20230908120002.29851-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 Add support to the mkeficapsule bintool for generating EFI capsules through a config file. Signed-off-by: Sughosh Ganu --- tools/binman/btool/mkeficapsule.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/binman/btool/mkeficapsule.py b/tools/binman/btool/mkeficapsule.py index 61179747ff..b0599aa506 100644 --- a/tools/binman/btool/mkeficapsule.py +++ b/tools/binman/btool/mkeficapsule.py @@ -20,6 +20,7 @@ Options: -A, --fw-accept firmware accept capsule, requires GUID, no image blob -R, --fw-revert firmware revert capsule, takes no GUID, no image blob -o, --capoemflag Capsule OEM Flag, an integer between 0x0000 and 0xffff + -f, --cfg-file config file with capsule parameters -h, --help print a help message """ @@ -80,6 +81,21 @@ class Bintoolmkeficapsule(bintool.Bintool): return self.run_cmd(*args) + def generate_capsule_cfg_file(self, cfg_file): + """Generate a capsule reading parameters from config file + + Args: + cfg_file (str): Path to the config file + + Returns: + None + """ + args = [ + f'--cfg-file={cfg_file}' + ] + + self.run_cmd(*args) + def fetch(self, method): """Fetch handler for mkeficapsule