From patchwork Tue Jun 3 12:29:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 64167 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 903AEC5AE59 for ; Tue, 3 Jun 2025 12:30:18 +0000 (UTC) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by mx.groups.io with SMTP id smtpd.web10.10037.1748953808670242761 for ; Tue, 03 Jun 2025 05:30:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=x0fGkmuM; spf=pass (domain: linaro.org, ip: 209.85.167.54, mailfrom: mikko.rapeli@linaro.org) Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-55320ddb9edso5991706e87.1 for ; Tue, 03 Jun 2025 05:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1748953807; x=1749558607; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=d2rBzkwoUwxF7MDCsbFiQPiG2SBjDYeT9ZvuuEAkYZE=; b=x0fGkmuMqoJ3HjVp7Mk+FgmfRq9VcDJBSrCxidcZY3ZRj7lIGjThb94XC0vi7goqjX b8t+jpVL2DA0XOt+ck1I3dfotzTQBhAiLKpAyB7V1RDvhKm90LPMCESrjSAvwENXeVqQ bFU0Rm0qy2WW5aW4AlvB3iIvyIf20JaMV86uYbEzx9GQ7gK91gYG8hLdgsxwJm6BZmR8 jeb1Lmw5ohrzBDA2jsuz6dQTqRQQVapW3kINuaO/dUMGsHSW+TYAHMM45c0OSXudoOH/ Ac0JZfJn4bZPtdqKez3jMywpIBKV+W4BhVGuyVk946ZbckTcD2Oaug64pMG5saRxohGj IHVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748953807; x=1749558607; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=d2rBzkwoUwxF7MDCsbFiQPiG2SBjDYeT9ZvuuEAkYZE=; b=QoMOxbJlmKyJ/wAXJdzCOBrP6iCyegEHeBepk0aay5bM+8Gzs3epfIEXJvX+hKRcrs EvMSmztD1vJtbb0x1JOXMFYoHPPJU8ZzAkeS69C81rNT6yrSggzFJ2tr4/sTs/NXCEeJ Ftjv+iVRIHaXKpd829mA+RHBTuicLPREZOCIhTQ4Vikst2CADK0z3JycNEZl20cnFdkc bM31wzk/VRC89Jd/N0qEw38ow1UVarxGZX8AD8QJKpYJ+snpbAcy4HgAGj+ktITp+COw HiRsjnekw58FN80pvd20wLKCMf//AfWbs8vDmL48a7njSrwRC+BjiOr6zqblDWEd+2BM xn7g== X-Gm-Message-State: AOJu0YzTypWV/+uVOYc8PbnidxKpPCV32v+Xe2QsNkHPfytroPZwQYca 2ziKVTKkWSYnJQUt4zRMPmPLiReFwvPmo8xKrBUuUwWxC+4KFv0b277P6FPVIn95WBGmaLdoiDa LQUm3vMo= X-Gm-Gg: ASbGncsQ7W7dY4sd7hR8pl35EquP5VGiyZsZHMXpDCAoKvEoc7L4L5pKAtnswJk0X/3 4gaVsN7wsqqHNmYwi3pOKpyZobCjFU9f7OqGe5vWsHySyflEwwwfT7QkKc0LDs7cgpDP0OVRDpx odSxfbWKXfj5q8klKcm2ckYg+EJoXMWG2wYTNSXyZdJrcGQG40OdFBTueNnFImDJypKZb8y+eB2 c9I2efIE8crTyA/IdEWoAbaNbQcgWuwJ5LKhja/sBZTm98KDiZZXVOUmpjjptXvSOz/tvlkCgS4 XKb+Bv/SLueqZ27+5z1pf9hOVv+VXi/TskffYSAmO6TaZQpsHT5m+FXVbSA8kVx5ECHtVlAuaDs TXQlQdK2swGLrGH50vIP9alH4rj6uHHqJ4JZgBvI= X-Google-Smtp-Source: AGHT+IG982ZpG+vOHdmG3oZrzrHSZCcMfWw6ofe9AL0bdmu6rpFz3FkF1o4B8pXSGP0Ge3Dg1Xg92Q== X-Received: by 2002:a05:6512:39d0:b0:54f:c101:4c04 with SMTP id 2adb3069b0e04-5533b92e392mr4789069e87.46.1748953806633; Tue, 03 Jun 2025 05:30:06 -0700 (PDT) Received: from localhost.localdomain (87-100-218-141.bb.dnainternet.fi. [87.100.218.141]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5533791d0bcsm1920295e87.208.2025.06.03.05.30.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jun 2025 05:30:05 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli , Ilias Apalodimas Subject: [PATCH v6 1/4] u-boot: disable CONFIG_BLOBLIST on genericarm64 and qemuarm64 Date: Tue, 3 Jun 2025 15:29:36 +0300 Message-ID: <20250603122939.1027947-1-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.49.0 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, 03 Jun 2025 12:30:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/217810 Booting u-boot on qemu with kvm is currently hanging on aarch64 build host. Root cause is in u-boot and CONFIG_BLOBLIST can be disabled as a workaround. To reproduce, build on kvm enabled host where "kvm-ok" succeeds. For example genericarm64 machine and core-image-base should then boot with: $ runqemu slirp nographic novga snapshot kvm On qemuarm64, default kvm setup will boot directly to kernel and is not affected by this. If build enables u-boot as bios then the same issue happens. Without this config workaround, the boot hangs without any messages in qemu output but ctrl-a-c to qemu console can shutdown the emulated machine. This seems to have regressed after u-boot 2025.04 update. KVM boot can be detected from speed, for example genericarm64 boots in 550 ms with KVM and without in over 5 seconds. Fixes: [YOCTO #15872] Upstream u-boot discussion: https://lists.denx.de/pipermail/u-boot/2025-May/590101.html Cc: Ilias Apalodimas Signed-off-by: Mikko Rapeli --- meta/recipes-bsp/u-boot/files/disable-CONFIG_BLOBLIST.cfg | 1 + meta/recipes-bsp/u-boot/u-boot-common.inc | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 meta/recipes-bsp/u-boot/files/disable-CONFIG_BLOBLIST.cfg v4, v5, v6: no changes, posted together with selftest for feature v3: added u-boot discussion link to commit message https://lists.openembedded.org/g/openembedded-core/message/217105 v2: applying to genericarm64 and qemuarm64 machines only https://lists.openembedded.org/g/openembedded-core/message/217054 v1: https://lists.openembedded.org/g/openembedded-core/message/217030 diff --git a/meta/recipes-bsp/u-boot/files/disable-CONFIG_BLOBLIST.cfg b/meta/recipes-bsp/u-boot/files/disable-CONFIG_BLOBLIST.cfg new file mode 100644 index 000000000000..d01d3d12d86f --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/disable-CONFIG_BLOBLIST.cfg @@ -0,0 +1 @@ +# CONFIG_BLOBLIST is not set diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc index fd1eab5cdde6..a77c49cb8b7f 100644 --- a/meta/recipes-bsp/u-boot/u-boot-common.inc +++ b/meta/recipes-bsp/u-boot/u-boot-common.inc @@ -16,6 +16,10 @@ SRCREV = "34820924edbc4ec7803eb89d9852f4b870fa760a" SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV}" +# workaround for aarch64 kvm qemu boot regression +SRC_URI:append:qemuarm64 = " file://disable-CONFIG_BLOBLIST.cfg" +SRC_URI:append:genericarm64 = " file://disable-CONFIG_BLOBLIST.cfg" + S = "${WORKDIR}/git" B = "${WORKDIR}/build" From patchwork Tue Jun 3 12:29:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 64170 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 9658CC5AD49 for ; Tue, 3 Jun 2025 12:30:18 +0000 (UTC) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by mx.groups.io with SMTP id smtpd.web10.10040.1748953814476248633 for ; Tue, 03 Jun 2025 05:30:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=eEwRMzfH; spf=pass (domain: linaro.org, ip: 209.85.167.41, mailfrom: mikko.rapeli@linaro.org) Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-5533c562608so4201927e87.3 for ; Tue, 03 Jun 2025 05:30:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1748953813; x=1749558613; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CXyUfC+oVeICC7a5NDBDoeLDjSTWKC0GgrYexlvwDEs=; b=eEwRMzfHxsbijajEOtpgbw2gw4UKrXqRFaRdFFr39/AfybAar3UrDHjaQwKjPcrr5i F0cqLhEKjYGt/pt/N/y/cWbsUsFobShcjllinw3l+5vwH0csOd22+hRs3qeoVmR71uH5 PV2nM1E1TBZUb3Jz1LZqCX8w3MiYUhHQIO2XfGaK6XDw2ua+cIS32xH5F/tEcII0/ZRM BctRFU5y8syk/zxDbiIMcKAMzczAPCvXgOhm6oN9QaebWr24yr5gtG5qkxAe+mynWVYw bh4P+9QLITPwdUjfODdzZ7C/lKXqmi12wGbzN0ig9OKLO8t/ZLlkSBOflgwpowbl4QgZ y9Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748953813; x=1749558613; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CXyUfC+oVeICC7a5NDBDoeLDjSTWKC0GgrYexlvwDEs=; b=BtS7raDivnrUf9zBmmbbLOxnu5LCurVMm4OizM0OFUB1ZDn9Ku48Zht4Hw0Oa5Qne+ LlSBrQRX998HU0cNE5uS6aFa+JL9A5DXY+JBMVZomrPTEkq01Hha9/6dK6E6i0jQZ6X0 ud+mS0BtgqVIIwz2LqUfLs5FEVrF6w1GQv3rK3lRcfR+CcF4KlF4Lttj1ewn0eBgc16T 55g0lCqqfa7BOIGFo7gDn7C2tCuTTy/0X/RquB7Y0gN8pmHjBh8CLTf+8AVGr2/nr5Gg W9eU3Bz178wPC5grAxLil1z5yjwKJFuNW4i1AYdKuhzAq93OTQKnjUEd3NBpwjGSW7hS JBQQ== X-Gm-Message-State: AOJu0YyraMfx3mq7c4Wxgh6SQY3og5uyUszNQhGBVaZ+qVg3H7Pij6kT lYbEZbQGwm/tuF7tiiMcpCPzxULjASVu2EZvYRvyzs/jXQJxwA2ol1yh34OUJxF8ACToyP7MSA2 KdUlHFT8= X-Gm-Gg: ASbGncvpLx13P4QQit/uWjyYR1nv8JsPDiEb4hG/2xPaz9RHnnN0Tymgw/osPgg3Jj8 rKQ7+QB1UniOykrD242EAl7vo1bdgom080eZS6BxQGidETaAo1tWoyikXFOoyt2vnt3/CAhM0h0 omdlM75YY+NC9Vj/at+kuMOmHtk9ych81C6kF8GwR6QpUmC3rqZVlQoMRmD8BdoHhaYyy/LmAWE TMAuUTCq0F4iG8FdifZ4V4fpfylPFdgMAlenVi8m6EaP7ts/g5dOl1Ilj/coZ/TJNqdVznIdg+u CL1Dk/m0X2d+rtl+emWtWP71BFyFL4PH5uGlNFp5kXlxnH/lUdhApeZJaFHc0kXWkgph/+ojUIJ KYLWziw54EBaFCM7x0g/EzVlBEYY3FUdfG13UFgg= X-Google-Smtp-Source: AGHT+IGTzOYoPKcahIa4tqFySTv2B2QKGGu92+8v5+poIigtgOLo2YrJTrRhWCxHNahjCeq1gE8b8A== X-Received: by 2002:a05:6512:b17:b0:553:20f2:2e77 with SMTP id 2adb3069b0e04-5533d1c5a9bmr4197033e87.55.1748953812520; Tue, 03 Jun 2025 05:30:12 -0700 (PDT) Received: from localhost.localdomain (87-100-218-141.bb.dnainternet.fi. [87.100.218.141]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5533791d0bcsm1920295e87.208.2025.06.03.05.30.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jun 2025 05:30:12 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v6 2/4] u-boot: disable USB support on qemuarm64 and genericarm64 Date: Tue, 3 Jun 2025 15:29:37 +0300 Message-ID: <20250603122939.1027947-2-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250603122939.1027947-1-mikko.rapeli@linaro.org> References: <20250603122939.1027947-1-mikko.rapeli@linaro.org> 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, 03 Jun 2025 12:30:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/217811 qemu USB devices under KVM currently cause reset loop in u-boot. If u-boot USB support is disabled then u-boot just ignores the qemu USB devices which then work with Linux kernel as before. Issue has been reported to u-boot upstream in: https://lists.denx.de/pipermail/u-boot/2025-June/591233.html Signed-off-by: Mikko Rapeli --- meta/recipes-bsp/u-boot/files/disable_CONFIG_USB.cfg | 1 + meta/recipes-bsp/u-boot/u-boot-common.inc | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-bsp/u-boot/files/disable_CONFIG_USB.cfg v6: changed from qemu options override "qemuarm64.conf: allow overriding QB_OPT_APPEND" to disabling USB support in u-boot v5: https://lists.openembedded.org/g/openembedded-core/topic/113322399#msg217801 v4: https://lists.openembedded.org/g/openembedded-core/topic/113306017#msg217349 diff --git a/meta/recipes-bsp/u-boot/files/disable_CONFIG_USB.cfg b/meta/recipes-bsp/u-boot/files/disable_CONFIG_USB.cfg new file mode 100644 index 000000000000..1d2509982be1 --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/disable_CONFIG_USB.cfg @@ -0,0 +1 @@ +# CONFIG_USB is not set diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc index a77c49cb8b7f..6cd9c39430f4 100644 --- a/meta/recipes-bsp/u-boot/u-boot-common.inc +++ b/meta/recipes-bsp/u-boot/u-boot-common.inc @@ -16,9 +16,9 @@ SRCREV = "34820924edbc4ec7803eb89d9852f4b870fa760a" SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV}" -# workaround for aarch64 kvm qemu boot regression -SRC_URI:append:qemuarm64 = " file://disable-CONFIG_BLOBLIST.cfg" -SRC_URI:append:genericarm64 = " file://disable-CONFIG_BLOBLIST.cfg" +# workarounds for aarch64 kvm qemu boot regressions +SRC_URI:append:qemuarm64 = " file://disable-CONFIG_BLOBLIST.cfg file://disable_CONFIG_USB.cfg" +SRC_URI:append:genericarm64 = " file://disable-CONFIG_BLOBLIST.cfg file://disable_CONFIG_USB.cfg" S = "${WORKDIR}/git" B = "${WORKDIR}/build" From patchwork Tue Jun 3 12:29:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 64169 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 A249AC61CE5 for ; Tue, 3 Jun 2025 12:30:18 +0000 (UTC) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by mx.groups.io with SMTP id smtpd.web10.10041.1748953816636634588 for ; Tue, 03 Jun 2025 05:30:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=vPA8w+In; spf=pass (domain: linaro.org, ip: 209.85.167.44, mailfrom: mikko.rapeli@linaro.org) Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-55324e35f49so6485887e87.3 for ; Tue, 03 Jun 2025 05:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1748953814; x=1749558614; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Gkr+tGW7ZfeQx8AeOHM/avYF6+GS0kp8o4oq6mlKgPc=; b=vPA8w+InTYYd1dVbEgS0sAleUP0WevFSz5Qii+ABagX2jlDRBLwREJir0YNAy+qOYk x35w2MbwcWV1vrjYe7WjAuqM88HExr0h0RVS94yuIF5FLEDfhZ7idqmy+0R1BfPXZViZ C7uJAM72jRal1dAxYheRlrsyii0LuXcKvLDArUE4fsDas9/nPV5QC3AHgEyYPo0BWeMb giwh98Cq+5QCwBBbA0eJkRqT1ZjzVV8OrM43tgpNVByP+mQD+z7zLfGgVolHB3O35gmk SuD4/v+9oCZc060cJDrVVb7NG+yHay7fVLX/8iPoITa0KP5HW/zXq+6FDanQCVObcnlp 2Y6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748953814; x=1749558614; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gkr+tGW7ZfeQx8AeOHM/avYF6+GS0kp8o4oq6mlKgPc=; b=GZqqHddNjwGyhMAg6D3K9H1T0Rk3EBQycjfgJ4m0NakdDbSSfh4RmQC7Cu3hQwt9+9 7g2ZD6fQ7rdC7IeWnc/57+72Rd7ysbMNfj5MMq+Jke4Wfz/pU0totQHxV4o6l9k9xTSc m3u9q7TDLP0urcKTWxMaeygQ54yMdsHgZmHlLojMb3HMklmGDxxTjmOuvGwgZc3Drh24 Yn1zmyT92/gGhEuXF0xoAoHs5SIv//35AuQLwA9wi6pLWxRZ4E20kMyn8AYAOtmvQhgh UhVcqllb7//ewLsbWpmIczi3hOsRQcKd7aW3WGwv9USYcJowTAYPR+QPAFh94fiCyz9s msgg== X-Gm-Message-State: AOJu0YxI8xAqr1XMfY+rbPv/lkpyqIjjgIbbrySADU4vRq1KL9TPt/Zn Hh50/47+Ff+TtQMchRYN6ck5q3fGXyT/Qcoe5zb9ZFmP11unQNFtCDBfN00+jF6Mlh5oFoOuSXP vfzDyJRk= X-Gm-Gg: ASbGncvSF8Z0d1Vd2n0mJ86XwuTCLtTzfosXbGuI/4nRhpZJedMbGLcnfL6hM060MUe ZlWbyAC/VJIEBR+nBYhh42/BhV0F33sR7TxX9pcny7vOwe1TT+ZyQq6zREkjMSyy9fDgdHQzm0x j+kNLZFGjB5mzkFqXEEK1UmOx4QLnSH5QAfrXxZfv5T2H4VSM1mrRclAV4lOuI7dFGgLJPm0PGp NxfNZeRvqPOytMYxZPFwgQFXE/6Zub4lV1kGI8lijXW5wnEsciHN/4KxFhFwXht7wEit8wIiYAH T6RysxaV2qHUGjnuZ5qAnEc8oNPpty0dAtd+pUzfB2aSAxYLYBXecDUOYE2saQ7b9si2MV7X0Px kd4apMbHg4/Snuqut+72K6WfKJyQe X-Google-Smtp-Source: AGHT+IGpC2brikUgs3qq8n9ILVQNAHaxENR2YiQppByrTcAnVCgKZpWx+2mUChCNbJQjZ0mQZbNWgQ== X-Received: by 2002:a05:6512:ea5:b0:54f:bce1:4a25 with SMTP id 2adb3069b0e04-5533b93b8d7mr4890329e87.53.1748953814378; Tue, 03 Jun 2025 05:30:14 -0700 (PDT) Received: from localhost.localdomain (87-100-218-141.bb.dnainternet.fi. [87.100.218.141]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5533791d0bcsm1920295e87.208.2025.06.03.05.30.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jun 2025 05:30:14 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v6 3/4] oeqa decorator/data.py: add skipIfNotBuildArch decorator Date: Tue, 3 Jun 2025 15:29:38 +0300 Message-ID: <20250603122939.1027947-3-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250603122939.1027947-1-mikko.rapeli@linaro.org> References: <20250603122939.1027947-1-mikko.rapeli@linaro.org> 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, 03 Jun 2025 12:30:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/217812 To limit tests to specific build host architectures. For example KVM testing will only work if target and build architectures are the same. Signed-off-by: Mikko Rapeli --- meta/lib/oeqa/core/decorator/data.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) v6: no changes diff --git a/meta/lib/oeqa/core/decorator/data.py b/meta/lib/oeqa/core/decorator/data.py index 5444b2cb7518..0daf46334f62 100644 --- a/meta/lib/oeqa/core/decorator/data.py +++ b/meta/lib/oeqa/core/decorator/data.py @@ -228,3 +228,15 @@ class skipIfNotArch(OETestDecorator): arch = self.case.td['HOST_ARCH'] if arch not in self.archs: self.case.skipTest('Test skipped on %s' % arch) + +@registerDecorator +class skipIfNotBuildArch(OETestDecorator): + """ + Skip test if BUILD_ARCH is not present in the tuple specified. + """ + + attrs = ('archs',) + def setUpDecorator(self): + arch = self.case.td['BUILD_ARCH'] + if arch not in self.archs: + self.case.skipTest('Test skipped on %s' % arch) From patchwork Tue Jun 3 12:29:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 64168 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 913EDC5B555 for ; Tue, 3 Jun 2025 12:30:18 +0000 (UTC) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by mx.groups.io with SMTP id smtpd.web11.10165.1748953817613878979 for ; Tue, 03 Jun 2025 05:30:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=vy1XvqZC; spf=pass (domain: linaro.org, ip: 209.85.167.44, mailfrom: mikko.rapeli@linaro.org) Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-5534edc6493so2192151e87.1 for ; Tue, 03 Jun 2025 05:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1748953816; x=1749558616; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oNAQlanYwemVRwBFJ4fjgTYFameuGlOH1OL9yvBRZiQ=; b=vy1XvqZCK04JK9SxAfzUtjEGs5avbIfDHRL+Cyu6hKeojFIcNeB/i0rMTCbqYHB9LC G+23K3RBN84ReB4Uh1PbGnlAaI7ufMr3G91UoipLe1ui5XzXgx0FVTo7b8S5ss/g2K/T KZTchu3EmULqqIypa/yYgLtlEsp96S20774DLcuf67zvyPhE4VF34DxV6vbqJfMNOPAg N5Hk8yOjBvLspsGs9kz+pmkQWxs/lyxKgqKFtnAGCF7yhTxGsc7D2Q0xGtKV2u/CNMJo gvwiwmiqiu76JqSqCsbXhcwlf2ngXFOhDoc4ViSZxxmWAIfnZa5tWASKG5Fmgg+Kl01M H0yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748953816; x=1749558616; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oNAQlanYwemVRwBFJ4fjgTYFameuGlOH1OL9yvBRZiQ=; b=sFZoIr4IAsPO0EpogR+Gr5UlKC2lBRQ+YOhdGYHfth3a779dL5MwJLa12K9mKbbRWL rRXzmhzZgOs+8Sg4OOd55H1NSrSQW8Pqk2APR4jJBaHDMurxxIwC1hNcsgS5MXsvTcor 7Y0cVkmPbt8FjuBDUrH6Uqp6qF8EslbljB5HZM78oZ1rJxProUDa8m++6iifAGbE87KU Q/TGbj2lTu3C0G8/j9wYuc+8K8rBN9EkhwJvc7CV9TJGVeFFJwpIC+a0WddZpT2jKNE2 vt320esosnQ1IoUBZaOXqX/U7U8C2sGvgXqXsFx5fSYJMjLczY+vgwt2JXQLGwIf4T+r /QpA== X-Gm-Message-State: AOJu0YwP0PA+AWVGe4wUK9tsw6k7HEvDy0guB326OLucY5XjhUNeGlbz bo/uwO4yThsI6BJl88fb1s+RBR7PGSV2js+xydAhAhe3VAJCuFFQZeWpFjY9zgQzEY8ujZxovTi 0evt7i8A= X-Gm-Gg: ASbGncv8duEpzKoBKzWfSAkv8nqQ+s31yg6TLPcM3VEgaz8wNy1krhjFqQUX6I2cv7a xcr2gk1zOypYb+eS3lXReGsKUaS1YitTIl4J+FNvkcC/biKp4yEkOfXBFUj2d1FxJdoqYv+MQMT 5ZHHwWo5q6dOHm7xlh5ycdEL75DNyhOMtydA6F12U5cCubFM8/ga6Af9OWojHbm61K3K1WG4AcN KKMmfeVByvjWWxVOpQCeMcBkDQCGminTyKpY6JWbXs0ViUUndSPAn0TtyccpzQqh5HVNBWhA5IZ ga8NaEnFO29E1LyFwNePE6iV6CIcUpJu2+XIWu0eQhtepP4M/Vf9LCzOe1O71Rpe5LWMN3rKLBK sKxPiQsx1ha9LryQ4fJkkmWus13Tk X-Google-Smtp-Source: AGHT+IHTpaBxzfIeh7hlCbJUNmKVQP6T7MdOzdEpnsomgNtIYIdD1DPKeAp+/B291Gj2OWI9m9wf8w== X-Received: by 2002:a05:6512:3ca6:b0:553:2812:cefa with SMTP id 2adb3069b0e04-5533d14f146mr5186359e87.3.1748953815707; Tue, 03 Jun 2025 05:30:15 -0700 (PDT) Received: from localhost.localdomain (87-100-218-141.bb.dnainternet.fi. [87.100.218.141]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5533791d0bcsm1920295e87.208.2025.06.03.05.30.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jun 2025 05:30:15 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v6 4/4] oeqa selftest uboot.py: add qemu KVM test case Date: Tue, 3 Jun 2025 15:29:39 +0300 Message-ID: <20250603122939.1027947-4-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250603122939.1027947-1-mikko.rapeli@linaro.org> References: <20250603122939.1027947-1-mikko.rapeli@linaro.org> 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, 03 Jun 2025 12:30:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/217813 Add a test case to boot target system via u-boot using qemu with KVM. This was broken recently and workaround proposed to u-boot. Test case works with genericarm64 and qemuarm64 target machines compiled and tested on aarch64 build host with KVM support. Test execution time with full sstate cache is around 170 seconds. qemu boot itself takes just a few seconds to full userspace. Signed-off-by: Mikko Rapeli --- meta/lib/oeqa/selftest/cases/uboot.py | 59 ++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-) v6: removed override of QB_OPT_APPEND to disable USB in qemu, instead u-boot has disabled USB support diff --git a/meta/lib/oeqa/selftest/cases/uboot.py b/meta/lib/oeqa/selftest/cases/uboot.py index 96da4efb0695..980ea327f0cc 100644 --- a/meta/lib/oeqa/selftest/cases/uboot.py +++ b/meta/lib/oeqa/selftest/cases/uboot.py @@ -6,8 +6,8 @@ # from oeqa.selftest.case import OESelftestTestCase -from oeqa.utils.commands import bitbake, runqemu -from oeqa.core.decorator.data import skipIfNotArch +from oeqa.utils.commands import bitbake, runqemu, get_bb_var, get_bb_vars, runCmd +from oeqa.core.decorator.data import skipIfNotArch, skipIfNotBuildArch from oeqa.core.decorator import OETestTag uboot_boot_patterns = { @@ -41,3 +41,58 @@ QEMU_USE_KVM = "False" status, output = qemu.run_serial(cmd) self.assertEqual(status, 1, msg=output) self.assertTrue("U-Boot" in output, msg=output) + + @skipIfNotArch(['aarch64']) + @skipIfNotBuildArch(['aarch64']) + @OETestTag("runqemu") + def test_boot_uboot_kvm_to_full_target(self): + """ + Tests building u-boot and booting it with QEMU and KVM. + Requires working KVM on build host. See "kvm-ok" output. + """ + + runCmd("kvm-ok") + + image = "core-image-minimal" + vars = get_bb_vars(['HOST_ARCH', 'BUILD_ARCH'], image) + host_arch = vars['HOST_ARCH'] + build_arch = vars['BUILD_ARCH'] + + self.assertEqual(host_arch, build_arch, 'HOST_ARCH %s and BUILD_ARCH %s must match for KVM' % (host_arch, build_arch)) + + self.write_config(""" +QEMU_USE_KVM = "1" + +# Using u-boot in EFI mode, need ESP partition for grub/systemd-boot/kernel etc +IMAGE_FSTYPES:pn-core-image-minimal:append = " wic" + +# easiest to follow genericarm64 setup with wks file, initrd and EFI loader +INITRAMFS_IMAGE = "core-image-initramfs-boot" +EFI_PROVIDER = "${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd-boot", "grub-efi", d)}" +WKS_FILE = "genericarm64.wks.in" + +# use wic image with ESP for u-boot, not ext4 +QB_DEFAULT_FSTYPE = "wic" + +PREFERRED_PROVIDER_virtual/bootloader = "u-boot" +QB_DEFAULT_BIOS = "u-boot.bin" + +# let u-boot or EFI loader load kernel from ESP +QB_DEFAULT_KERNEL = "none" + +# virt pci, not scsi because support not in u-boot to find ESP +QB_DRIVE_TYPE = "/dev/vd" +""") + bitbake("virtual/bootloader %s" % image) + + runqemu_params = get_bb_var('TEST_RUNQEMUPARAMS', image) or "" + with runqemu(image, ssh=False, runqemuparams='nographic kvm %s' % runqemu_params) as qemu: + + # boot to target and login worked, should have been fast with kvm + cmd = "dmesg" + status, output = qemu.run_serial(cmd) + self.assertEqual(status, 1, msg=output) + # Machine is qemu + self.assertTrue("Machine model: linux,dummy-virt" in output, msg=output) + # with KVM enabled + self.assertTrue("KVM: hypervisor services detected" in output, msg=output)