From patchwork Wed May 5 08:21:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quirin Gylstorff X-Patchwork-Id: 12239333 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 573B8C43460 for ; Wed, 5 May 2021 08:25:45 +0000 (UTC) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83BCB61154 for ; Wed, 5 May 2021 08:25:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83BCB61154 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=siemens.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+64572+6424+4520388+8129055@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id E0HnYY4521723xZCiVOkSyvO; Wed, 05 May 2021 01:25:44 -0700 X-Received: from lizzard.sbs.de (lizzard.sbs.de [194.138.37.39]) by mx.groups.io with SMTP id smtpd.web12.4948.1620203142840885319 for ; Wed, 05 May 2021 01:25:43 -0700 X-Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 1458PfXo016476 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 5 May 2021 10:25:41 +0200 X-Received: from md2dvrtc.fritz.box ([167.87.16.18]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 1458LwLt016955; Wed, 5 May 2021 10:21:59 +0200 From: "Quirin Gylstorff" To: jan.kiszka@siemens.com, cip-dev@lists.cip-project.org Cc: Quirin Gylstorff Subject: [cip-dev][isar-cip-core][PATCH v4 1/2] swupdate-config: remove variable U_BOOT Date: Wed, 5 May 2021 10:21:57 +0200 Message-Id: <20210505082158.18899-2-Quirin.Gylstorff@siemens.com> In-Reply-To: <20210505082158.18899-1-Quirin.Gylstorff@siemens.com> References: <20210505082158.18899-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: cip-dev@lists.cip-project.org List-Id: Mailing-List: list cip-dev@lists.cip-project.org; contact cip-dev+owner@lists.cip-project.org Reply-To: cip-dev@lists.cip-project.org X-Gm-Message-State: iwLljUhSpL1fobttfVCznE2Qx4520388AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1620203144; bh=BbNKgAaIz2mox6+on68m3Tg6Uo/pa4ZWx/q/4vAmh5g=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=HKeVPjWADPyK5IA6v9u7UAn2k/iUcXJSfl/s+oatzxKM0Tl8mF36ZLUmdkT3vmIqo29 DksYUN1WBykpNF26Ufwedx6v7rz3IlmtywyML8QRQ9IGBcPbzJEEBdFIX1MTPrDFrpxKe iN+Uj+i9ObOWomkWXxKFX5iu1aViKeXrwY4= From: Quirin Gylstorff The dependency to ${U_BOOT} is unnecessary for the SWUPDATE build and the package deployment. The package `u-boot-${MACHINE}-config` is requested for fw_env.config from a custom u-boot build. SWUpdate uses fw_env.config to read/write the u-boot environment. If the Package `u-boot-${MACHINE}-config` is not activated during the build, by setting `U_BOOT_CONFIG_PACKAGE` to '1', then do not add `u-boot-${MACHINE}-config` to the swupdate dependencies. U-Boot build by Debian provides example configurations for different boards with the package u-boot-tools. If u-boot-tools are installed these examples can be found at config /usr/share/doc/u-boot-tools/examples/. Signed-off-by: Quirin Gylstorff --- classes/swupdate-config.bbclass | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/classes/swupdate-config.bbclass b/classes/swupdate-config.bbclass index 9909113..5af4eba 100644 --- a/classes/swupdate-config.bbclass +++ b/classes/swupdate-config.bbclass @@ -45,13 +45,16 @@ KFEATURE_ubi[KCONFIG_SNIPPETS] = "file://swupdate_defconfig_ubi.snippet" KFEATURE_DEPS[ubi] = "mtd" -USE_U_BOOT_CONFIG ?= "true" KFEATURE_u-boot = "" KFEATURE_u-boot[BUILD_DEB_DEPENDS] = "libubootenv-dev" +# we need u-boot-${MACHINE}-config for fw_env.config +# only custom build u-boot provides this package +# for u-boot provided by debian u-boot-tools provides +# example configurations at /usr/share/doc/u-boot-tools/examples KFEATURE_u-boot[DEBIAN_DEPENDS] = "${@ 'libubootenv0.1, u-boot-${MACHINE}-config' \ - if d.getVar("USE_U_BOOT_CONFIG", True) == "true" \ + if d.getVar("U_BOOT_CONFIG_PACKAGE", True) == "1" \ else 'libubootenv0.1'}" -KFEATURE_u-boot[DEPENDS] = "${U_BOOT} libubootenv" +KFEATURE_u-boot[DEPENDS] = "libubootenv" KFEATURE_u-boot[KCONFIG_SNIPPETS] = "file://swupdate_defconfig_u-boot.snippet" SWUPDATE_LUASCRIPT ?= "swupdate_handlers.lua" From patchwork Wed May 5 08:21:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quirin Gylstorff X-Patchwork-Id: 12239337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C547C433B4 for ; Wed, 5 May 2021 08:29:22 +0000 (UTC) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 052A861106 for ; Wed, 5 May 2021 08:29:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 052A861106 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=siemens.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+64572+6426+4520388+8129055@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id rtuMYY4521723xNvs35KHFsR; Wed, 05 May 2021 01:29:21 -0700 X-Received: from lizzard.sbs.de (lizzard.sbs.de [194.138.37.39]) by mx.groups.io with SMTP id smtpd.web08.4994.1620203360325780836 for ; Wed, 05 May 2021 01:29:20 -0700 X-Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 1458TIoC020850 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 5 May 2021 10:29:18 +0200 X-Received: from md2dvrtc.fritz.box ([167.87.16.18]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 1458LwLu016955; Wed, 5 May 2021 10:21:59 +0200 From: "Quirin Gylstorff" To: jan.kiszka@siemens.com, cip-dev@lists.cip-project.org Cc: Quirin Gylstorff Subject: [cip-dev][isar-cip-core][PATCH v4 2/2] swupdate-config: add prefix to variable BOOTLOADER Date: Wed, 5 May 2021 10:21:58 +0200 Message-Id: <20210505082158.18899-3-Quirin.Gylstorff@siemens.com> In-Reply-To: <20210505082158.18899-1-Quirin.Gylstorff@siemens.com> References: <20210505082158.18899-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: cip-dev@lists.cip-project.org List-Id: Mailing-List: list cip-dev@lists.cip-project.org; contact cip-dev+owner@lists.cip-project.org Reply-To: cip-dev@lists.cip-project.org X-Gm-Message-State: eFym9zHmo0QzbiuGxvdsUA48x4520388AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1620203361; bh=zZ34hXjjASoOdQnCZOsw2o8YVxDKdTFQ8XTAuUJnl5M=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=gdU3T8Jxyx+LEGtU3SAolwl+Hi1WGY6XziaUPVSAzj5EgS3tr/c2C8FVnk+fRH+JifK /MSujs8iWsjDBzwma2x5Vx/Kw+HntJ2KSD0LD7QTvjlgirM0DIb8QpzHtW468+2TstglK 3ufnZLW0gmJYJPnzUB2rEIKGmbj3La35jk0= From: Quirin Gylstorff The variable BOOTLOADER is only used for swupdate. Add the prefix SWUPDATE to indicate the intended usage. Signed-off-by: Quirin Gylstorff --- classes/swupdate-config.bbclass | 8 ++++---- kas/opt/ebg-secure-boot-snakeoil.yml | 2 +- kas/opt/ebg-swu.yml | 4 ++-- kas/opt/qemu-swupdate.yml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/classes/swupdate-config.bbclass b/classes/swupdate-config.bbclass index 5af4eba..4e46b37 100644 --- a/classes/swupdate-config.bbclass +++ b/classes/swupdate-config.bbclass @@ -60,7 +60,7 @@ KFEATURE_u-boot[KCONFIG_SNIPPETS] = "file://swupdate_defconfig_u-boot.snippet" SWUPDATE_LUASCRIPT ?= "swupdate_handlers.lua" def get_bootloader_featureset(d): - bootloader = d.getVar("BOOTLOADER", True) or "" + bootloader = d.getVar("SWUPDATE_BOOTLOADER", True) or "" if bootloader == "efibootguard": return "efibootguard" if bootloader == "u-boot": @@ -71,11 +71,11 @@ SWUPDATE_KFEATURES ??= "" KFEATURES = "${SWUPDATE_KFEATURES}" KFEATURES += "${@get_bootloader_featureset(d)}" -# Astonishingly, as an anonymous python function, BOOTLOADER is always None +# Astonishingly, as an anonymous python function, SWUPDATE_BOOTLOADER is always None # one time before it gets set. So the following must be a task. python do_check_bootloader () { - bootloader = d.getVar("BOOTLOADER", True) or "None" + bootloader = d.getVar("SWUPDATE_BOOTLOADER", True) or "None" if not bootloader in ["efibootguard", "u-boot"]: - bb.warn("swupdate: BOOTLOADER set to incompatible value: " + bootloader) + bb.warn("swupdate: SWUPDATE_BOOTLOADER set to incompatible value: " + bootloader) } addtask check_bootloader before do_fetch diff --git a/kas/opt/ebg-secure-boot-snakeoil.yml b/kas/opt/ebg-secure-boot-snakeoil.yml index 8a72084..c0ed1a2 100644 --- a/kas/opt/ebg-secure-boot-snakeoil.yml +++ b/kas/opt/ebg-secure-boot-snakeoil.yml @@ -20,7 +20,7 @@ local_conf_header: # Add snakeoil and ovmf binaries for qemu IMAGER_BUILD_DEPS += "ebg-secure-boot-snakeoil ovmf-binaries" IMAGER_INSTALL += "ebg-secure-boot-snakeoil" - WKS_FILE = "${MACHINE}-${BOOTLOADER}-secureboot.wks" + WKS_FILE = "${MACHINE}-efibootguard-secureboot.wks" ovmf: | # snakeoil certs are only part of backports diff --git a/kas/opt/ebg-swu.yml b/kas/opt/ebg-swu.yml index aa3aed1..63dda09 100644 --- a/kas/opt/ebg-swu.yml +++ b/kas/opt/ebg-swu.yml @@ -15,7 +15,7 @@ header: local_conf_header: swupdate: | IMAGE_INSTALL_append = " swupdate efibootguard" - BOOTLOADER = "efibootguard" + SWUPDATE_BOOTLOADER = "efibootguard" efibootguard: | WDOG_TIMEOUT = "0" @@ -23,4 +23,4 @@ local_conf_header: wic: | IMAGE_TYPE = "wic-swu-img" - WKS_FILE ?= "${MACHINE}-${BOOTLOADER}.wks" + WKS_FILE ?= "${MACHINE}-${SWUPDATE_BOOTLOADER}.wks" diff --git a/kas/opt/qemu-swupdate.yml b/kas/opt/qemu-swupdate.yml index 3f5fedf..daebd2c 100644 --- a/kas/opt/qemu-swupdate.yml +++ b/kas/opt/qemu-swupdate.yml @@ -16,4 +16,4 @@ header: local_conf_header: qemu-wic: | IMAGE_TYPE ?= "wic-swu-img" - WKS_FILE = "qemu-amd64-${BOOTLOADER}.wks" + WKS_FILE = "qemu-amd64-${SWUPDATE_BOOTLOADER}.wks"