From patchwork Thu Jun 25 13:21:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quirin Gylstorff X-Patchwork-Id: 11625359 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D8A5A14E3 for ; Thu, 25 Jun 2020 13:25:06 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (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 B113620702 for ; Thu, 25 Jun 2020 13:25:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.cip-project.org header.i=@lists.cip-project.org header.b="r8JxFcDo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B113620702 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+4820+4520428+8129116@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id tCXTYY4521763xD4UPTLnC36; Thu, 25 Jun 2020 06:25:06 -0700 X-Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by mx.groups.io with SMTP id smtpd.web10.10412.1593091275233529506 for ; Thu, 25 Jun 2020 06:21:15 -0700 X-Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id 05PDLD32004602 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 25 Jun 2020 15:21:13 +0200 X-Received: from md2dvrtc.ad001.siemens.net ([167.87.6.122]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 05PDLB2J002493; Thu, 25 Jun 2020 15:21:13 +0200 From: "Quirin Gylstorff" To: cip-dev@lists.cip-project.org, Jan.Kiszka@siemens.com Cc: Quirin Gylstorff Subject: [cip-dev] [isar-cip-core RFC 4/4] wic: Add wks files for A/B Partition update Date: Thu, 25 Jun 2020 15:21:11 +0200 Message-Id: <20200625132111.16367-5-Quirin.Gylstorff@siemens.com> In-Reply-To: <20200625132111.16367-1-Quirin.Gylstorff@siemens.com> References: <20200625132111.16367-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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 Delivered-To: mailing list cip-dev@lists.cip-project.org Reply-To: cip-dev@lists.cip-project.org X-Gm-Message-State: t176CnzCqsIQVVqwv1NrPHUIx4520428AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1593091506; bh=QMG8Cmq+vk5DuCdK9zWoU/61vdHvowJIaC3xJH//I+Q=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=r8JxFcDopZiHDBk8apCJ9aiOebcVuFKXVdSIeKLLFmuHy4EZ2R7QpjOYEydk/QSZddq pbEJBb8zBSd7XVS/9zeN48G2dDH2k7uEOppqxXQT+NNd4tw+qdTB9OeoS4ObuU6PUPkc9 roq9h/7ZevkGjbIYLjOnKbxRxzip7NN6SSA= From: Quirin Gylstorff Add wks for: - simatic-ipc227e - qemu-amd64 Signed-off-by: Quirin Gylstorff --- kas/opt/ebg-swu.yml | 26 ++++++++++++++++++++++++++ wic/ebg-sysparts.inc | 8 ++++++++ wic/qemu-amd64-efibootguard.wks | 5 +++++ wic/simatic-ipc227e-efibootguard.wks | 5 +++++ wic/swupdate-partition.inc | 4 ++++ 5 files changed, 48 insertions(+) create mode 100644 kas/opt/ebg-swu.yml create mode 100644 wic/ebg-sysparts.inc create mode 100644 wic/qemu-amd64-efibootguard.wks create mode 100644 wic/simatic-ipc227e-efibootguard.wks create mode 100644 wic/swupdate-partition.inc diff --git a/kas/opt/ebg-swu.yml b/kas/opt/ebg-swu.yml new file mode 100644 index 0000000..5b39730 --- /dev/null +++ b/kas/opt/ebg-swu.yml @@ -0,0 +1,26 @@ +# +# CIP Core, generic profile +# +# Copyright (c) Siemens AG, 2020 +# +# Authors: +# Quirin Gylstorff +# +# SPDX-License-Identifier: MIT +# + +header: + version: 8 + +local_conf_header: + swupdate: | + IMAGE_INSTALL_append = " swupdate efibootguard" + BOOTLOADER = "efibootguard" + + efibootguard: | + WDOG_TIMEOUT = "0" + WICVARS += "WDOG_TIMEOUT" + + wic: | + IMAGE_TYPE = "wic-img" + WKS_FILE = "${MACHINE}-${BOOTLOADER}.wks" diff --git a/wic/ebg-sysparts.inc b/wic/ebg-sysparts.inc new file mode 100644 index 0000000..dea99e8 --- /dev/null +++ b/wic/ebg-sysparts.inc @@ -0,0 +1,8 @@ +# default partition layout EFI Boot Guard usage + +# EFI partition containing efibootguard bootloader binary +part --source efibootguard-efi --ondisk sda --size 16M --extra-space 0 --overhead-factor 1 --label efi --align 1024 --part-type=EF00 --active + +# EFI Boot Guard environment/config partitions plus Kernel files +part --source efibootguard-boot --ondisk sda --size 32M --extra-space 0 --overhead-factor 1 --label BOOT0 --align 1024 --part-type=0700 --sourceparams "revision=2,root=PARTUUID:fedcba98-7654-3210-cafe-5e0710000001" +part --source efibootguard-boot --ondisk sda --size 32M --extra-space 0 --overhead-factor 1 --label BOOT1 --align 1024 --part-type=0700 --sourceparams "revision=1,root=PARTUUID:fedcba98-7654-3210-cafe-5e0710000002" diff --git a/wic/qemu-amd64-efibootguard.wks b/wic/qemu-amd64-efibootguard.wks new file mode 100644 index 0000000..74446d3 --- /dev/null +++ b/wic/qemu-amd64-efibootguard.wks @@ -0,0 +1,5 @@ +# short-description: Simatic-ipc227e with EFI Boot Guard and SWUpdate +# long-description: Disk image for Simatic-ipc227e with EFI Boot Guard and SWUpdate + +include ebg-sysparts.inc +include swupdate-partition.inc diff --git a/wic/simatic-ipc227e-efibootguard.wks b/wic/simatic-ipc227e-efibootguard.wks new file mode 100644 index 0000000..74446d3 --- /dev/null +++ b/wic/simatic-ipc227e-efibootguard.wks @@ -0,0 +1,5 @@ +# short-description: Simatic-ipc227e with EFI Boot Guard and SWUpdate +# long-description: Disk image for Simatic-ipc227e with EFI Boot Guard and SWUpdate + +include ebg-sysparts.inc +include swupdate-partition.inc diff --git a/wic/swupdate-partition.inc b/wic/swupdate-partition.inc new file mode 100644 index 0000000..15fbe80 --- /dev/null +++ b/wic/swupdate-partition.inc @@ -0,0 +1,4 @@ +part --source rootfs --uuid "fedcba98-7654-3210-cafe-5e0710000001" --size 1000M --extra-space 128M --overhead-factor 1 --label systema --align 1024 --fstype=ext4 +part --source rootfs --uuid "fedcba98-7654-3210-cafe-5e0710000002" --size 1000M --extra-space 128M --overhead-factor 1 --label systemb --align 1024 --fstype=ext4 + +bootloader --ptable gpt --append="console=tty0 console=ttyS0,115200 rootwait earlyprintk"