From mboxrd@z Thu Jan 1 00:00:00 1970 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=-14.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 67F33C433E1 for ; Fri, 21 Aug 2020 09:56:07 +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 35EA4207DE for ; Fri, 21 Aug 2020 09:56:07 +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="c0NNLvzT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 35EA4207DE 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+5175+4520388+8129055@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id A0r6YY4521723xO3kFLS0tPl; Fri, 21 Aug 2020 02:56:07 -0700 X-Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by mx.groups.io with SMTP id smtpd.web10.131308.1598003765596000008 for ; Fri, 21 Aug 2020 02:56:06 -0700 X-Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id 07L9u3hA003068 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 21 Aug 2020 11:56:03 +0200 X-Received: from md2dvrtc.fritz.box ([167.87.58.237]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 07L9u0Qv003248; Fri, 21 Aug 2020 11:56:03 +0200 From: "Quirin Gylstorff" To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Cc: Quirin Gylstorff Subject: [cip-dev][isar-cip-core][PATCH v4 6/6] doc: Add README for secureboot Date: Fri, 21 Aug 2020 11:55:59 +0200 Message-Id: <20200821095559.28467-7-Quirin.Gylstorff@siemens.com> In-Reply-To: <20200821095559.28467-1-Quirin.Gylstorff@siemens.com> References: <20200821095559.28467-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 X-MIME-Autoconverted: from 8bit to quoted-printable by david.siemens.de id 07L9u3hA003068 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 Reply-To: cip-dev@lists.cip-project.org X-Gm-Message-State: be5WXFvCm5FJEtG3HJxtkfUqx4520388AA= Content-Type: multipart/mixed; boundary="4UZFwG9HSeSDfZbOLBoS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1598003767; bh=y9vZQkJvaqtdrWqS1WsMiXl7oX2Jgiaycf24dJQFUKU=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=c0NNLvzT9bif7Jf7ob9thGOmHeu4WkpxO3G/mMGDrea2MyS59QUSXBHFMEsz6CQfzUr N3DXHLTRgX7WpZbxhq1e/N8VOAlN4ZVFh4kQEgyXUjPHR0XXuKal/5OJrOhRbiuNx02/m f1p0jcqPPhMzwFdsmLIKgOnvlFplpN+QOmc= --4UZFwG9HSeSDfZbOLBoS Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable From: Quirin Gylstorff Signed-off-by: Quirin Gylstorff --- doc/README.secureboot.md | 229 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 doc/README.secureboot.md diff --git a/doc/README.secureboot.md b/doc/README.secureboot.md new file mode 100644 index 0000000..d79248b --- /dev/null +++ b/doc/README.secureboot.md @@ -0,0 +1,229 @@ +# Efibootguard Secure boot + +This document describes how to generate a secure boot capable image with +[efibootguard](https://github.com/siemens/efibootguard). + +## Description + +The image build signs the efibootguard bootloader (bootx64.efi) and gene= rates +a signed [unified kernel image](https://systemd.io/BOOT_LOADER_SPECIFICA= TION/). +A unified kernel image packs the kernel, initramfs and the kernel comman= d-line +in one binary object. As the kernel command-line is immutable after the = build +process, the previous selection of the root file system with a command-l= ine parameter is no longer +possible. Therefore the selection of the root file-system occurs now in = the initramfs. + +The image uses an A/B partition layout to update the root file system. T= he sample implementation to +select the root file system generates a uuid and stores the id in /etc/o= s-release and in the initramfs. +During boot the initramfs compares its own uuid with the uuid stored in = /etc/os-release of each rootfs. +If a match is found the rootfs is used for the boot. + +## Adaptation for Images + +### WIC +The following elements must be present in a wks file to create a secure = boot capable image. + +``` +part --source efibootguard-efi --sourceparams "signwith=3D