From patchwork Fri Jul 24 15:01:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Quirin Gylstorff X-Patchwork-Id: 11683517 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 5B375722 for ; Fri, 24 Jul 2020 15:01:58 +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 3574D206F0 for ; Fri, 24 Jul 2020 15:01:58 +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="lFLkZQ+N" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3574D206F0 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+5009+4520428+8129116@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id YMI7YY4521763xGqDtALnSCS; Fri, 24 Jul 2020 08:01:58 -0700 X-Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by mx.groups.io with SMTP id smtpd.web10.7992.1595602911888646512 for ; Fri, 24 Jul 2020 08:01:52 -0700 X-Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id 06OF1oji005834 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 24 Jul 2020 17:01:50 +0200 X-Received: from md2dvrtc.fritz.box ([167.87.3.170]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 06OF1lbr027266; Fri, 24 Jul 2020 17:01:49 +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 v3 6/6] doc: Add README for secureboot Date: Fri, 24 Jul 2020 17:01:47 +0200 Message-Id: <20200724150147.8253-7-Quirin.Gylstorff@siemens.com> In-Reply-To: <20200724150147.8253-1-Quirin.Gylstorff@siemens.com> References: <20200629125400.13968-1-Quirin.Gylstorff@siemens.com> <20200724150147.8253-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 X-MIME-Autoconverted: from 8bit to quoted-printable by david.siemens.de id 06OF1oji005834 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: kgBrmjDPNFoqey59WSsifi5Yx4520428AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1595602918; bh=nO3MmaHCiGSTzlWDaBZoPe3hzlh2tkD/d1N+C1q5g00=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=lFLkZQ+NoANEoNbWt4YDRih3BxMTUT3Ai+MH1R4ZEsFvfWehaeHWNu4/na0ZCAZVRJr jzZM2v8yPtQDBhluLlMXmA5JztgK4UocNWtouPV7ek46bNeTxpGdYal3O+qdfAGFls9yu /RSWjn2HyHWY3xHLxLU4lZ8OcBC5MSY30bw= 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 generates +a signed [unified kernel image](https://systemd.io/BOOT_LOADER_SPECIFICATION/). +A unified kernel image packs the kernel, initramfs and the kernel command-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-line 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. The sample implementation to +select the root file system generates a uuid and stores the id in /etc/os-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=