From patchwork Mon Jun 29 09:56:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gylstorff Quirin X-Patchwork-Id: 11630655 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 5702614B7 for ; Mon, 29 Jun 2020 09:56:17 +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 2F0CE2376E for ; Mon, 29 Jun 2020 09:56:17 +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="xL4H0Pkg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F0CE2376E 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+4854+4520428+8129116@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id lDTAYY4521763xRcM1RhAiGq; Mon, 29 Jun 2020 02:56:17 -0700 X-Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by mx.groups.io with SMTP id smtpd.web12.15186.1593424575369531696 for ; Mon, 29 Jun 2020 02:56:15 -0700 X-Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id 05T9uDp2026499 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 29 Jun 2020 11:56:13 +0200 X-Received: from md2dvrtc.ad001.siemens.net ([167.87.4.33]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 05T9uBnw028120; Mon, 29 Jun 2020 11:56:13 +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 v2 4/5] wic: Add wks files for A/B Partition update Date: Mon, 29 Jun 2020 11:56:10 +0200 Message-Id: <20200629095611.3000-5-Quirin.Gylstorff@siemens.com> In-Reply-To: <20200629095611.3000-1-Quirin.Gylstorff@siemens.com> References: <20200625132111.16367-1-Quirin.Gylstorff@siemens.com> <20200629095611.3000-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: NRqqsI1YK8uFyTpMoPEzuCmHx4520428AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1593424577; bh=UeOgEKNRedOEkc45va1S9I05zsFi4J1stv/pJCKVo+s=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=xL4H0PkgaetttszvWSXmi4fCuyuaX8ZDW4qUXZSKjSO494RJVZ0MZzez9u83Z6DTde8 qGz5dPYdb6YwyMEX0CjIXeaOlFezHsthNDAcDeBEWbD2XnXeuYkrDsgGC1+WgiMe/XB7B gEYUyyfxuxAqnPv3oW7BkOAsEba84m5vICw= 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..3cd7360 --- /dev/null +++ b/wic/qemu-amd64-efibootguard.wks @@ -0,0 +1,5 @@ +# short-description: Qemu-amd64 with Efibootguard and SWUpdate +# long-description: Disk image for qemu-amd64 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"