From patchwork Thu Mar 2 15:26:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Moessbauer X-Patchwork-Id: 13157416 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BAEEC7EE32 for ; Thu, 2 Mar 2023 15:31:10 +0000 (UTC) Received: from mta-64-227.siemens.flowmailer.net (mta-64-227.siemens.flowmailer.net [185.136.64.227]) by mx.groups.io with SMTP id smtpd.web11.18914.1677770886514942570 for ; Thu, 02 Mar 2023 07:28:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=felix.moessbauer@siemens.com header.s=fm1 header.b=NVV7LoMK; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.64.227, mailfrom: fm-72506-20230302152804965aab79fea1402217-vabmeb@rts-flowmailer.siemens.com) Received: by mta-64-227.siemens.flowmailer.net with ESMTPSA id 20230302152804965aab79fea1402217 for ; Thu, 02 Mar 2023 16:28:04 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=felix.moessbauer@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=TELIHZsy6JEg2raK+LfsmtaurnSPk0fNmDPxGUX2DEE=; b=NVV7LoMKqhcAEgAtMhyfKdnl7iDNTOvgiJo12evHiPTc2YrrEHSGQfqkOKaUu2jG7fbUP8 q/O33gWpbxcZU8Qj0XYO8ub5vRO1Qx3utd7RZAh8+ndun//a2ECeDMZKwtr637Bo/jrFhCky bjpQL5TXL+szLOOQFdF5zuOuQ4sn8=; From: Felix Moessbauer To: cip-dev@lists.cip-project.org Cc: daniel.bovensiepen@siemens.com, jan.kiszka@siemens.com, quirin.gylstorff@siemens.com, Felix Moessbauer Subject: [isar-cip-core][PATCH v3 8/9] add swupdate support for qemu-riscv64 Date: Thu, 2 Mar 2023 15:26:58 +0000 Message-Id: <20230302152659.2096307-9-felix.moessbauer@siemens.com> In-Reply-To: <20230302152659.2096307-1-felix.moessbauer@siemens.com> References: <20230302152659.2096307-1-felix.moessbauer@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-72506:519-21489:flowmailer List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 02 Mar 2023 15:31:10 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/10883 This patch enables the swupdate KConfig entry for the qemu-riscv64 board. For that, we also duplicate the qemu-arm64-efibootguard.wks template for qemu-riscv64. As this is the first riscv64 board, we do not symlink but create a copy. Signed-off-by: Felix Moessbauer --- Kconfig | 2 +- kas/opt/ebg-swu.yml | 1 + wic/qemu-riscv64-efibootguard.wks.in | 13 +++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 wic/qemu-riscv64-efibootguard.wks.in diff --git a/Kconfig b/Kconfig index a932bbe..7d72094 100644 --- a/Kconfig +++ b/Kconfig @@ -181,7 +181,7 @@ if IMAGE_FLASH && !KERNEL_4_4 && !KERNEL_4_19 config IMAGE_SWUPDATE bool "SWUpdate support for root partition" - depends on TARGET_QEMU_AMD64 || TARGET_SIMATIC_IPC227E || TARGET_QEMU_ARM64 || TARGET_QEMU_ARM || TARGET_BBB + depends on TARGET_QEMU_AMD64 || TARGET_SIMATIC_IPC227E || TARGET_QEMU_ARM64 || TARGET_QEMU_ARM || TARGET_BBB || ( TARGET_QEMU_RISCV64 && KERNEL_6_1_MAINLINE ) config IMAGE_SECURE_BOOT bool "Secure boot support" diff --git a/kas/opt/ebg-swu.yml b/kas/opt/ebg-swu.yml index 6bc893b..203a6b9 100644 --- a/kas/opt/ebg-swu.yml +++ b/kas/opt/ebg-swu.yml @@ -32,3 +32,4 @@ local_conf_header: # Add U-Boot for qemu IMAGER_BUILD_DEPS:append:qemu-arm64 = " u-boot-qemu-arm64" IMAGER_BUILD_DEPS:append:qemu-arm = " u-boot-qemu-arm" + IMAGER_BUILD_DEPS:append:qemu-riscv64 = " opensbi-qemu-riscv64" diff --git a/wic/qemu-riscv64-efibootguard.wks.in b/wic/qemu-riscv64-efibootguard.wks.in new file mode 100644 index 0000000..d63fc3a --- /dev/null +++ b/wic/qemu-riscv64-efibootguard.wks.in @@ -0,0 +1,13 @@ +# short-description: riscv64 with EFI Boot Guard and SWUpdate +# long-description: Disk image for riscv64 machines with EFI Boot Guard and SWUpdate + +include ebg-sysparts.inc + +part --source rawcopy --sourceparams "file=${IMAGE_FULLNAME}.squashfs" --align 1024 --fixed-size 1G --uuid "${ABROOTFS_PART_UUID_A}" +part --source empty --align 1024 --fixed-size 1G --uuid "${ABROOTFS_PART_UUID_B}" + +# home and var are extra partitions +part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 --label home --align 1024 --size 1G +part /var --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var --fstype=ext4 --label var --align 1024 --size 2G + +bootloader --ptable gpt