From patchwork Tue Oct 10 12:36:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 31915 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 716E6CD80C4 for ; Tue, 10 Oct 2023 12:37:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.90209.1696941418313772549 for ; Tue, 10 Oct 2023 05:36:58 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); 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 980641FB; Tue, 10 Oct 2023 05:37:38 -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 ESMTPA id 522DE3F7A6; Tue, 10 Oct 2023 05:36:57 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 1/5] oeqa/selftest: don't skip test_read_only_image on qemuarm64 Date: Tue, 10 Oct 2023 13:36:49 +0100 Message-Id: <20231010123653.166806-1-ross.burton@arm.com> X-Mailer: git-send-email 2.34.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 ; Tue, 10 Oct 2023 12:37:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/188883 From: Ross Burton There's no need to skip this test anymore, as skipping on qemuarm64 was a proxy for "uses SERIAL_CONSOLES_CHECK" which no longer exists. [ YOCTO #14962 ] Signed-off-by: Ross Burton --- meta/lib/oeqa/selftest/cases/buildoptions.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/buildoptions.py b/meta/lib/oeqa/selftest/cases/buildoptions.py index 01ea4dce395..104448442ad 100644 --- a/meta/lib/oeqa/selftest/cases/buildoptions.py +++ b/meta/lib/oeqa/selftest/cases/buildoptions.py @@ -50,8 +50,6 @@ class ImageOptionsTests(OESelftestTestCase): loglines = "".join(f.readlines()) self.assertIn("ccache", loglines, msg="No match for ccache in %s log.do_compile. For further details: %s" % (recipe , log_compile)) - # https://bugzilla.yoctoproject.org/show_bug.cgi?id=14962 - @skipIfMachine("qemuarm64", "fails on qemuarm64 (uses SERIAL_CONSOLES_CHECK)") def test_read_only_image(self): distro_features = get_bb_var('DISTRO_FEATURES') if not ('x11' in distro_features and 'opengl' in distro_features): From patchwork Tue Oct 10 12:36:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 31913 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 76C4BCD80C0 for ; Tue, 10 Oct 2023 12:37:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.90210.1696941419026978714 for ; Tue, 10 Oct 2023 05:36:59 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); 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 515CBC15; Tue, 10 Oct 2023 05:37:39 -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 ESMTPA id 27CE43F7A6; Tue, 10 Oct 2023 05:36:58 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 2/5] meta/conf/machine: remove SERIAL_CONSOLES_CHECK Date: Tue, 10 Oct 2023 13:36:50 +0100 Message-Id: <20231010123653.166806-2-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231010123653.166806-1-ross.burton@arm.com> References: <20231010123653.166806-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 ; Tue, 10 Oct 2023 12:37:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/188884 From: Ross Burton There's no need for this variable anymore, as all consoles listed in SERIAL_CONSOLES are checked for their existence before a getty is started. Signed-off-by: Richard Purdie --- meta/conf/machine/include/riscv/qemuriscv.inc | 1 - meta/conf/machine/qemuarm.conf | 1 - meta/conf/machine/qemuarm64.conf | 1 - 3 files changed, 3 deletions(-) diff --git a/meta/conf/machine/include/riscv/qemuriscv.inc b/meta/conf/machine/include/riscv/qemuriscv.inc index 8da5b0b0c88..46ae66b9e50 100644 --- a/meta/conf/machine/include/riscv/qemuriscv.inc +++ b/meta/conf/machine/include/riscv/qemuriscv.inc @@ -10,7 +10,6 @@ KERNEL_IMAGETYPES += "uImage" KEEPUIMAGE = "no" SERIAL_CONSOLES ?= "115200;ttyS0 115200;hvc0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" IMAGE_FSTYPES += "ext4 wic.qcow2" diff --git a/meta/conf/machine/qemuarm.conf b/meta/conf/machine/qemuarm.conf index 9f07664bef0..943ce7c16a2 100644 --- a/meta/conf/machine/qemuarm.conf +++ b/meta/conf/machine/qemuarm.conf @@ -10,7 +10,6 @@ KERNEL_IMAGETYPE = "zImage" UBOOT_MACHINE ?= "qemu_arm_defconfig" SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;hvc0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" # For runqemu QB_SYSTEM_NAME = "qemu-system-arm" diff --git a/meta/conf/machine/qemuarm64.conf b/meta/conf/machine/qemuarm64.conf index 51600d40a4a..a096d964db5 100644 --- a/meta/conf/machine/qemuarm64.conf +++ b/meta/conf/machine/qemuarm64.conf @@ -10,7 +10,6 @@ KERNEL_IMAGETYPE = "Image" UBOOT_MACHINE ?= "qemu_arm64_defconfig" SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;hvc0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" # For runqemu QB_SYSTEM_NAME = "qemu-system-aarch64" From patchwork Tue Oct 10 12:36:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 31916 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 94824CD80CA for ; Tue, 10 Oct 2023 12:37:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.89850.1696941419653712894 for ; Tue, 10 Oct 2023 05:37:00 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); 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 11F3F106F; Tue, 10 Oct 2023 05:37:40 -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 ESMTPA id D403C3F7A6; Tue, 10 Oct 2023 05:36:58 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 3/5] meta-yocto-bsp/conf/machine: remove SERIAL_CONSOLES_CHECK Date: Tue, 10 Oct 2023 13:36:51 +0100 Message-Id: <20231010123653.166806-3-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231010123653.166806-1-ross.burton@arm.com> References: <20231010123653.166806-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 ; Tue, 10 Oct 2023 12:37:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/188885 From: Ross Burton There's no need for this variable anymore, as all consoles listed in SERIAL_CONSOLES are checked for their existence before a getty is started. --- meta-yocto-bsp/conf/machine/beaglebone-yocto.conf | 1 - meta-yocto-bsp/conf/machine/genericx86-64.conf | 1 - 2 files changed, 2 deletions(-) diff --git a/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf b/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf index 8b67cefef70..9f389711b3b 100644 --- a/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf +++ b/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf @@ -18,7 +18,6 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image kernel-devicetree" do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot virtual/bootloader:do_deploy" SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0 115200;ttyAMA0" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" PREFERRED_VERSION_linux-yocto ?= "6.1%" diff --git a/meta-yocto-bsp/conf/machine/genericx86-64.conf b/meta-yocto-bsp/conf/machine/genericx86-64.conf index 14913ea1f15..f19a1c1527c 100644 --- a/meta-yocto-bsp/conf/machine/genericx86-64.conf +++ b/meta-yocto-bsp/conf/machine/genericx86-64.conf @@ -6,6 +6,5 @@ DEFAULTTUNE ?= "core2-64" require conf/machine/include/x86/tune-core2.inc require conf/machine/include/genericx86-common.inc -SERIAL_CONSOLES_CHECK = "ttyS0" #For runqemu QB_SYSTEM_NAME = "qemu-system-x86_64" From patchwork Tue Oct 10 12:36:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 31914 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 97B90CD80CB for ; Tue, 10 Oct 2023 12:37:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.90211.1696941420405932101 for ; Tue, 10 Oct 2023 05:37:00 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); 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 BEF641477; Tue, 10 Oct 2023 05:37:40 -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 ESMTPA id 8D2DE3F7A6; Tue, 10 Oct 2023 05:36:59 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 4/5] busybox-inittab: fix console handling Date: Tue, 10 Oct 2023 13:36:52 +0100 Message-Id: <20231010123653.166806-4-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231010123653.166806-1-ross.burton@arm.com> References: <20231010123653.166806-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 ; Tue, 10 Oct 2023 12:37:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/188886 From: Ross Burton A testing failure meant that the inittab changes made in 6c65544 didn't actually work. A copy-paste problems meant that start_getty was being invoked instead of getty, but start_getty is sysvinit-inittab-specific. Revert this inittab to calling getty directly. Remove the terminal type, this wasn't specified in the original inittab. Busybox's init has non-standard behaviour for the inittab's ID field. With SysV this is a four-character identifier and nothing more, but with busybox init this is the controlling terminal (minus /dev). If the terminal doesn't exist then busybox doesn't gracefully handle the failure but instead repeatedly fails to spawn. As getty will immediately issue a setsid() this isn't needed for getty entries, so the ID can be empty and ttyrun does the terminal detection. Signed-off-by: Ross Burton --- meta/recipes-core/busybox/busybox-inittab_1.36.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-core/busybox/busybox-inittab_1.36.1.bb b/meta/recipes-core/busybox/busybox-inittab_1.36.1.bb index 462c9bb9c5f..8ee88b6aeff 100644 --- a/meta/recipes-core/busybox/busybox-inittab_1.36.1.bb +++ b/meta/recipes-core/busybox/busybox-inittab_1.36.1.bb @@ -23,7 +23,7 @@ do_install() { device=$(echo $s | cut -d\; -f 2) label=$(echo $device | sed -e 's/tty//' | tail --bytes=5) - echo "$label::respawn:${sbindir}/ttyrun $device ${base_bindir}/start_getty $speed $device vt102" >> ${D}${sysconfdir}/inittab + echo "::respawn:${sbindir}/ttyrun $device ${base_sbindir}/getty $speed $device" >> ${D}${sysconfdir}/inittab done if [ "${USE_VT}" = "1" ]; then From patchwork Tue Oct 10 12:36:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 31912 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 6A606CD80C2 for ; Tue, 10 Oct 2023 12:37:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.89851.1696941421107502544 for ; Tue, 10 Oct 2023 05:37:01 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); 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 7904B1FB; Tue, 10 Oct 2023 05:37:41 -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 ESMTPA id 49B0C3F7A6; Tue, 10 Oct 2023 05:37:00 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 5/5] oeqa/runtime/_qemutiny: rewrite test to be functional Date: Tue, 10 Oct 2023 13:36:53 +0100 Message-Id: <20231010123653.166806-5-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231010123653.166806-1-ross.burton@arm.com> References: <20231010123653.166806-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 ; Tue, 10 Oct 2023 12:37:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/188887 From: Ross Burton The _qemutiny is a small test case that was explicitly designed to do a minimal level of testing for poky-tiny images. These typically don't have SSH servers so we need to assume that qemu is being used and access the serial console directly. Signed-off-by: Ross Burton --- meta/lib/oeqa/runtime/cases/_qemutiny.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/meta/lib/oeqa/runtime/cases/_qemutiny.py b/meta/lib/oeqa/runtime/cases/_qemutiny.py index 14ff8b98b22..816fd4a7cb5 100644 --- a/meta/lib/oeqa/runtime/cases/_qemutiny.py +++ b/meta/lib/oeqa/runtime/cases/_qemutiny.py @@ -5,10 +5,15 @@ # from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.target.qemu import OEQemuTarget class QemuTinyTest(OERuntimeTestCase): def test_boot_tiny(self): - status, output = self.target.run_serial('uname -a') - msg = "Cannot detect poky tiny boot!" - self.assertTrue("yocto-tiny" in output, msg) + # Until the target has explicit run_serial support, check that the + # target is the qemu runner + if isinstance(self.target, OEQemuTarget): + status, output = self.target.runner.run_serial('uname -a') + self.assertIn("Linux", output) + else: + self.skipTest("Target %s is not OEQemuTarget" % self.target)