From patchwork Thu Apr 7 16:09:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 6438 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 47A23C433FE for ; Thu, 7 Apr 2022 20:36:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.402.1649347767816434621 for ; Thu, 07 Apr 2022 09:09:28 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 899ED139F for ; Thu, 7 Apr 2022 09:09:27 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 372533F73B for ; Thu, 7 Apr 2022 09:09:27 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 1/7] CI: install pregenerated SSH keys to speed up boot Date: Thu, 7 Apr 2022 17:09:19 +0100 Message-Id: <20220407160925.3809765-1-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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, 07 Apr 2022 20:36:08 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3255 As we're in a CI environment there's no need to generate unique SSH keys on boot. Installing the pregenerated SSH keys means they don't need to be generated, which saves a reasonable amount of boot time due to the lack of entropy if virtio-rng isn't available. Signed-off-by: Ross Burton --- ci/base.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/base.yml b/ci/base.yml index eb5637d4..4c997463 100644 --- a/ci/base.yml +++ b/ci/base.yml @@ -42,6 +42,8 @@ local_conf_header: QEMU_USE_KVM = "" perf: | CORE_IMAGE_EXTRA_INSTALL += "perf" + sshkeys: | + CORE_IMAGE_EXTRA_INSTALL += "ssh-pregen-hostkeys" machine: unset target: From patchwork Thu Apr 7 16:09:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 6439 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 45BDFC4332F for ; Thu, 7 Apr 2022 20:36:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.360.1649347768508287689 for ; Thu, 07 Apr 2022 09:09:28 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1BBE01596 for ; Thu, 7 Apr 2022 09:09:28 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BDCDD3F73B for ; Thu, 7 Apr 2022 09:09:27 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 2/7] qemuarm64-secureboot: remove redundant UBOOT_MACHINE Date: Thu, 7 Apr 2022 17:09:20 +0100 Message-Id: <20220407160925.3809765-2-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220407160925.3809765-1-ross.burton@arm.com> References: <20220407160925.3809765-1-ross.burton@arm.com> MIME-Version: 1.0 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, 07 Apr 2022 20:36:08 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3256 This is assigned in the base qemuarm64.conf already. Signed-off-by: Ross Burton --- meta-arm/conf/machine/qemuarm64-secureboot.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/meta-arm/conf/machine/qemuarm64-secureboot.conf b/meta-arm/conf/machine/qemuarm64-secureboot.conf index b664dac8..99d92e07 100644 --- a/meta-arm/conf/machine/qemuarm64-secureboot.conf +++ b/meta-arm/conf/machine/qemuarm64-secureboot.conf @@ -4,8 +4,6 @@ require ${COREBASE}/meta/conf/machine/qemuarm64.conf KMACHINE = "qemuarm64" -UBOOT_MACHINE = "qemu_arm64_defconfig" - QB_MACHINE = "-machine virt,secure=on" QB_OPT_APPEND += "-no-acpi" QB_MEM = "-m 1024" From patchwork Thu Apr 7 16:09:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 6440 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 45EC1C43217 for ; Thu, 7 Apr 2022 20:36:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.403.1649347769006305065 for ; Thu, 07 Apr 2022 09:09:29 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A25ED12FC for ; Thu, 7 Apr 2022 09:09:28 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4FF573F73B for ; Thu, 7 Apr 2022 09:09:28 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 3/7] qemuarm64-secureboot: disable the use of KVM Date: Thu, 7 Apr 2022 17:09:21 +0100 Message-Id: <20220407160925.3809765-3-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220407160925.3809765-1-ross.burton@arm.com> References: <20220407160925.3809765-1-ross.burton@arm.com> MIME-Version: 1.0 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, 07 Apr 2022 20:36:08 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3257 When using -machine=virt,secure=on KVM cannot be used and will cause an error, so forcibly disable the use of KVM. Signed-off-by: Ross Burton --- meta-arm/conf/machine/qemuarm64-secureboot.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-arm/conf/machine/qemuarm64-secureboot.conf b/meta-arm/conf/machine/qemuarm64-secureboot.conf index 99d92e07..22fb1d3e 100644 --- a/meta-arm/conf/machine/qemuarm64-secureboot.conf +++ b/meta-arm/conf/machine/qemuarm64-secureboot.conf @@ -4,6 +4,9 @@ require ${COREBASE}/meta/conf/machine/qemuarm64.conf KMACHINE = "qemuarm64" +# secure=on can't ever use KVM, so force it off +QEMU_USE_KVM = "" + QB_MACHINE = "-machine virt,secure=on" QB_OPT_APPEND += "-no-acpi" QB_MEM = "-m 1024" From patchwork Thu Apr 7 16:09:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 6442 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 53B36C4167B for ; Thu, 7 Apr 2022 20:36:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.403.1649347769006305065 for ; Thu, 07 Apr 2022 09:09:30 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3CE2F1596 for ; Thu, 7 Apr 2022 09:09:29 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D642B3F73B for ; Thu, 7 Apr 2022 09:09:28 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 4/7] CI: rename sshd section in testimage.yml Date: Thu, 7 Apr 2022 17:09:22 +0100 Message-Id: <20220407160925.3809765-4-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220407160925.3809765-1-ross.burton@arm.com> References: <20220407160925.3809765-1-ross.burton@arm.com> MIME-Version: 1.0 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, 07 Apr 2022 20:36:08 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3258 Rename the fragment that installs a SSH daemon to 'sshd' instead of the generic 'packages'. Signed-off-by: Ross Burton --- ci/testimage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/testimage.yml b/ci/testimage.yml index 0ffaaa2d..a26dcaf9 100644 --- a/ci/testimage.yml +++ b/ci/testimage.yml @@ -9,5 +9,5 @@ local_conf_header: TEST_RUNQEMUPARAMS = "slirp" TEST_SERVER_IP = "127.0.0.1" QEMU_USE_SLIRP = "1" - packages: | + sshd: | IMAGE_FEATURES:append = " ssh-server-dropbear" From patchwork Thu Apr 7 16:09:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 6443 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 54A4BC4167D for ; Thu, 7 Apr 2022 20:36:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.404.1649347770159843561 for ; Thu, 07 Apr 2022 09:09:30 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C339212FC for ; Thu, 7 Apr 2022 09:09:29 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 711A23F73B for ; Thu, 7 Apr 2022 09:09:29 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 5/7] qemuarm64-secureboot: set root device correctly Date: Thu, 7 Apr 2022 17:09:23 +0100 Message-Id: <20220407160925.3809765-5-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220407160925.3809765-1-ross.burton@arm.com> References: <20220407160925.3809765-1-ross.burton@arm.com> MIME-Version: 1.0 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, 07 Apr 2022 20:36:08 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3259 The default root device is /dev/vda, because typically a bare filesystem is mounted there. However, qemuarm64-secureboot uses a disk image with partitions, so this should be /dev/vda2. Currently this works because qemuarm64-secureboot has an extlinux.conf which explicitly sets the root device, but we're working at removing that. Signed-off-by: Ross Burton --- meta-arm/conf/machine/qemuarm64-secureboot.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-arm/conf/machine/qemuarm64-secureboot.conf b/meta-arm/conf/machine/qemuarm64-secureboot.conf index 22fb1d3e..a467b204 100644 --- a/meta-arm/conf/machine/qemuarm64-secureboot.conf +++ b/meta-arm/conf/machine/qemuarm64-secureboot.conf @@ -14,6 +14,7 @@ QB_DEFAULT_FSTYPE = "wic.qcow2" QB_DEFAULT_BIOS = "flash.bin" QB_FSINFO = "wic:no-kernel-in-fs" QB_ROOTFS_OPT = "" +QB_KERNEL_ROOT = "/dev/vda2" IMAGE_FSTYPES += "wic wic.qcow2" From patchwork Thu Apr 7 16:09:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 6441 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 53AC9C43219 for ; Thu, 7 Apr 2022 20:36:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.403.1649347769006305065 for ; Thu, 07 Apr 2022 09:09:30 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 557A41596 for ; Thu, 7 Apr 2022 09:09:30 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 034833F73B for ; Thu, 7 Apr 2022 09:09:29 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 6/7] qemuarm64-secureboot: don't set append in extlinux.conf Date: Thu, 7 Apr 2022 17:09:24 +0100 Message-Id: <20220407160925.3809765-6-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220407160925.3809765-1-ross.burton@arm.com> References: <20220407160925.3809765-1-ross.burton@arm.com> MIME-Version: 1.0 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, 07 Apr 2022 20:36:08 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3260 There's no need to set append in the extlinux.conf, as the kernel will pull the settings passed from runqemu via the DeviceTree. By explicitly setting append here the kernel doesn't look in the DT, and the extlinux.conf hardcoded a TAP network configuration which meant that networking fails for runqemu using slirp. Signed-off-by: Ross Burton --- meta-arm/wic/qemuarm64.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/meta-arm/wic/qemuarm64.cfg b/meta-arm/wic/qemuarm64.cfg index 580244fe..b9c9da6e 100644 --- a/meta-arm/wic/qemuarm64.cfg +++ b/meta-arm/wic/qemuarm64.cfg @@ -1,4 +1,3 @@ default Yocto label Yocto kernel /Image -append root=/dev/vda2 rw console=ttyS0 mem=1024M ip=192.168.7.2::192.168.7.1:255.255.255.0 console=ttyAMA0 From patchwork Thu Apr 7 16:09:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 6444 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 64375C46467 for ; Thu, 7 Apr 2022 20:36:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.404.1649347770159843561 for ; Thu, 07 Apr 2022 09:09:31 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DBF1212FC for ; Thu, 7 Apr 2022 09:09:30 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 89B0E3F73B for ; Thu, 7 Apr 2022 09:09:30 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 7/7] CI: run more tests for qemuarm64-secureboot Date: Thu, 7 Apr 2022 17:09:25 +0100 Message-Id: <20220407160925.3809765-7-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220407160925.3809765-1-ross.burton@arm.com> References: <20220407160925.3809765-1-ross.burton@arm.com> MIME-Version: 1.0 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, 07 Apr 2022 20:36:08 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3261 Not that we're not forcing TAP networking the SSH connections work, so we can run the full test suite. We have to skip parselogs currently as there is an error: software IO TLB: Cannot allocate buffer Signed-off-by: Ross Burton --- ci/qemuarm64-secureboot.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/qemuarm64-secureboot.yml b/ci/qemuarm64-secureboot.yml index acc65303..7e15a76b 100644 --- a/ci/qemuarm64-secureboot.yml +++ b/ci/qemuarm64-secureboot.yml @@ -6,13 +6,13 @@ header: machine: qemuarm64-secureboot local_conf_header: - bugs: | - # Only ping until errors can be resolved - TEST_SUITES = "ping" + failing_tests: | + # software IO TLB: Cannot allocate buffer + DEFAULT_TEST_SUITES:remove = "parselogs" target: - core-image-base - optee-examples - optee-test - optee-spdevkit - - optee-os-tadevkit \ No newline at end of file + - optee-os-tadevkit