From patchwork Tue Jul 25 08:57:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 706125 Delivered-To: patch@linaro.org Received: by 2002:a5d:464f:0:b0:317:2194:b2bc with SMTP id j15csp68891wrs; Tue, 25 Jul 2023 02:04:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlH7SAGT7jUZhyzfy+IldB5Fozh8iHBhufKzJKbadthYWzHyk9pv31O6DD0q/YSrZxP4Iapz X-Received: by 2002:a2e:9c85:0:b0:2b6:e2c1:980f with SMTP id x5-20020a2e9c85000000b002b6e2c1980fmr7712758lji.36.1690275849180; Tue, 25 Jul 2023 02:04:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690275849; cv=none; d=google.com; s=arc-20160816; b=LAk8ow2pREqouBP+mq7CQJXrTYA54f42F0MbbNFGxmttD4oWZEQ1bEjki0XYZjzyFf cLiGj2IEwCGdCCWPBxVnfYJ++OqLueA+Gx30+jnV8vwBb1x/XK/+0eIrE/28Hr+Fm1yP dqmnlXqlh6H1g7CeWtAmA23HQOx8SWUsq27+6z/Gkfax1JcbveJEEWjFex7CC9GlRamw 4Guq7OTFBM79LaZqf7BR2cfj17AjJJi1nNGffR6UN4C8v+nYKyZMy8S2aSKbnbh25ASF nif6xTqyl3sG7szLbG35921roXb5SKHVAg0ZmetWWA1SKZKE0lQc2dO2xVswH5J/Lyv8 NQbQ== 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=dCPrtcghdep/xdi4jlWO8w6SwzwvIUICLIZO4XyRsO0=; fh=pvWoYJ8DnC9IyTD46q2s71hlWpPSBdE/YYp0/eyIYcc=; b=keYs7or5j/m4vMmowPPH6P9DXqrPTwsTGPXN7HlawkSnoGlUp52Oyy+m1XI5mUni+5 lufFyzXl4UD/wdSQb2rvQChSbJnr9Lke4eMGF2mUu3EzAeIY8ClplZe+731vKREYMv/9 CYiDZ0STIQtQTdcTIbnb7jSM1hRWeClynDj6K2TMPpoRn6vnvE+Q4QKfjpD3WJMxfHZI V4gW9sTJ8wbvQgcaks15ZXSN8BcffS9EiD5ET1ul8cEj/rsqNJqE681mwp6v2KkesDqO Gr+crcYJ2eNUkj/XBdcP82+bUme6jz5/f3hu3LiKe+SGe/f+cn83vzMila7Aky4VWB9y JzLA== 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 t17-20020a5d6911000000b00313e1c003fesi6092279wru.709.2023.07.25.02.04.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 02:04:09 -0700 (PDT) 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 8498386886; Tue, 25 Jul 2023 11:03:56 +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 91A1E86AB4; Tue, 25 Jul 2023 11:00:02 +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,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 50F1C866F0 for ; Tue, 25 Jul 2023 10:58:14 +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 0734515BF; Tue, 25 Jul 2023 01:58:57 -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 147183F6C4; Tue, 25 Jul 2023 01:58:10 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Malte Schmidt , Michal Simek , Tom Rini , Sughosh Ganu Subject: [PATCH v5 06/12] Dockerfile: capsule: Setup the files needed for capsule update testing Date: Tue, 25 Jul 2023 14:27:19 +0530 Message-Id: <20230725085725.350917-7-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230725085725.350917-1-sughosh.ganu@linaro.org> References: <20230725085725.350917-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 Support has being added through earlier commits to build capsules and embed the public key needed for capsule authentication as part of u-boot build. >From the testing point-of-view, this means the input files needed for generating the above have to be setup before invoking the build. Set this up in the CI configuration docker file for testing the capsule update feature. Signed-off-by: Sughosh Ganu --- Changes since V4: * New patch which moves the setting up of the files needed for testing the EFI capsule update feature to the Dockerfile. Note: Earlier, this setup was being done in the azure and gitlab yaml files. Now that this has been moved to the Dockerfile, this will require generating a new container image and referencing that image in the yaml files for the CI to work when these patches get applied. tools/docker/Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 3d2b64a355..294a0b0a53 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -206,6 +206,18 @@ RUN mkdir -p /opt/nokia && \ cp /tmp/qemu-linaro/arm-softmmu/qemu-system-arm /opt/nokia && \ rm -rf /tmp/qemu-linaro +# Set up capsule files for UEFI capsule update testing +RUN mkdir -p /tmp/capsules && \ + cd /tmp/capsules/ && \ + echo -n "u-boot:Old" > u-boot.bin.old && \ + echo -n "u-boot:New" > u-boot.bin.new && \ + echo -n "u-boot-env:Old" > u-boot.env.old && \ + echo -n "u-boot-env:New" > u-boot.env.new && \ + openssl req -x509 -sha256 -newkey rsa:2048 -subj /CN=TEST_SIGNER/ -keyout SIGNER.key -out SIGNER.crt -nodes -days 365 && \ + openssl req -x509 -sha256 -newkey rsa:2048 -subj /CN=TEST_SIGNER/ -keyout SIGNER2.key -out SIGNER2.crt -nodes -days 365 && \ + cert-to-efi-sig-list SIGNER.crt SIGNER.esl && \ + chmod -R uog+rw /tmp/capsules/ + # Build genimage (required by some targets to generate disk images) RUN wget -O - https://github.com/pengutronix/genimage/releases/download/v14/genimage-14.tar.xz | tar -C /tmp -xJ && \ cd /tmp/genimage-14 && \