From patchwork Mon May 26 08:35:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 63664 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 7CD22C54FB3 for ; Mon, 26 May 2025 08:36:20 +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.web11.24790.1748248572522185389 for ; Mon, 26 May 2025 01:36:12 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=XVVXi+M3; 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-551f0072119so2457573e87.0 for ; Mon, 26 May 2025 01:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1748248571; x=1748853371; 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=0nXMEDKjslTjEvq78CbxR/BBOVCDYQ/iTqVpxShX4Qw=; b=XVVXi+M3BBG0AHr76oGKeldbigSUVIlMEMj++eAXAti5+QU6hYLJn7olhrzBtGKSkE Lh+/wpSglqw9bgDyBCSgYTW88G+iGjvgqAKXxGvp3SYawDaEZ0kObzj+c8vjZnEKk7Td 7TnlymDixjsWnahDG9oHOWFLA7swdahRoDNdGVkwqlwRLigrzFpb1SGQ+xgixKk+5yeI PbkHa3iAJCVmoYqS0bb0dTFNOrH2xHQCsM85O7hExey7qVmU0mwOv0lcHSYV9u4P9rFi 4LqJ4uDS4Lp9FEvpRLAxOrg7rMyTqalMdKXCCbtg5FjiCSyOgVE3TZd8a91v/x3VWpfJ OCTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748248571; x=1748853371; 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=0nXMEDKjslTjEvq78CbxR/BBOVCDYQ/iTqVpxShX4Qw=; b=qGsfvU+m2+xyl8l2Dy5zfTmRzgwsjhLkCCCJz3a4M3ei2r/3zPXZ/9o79J6gefnY+L 2EJX6OJqnh/5DlccpDzcLVsoVlbFT7ZbPT9nOonLPuoqtuqk0EojDt5KBKKPaLrSP3EW D6VUuZvOY9umIRN0IX/P+4hgIzKXRh8QLe1XOdI3/IxSbBkR5v86KP3q0SaDTE5cJ/cM mWwGL3t6mV32Vp+JJ/JEcP5Z/Gcse5pv3z+onOo9orkSObZWDYEGE+o0mxgppsZcbwHT G6Sp0/BCN7m5sjL4n4OaivfxHhx8YI1wd2yriTCRjahbh9iS0y5HuEcqnjk4NogKBJ3+ BZjg== X-Gm-Message-State: AOJu0Yz9GRJHzk5dt4Eha7CSNvtWFxgnZYBKFJsxLFaMR0rY3KkCMsh+ urFwjQKWh8xrMd3BJaIYFZiMZkjfp9xY17ozVWglkItTTwT7YS+2Rj0Z8VW22+fPNg3pxW+ifW7 3qpWcmxU= X-Gm-Gg: ASbGncszbIuwHv5f8An+VAvczoEaX7+4rLJHkLkdDM0RdPCIw+rkJJCb19LSPKk4VjR oh1RcTglmh5mesxRZ3mbPboVB41n5W5Gi3CUT3jcZP8xyNBbtvpSw9//o5EwUTNltiezGx8peEp jQcpv7oKTCUaPIuYS6Vm2Nhgyo5trqPVoMnd17vjAeZHWS5unugk25fnBcVYGkRC7B5pknNZvx5 K//SzpxDXmMHtLGGV0FUhf1KmcXqixAM7+kp9klRNG8kUB9D1ft1QT4c12chxtcTtmuqcAhxe0j QegRcfgJlm5LSrKh31eY1Z8I/5ZwEyBY8Tkiz7YtXkQYL8v4CC4ULtZygftxogRj3TIfZ7SC29I r46Q62vohSg20lU2Jq/zZVHcktwSe X-Google-Smtp-Source: AGHT+IEXNT6gIJpn6ZTAr++ZPkb12FfCh9+zjRrYEEiK5hPvOfyoV5Uz4oCicc5CPjKlA4WQTeHypQ== X-Received: by 2002:a05:6512:3da7:b0:550:e7fc:352 with SMTP id 2adb3069b0e04-552156e7b1dmr3602474e87.25.1748248570540; Mon, 26 May 2025 01:36:10 -0700 (PDT) Received: from localhost.localdomain (87-100-218-141.bb.dnainternet.fi. [87.100.218.141]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-32a6502c667sm1271651fa.101.2025.05.26.01.36.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 May 2025 01:36:10 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli , Ilias Apalodimas Subject: [PATCH v4 1/4] u-boot: disable CONFIG_BLOBLIST on genericarm64 and qemuarm64 Date: Mon, 26 May 2025 11:35:44 +0300 Message-ID: <20250526083548.413834-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 ; Mon, 26 May 2025 08:36:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/217257 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: 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 0000000000..d01d3d12d8 --- /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 fd1eab5cdd..a77c49cb8b 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 Mon May 26 08:35:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 63666 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 9819EC5B549 for ; Mon, 26 May 2025 08:36:20 +0000 (UTC) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by mx.groups.io with SMTP id smtpd.web10.24705.1748248574385601659 for ; Mon, 26 May 2025 01:36:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=jHUD032s; spf=pass (domain: linaro.org, ip: 209.85.208.182, mailfrom: mikko.rapeli@linaro.org) Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-32918fe5334so20019281fa.1 for ; Mon, 26 May 2025 01:36:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1748248572; x=1748853372; 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=UKqPhQkfjn6Clyy+kuTiPpKSNq3EXwgtEWm3XWqIWKg=; b=jHUD032sbRgqUnhlLZcGX5UTEJbkvRBBE/YPaLIj6vhstWAQ/iI9UJPMqIkQUvu+4R uedzRMyg7CiPC5TgPgnz2u1MKUAjPsyTnVM/1kQl1GEV0v9g8Vjd8TRHx62zbDQpe+hJ 1/c4ITlnpOP4mOHZh+VfFoQvZYI5lI1fo09plkGed3vHo4UEws0wDrD0q1y9Qok+yxJD cHbLaFN16HoYk4os8ZK1yXmVnK3424JdAg+lSmSMW4sU94ngcHwvjeEmAH+MiCJ99RJa CKRSks/sTjd33wyp+dMnHZW/bNx/NuK59LGqA8UlIeElniSqsQXK4/tYvVspRcaA+g05 3ECQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748248572; x=1748853372; 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=UKqPhQkfjn6Clyy+kuTiPpKSNq3EXwgtEWm3XWqIWKg=; b=aU7sF2oEWXaLLBaWoTFrbZDuDNvRJRYBqPD0zndt6tSB1AKMVVoMWbsOS4QpVaEjhP K3JnKrTRLB4+zPS3luJ0ld96b/oxQ9USRJD9Vks0eI3ictA6LlyjmU2bBjS0sIFFgEf/ MkjQiAK/Ir5ntWfRsHSRSPqDSpJ/blFStG5wQyZQMYJQyxtLmp3/OJW5bXCTEBK6NmwW 94nAuqYpgYMMHLxa2W2xmLXJeaDl3+KRwN3Vte69T0oAHdS6l0GXXZ9buR1J9g33SCyc ok82Q/MDHcEipkRlmLJj9f5RV8JyRplhKmyBQSWwf0xqlZdLHqsOxb1H77t1cqIP36Td C5Pg== X-Gm-Message-State: AOJu0YyFn0HON8vkewMjtW8lMx+QVoqaig2vzS2z5ZFUHZf85Qa1inQc KI7W4uctxzx+UpiHBJG4ZLPlY6iBsvN8BNA+FycKUHoXpjwLCqdmsrrgmIo+2S6RRscLsQ7zPEZ QbFIrGGI= X-Gm-Gg: ASbGncuYduvm7nCWRW/PLajaCXZ1FwONCW5JzQPi4gC8RCbj5CxteIaaDv5cUgzbStn CgTVPRjDAYc0weYBurqKDEO1yG8dofYeIe566j39bEUUTRpxEDgRz1c62mC0DoYwio3Z+Vqb1p9 tZWwAo0lKafPVrZsdcdVLY1jDV8y8RZQEvDMvzli2Ex6u9B1qpZImwnh0S5Cn+fJf0Cu/3GSbaZ gXO5/+rngajeUsFJwQW2O91E49jmLrYHoGFjSRzutC3K60y6iL5WvzookysokUTk56tLnV4Qyy2 MwCDC1nunuYKgn09BfJ1j/paK9mmMfDcFlh7YdeIHV5kCm9joEBM5TgBw+AdqFOu50ENbbJfZvB kL4ZZKJV+WR71npY/B28tidhWOJSw X-Google-Smtp-Source: AGHT+IHcqotkM0iOGj/PvbZwONSJgi0f9BdQOaloiTIkd0P4pjUNyNICideUOL2AVZjiQtDw0BPPow== X-Received: by 2002:a05:651c:1463:b0:30b:b987:b6a7 with SMTP id 38308e7fff4ca-3295b6da9f4mr23502691fa.0.1748248572485; Mon, 26 May 2025 01:36: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 38308e7fff4ca-32a6502c667sm1271651fa.101.2025.05.26.01.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 May 2025 01:36:12 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v4 2/4] qemuarm64.conf: allow overriding QB_OPT_APPEND Date: Mon, 26 May 2025 11:35:45 +0300 Message-ID: <20250526083548.413834-2-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250526083548.413834-1-mikko.rapeli@linaro.org> References: <20250526083548.413834-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 ; Mon, 26 May 2025 08:36:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/217258 It enables qemu USB support which causes a reset loop currently with u-boot. Signed-off-by: Mikko Rapeli --- meta/conf/machine/qemuarm64.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/conf/machine/qemuarm64.conf b/meta/conf/machine/qemuarm64.conf index d310445a34..f086729641 100644 --- a/meta/conf/machine/qemuarm64.conf +++ b/meta/conf/machine/qemuarm64.conf @@ -20,7 +20,7 @@ QB_SMP ?= "-smp 4" QB_CPU_KVM = "-cpu host -machine gic-version=3" # For graphics to work we need to define the VGA device as well as the necessary USB devices QB_GRAPHICS = "-device virtio-gpu-pci" -QB_OPT_APPEND = "-device qemu-xhci -device usb-tablet -device usb-kbd" +QB_OPT_APPEND ?= "-device qemu-xhci -device usb-tablet -device usb-kbd" # Virtio Networking support QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no" QB_NETWORK_DEVICE = "-device virtio-net-pci,netdev=net0,mac=@MAC@" From patchwork Mon May 26 08:35:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 63667 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 8CDB4C5B542 for ; Mon, 26 May 2025 08:36:20 +0000 (UTC) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by mx.groups.io with SMTP id smtpd.web10.24706.1748248576574305309 for ; Mon, 26 May 2025 01:36:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=QB4lvAyG; spf=pass (domain: linaro.org, ip: 209.85.208.180, mailfrom: mikko.rapeli@linaro.org) Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-327fcd87a3cso17597501fa.0 for ; Mon, 26 May 2025 01:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1748248575; x=1748853375; 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=6udH1gsUuHFnWeChKLZB5QywiKbC3CCIz5+pVqZBwo4=; b=QB4lvAyGo1QREY48gdFdnp27TNB4eBPwSWzuP4qHeWH6YLGvIugMJGN/OtdD4U4Q3a jK/QtZ9wHuwG1g6+dagDVqffM/kHMjfyKAXJyu20g7+tMwpKGxWsMcRvEtj1ge6EjzUh 7VOWxpiiLVWqGQU3Br4bYb909aEd01Y+WsDccG66Hb9LiwyhsdkVuS6FMLP8fC86ooM7 olN8368Ij0mnZ13OmaadQFtaFA4/SsY9s33deWtQFviY05guXun+Mgkr8xUZNAH0qv6P oQfx+1gxlIJfveGCeWESFOHNgE3U114+YBQ5WbQo6ixMiMCxflwtAVjIxAsafQNofKLP FoHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748248575; x=1748853375; 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=6udH1gsUuHFnWeChKLZB5QywiKbC3CCIz5+pVqZBwo4=; b=nbAxoveE1pL1AtZtmuQ4Fa8wHLS5UarQKUF43xC6ciGLuI8xy6VYV8Ut8q8Zv79mls QLiax8HhEdgv6k2nqTnXA+TMEiK/EFCJFwXoWfqJOOXYcc+UlhpgfTOLFG3yOSSXhn+y RR+auHMIrHRQXwd00Eo2m10Cl27PI7xjAco7hEyz3Aah3xA1roXB+zTB4M+1dwlVX9fP fDxojYlVTmak5gIhiRX97f/IfyWyJfCmQnXxdeaPCVP5wIwViS8p+5kxsl1gJBJ3M294 mwxGY3kyJaeDUrTaX/CaQcF9ZMwd5wA/2fXkWs+L6VZn/3N8QEZzpr6RIBX39g5HiPRG TZ2A== X-Gm-Message-State: AOJu0YwTR3TZtzqdKTp0am5Hj319sbfjU5hArwokbyO9JXthnCpDkU8A eWidqqHY/BmfOwsXxHDik0Y1Vy7xadC7n3hTMIIXeISmTOB4bIX7/ElsW9JuYBknjq4n4SJpS4a 2OSL38yQ= X-Gm-Gg: ASbGncvHK78kov+3Rqt5Nr3uERfrPRGm4G+akuRyFfpyb49WNLdgmQDXyKLBIICZZAD +w/Z3ROO7VKG9UYzIZ+yQ4oKtX46i8l2Mw48M53nKz8X1TWQi23YHrPGdLKEE1WKA+G2Ou2Ppya fI5KQTdr84h1o/G8NkGG71sqa77EJTSIBoatBnZstBCZ2MSlzYCdpx/oTJHneNkFYqh5kLutyV8 2fLDYo3Qu2mebcd8zlKXbot7V2cAzdmiSZBxnfWclzm0eMhgkBkeJKf3BMSXUMC5XcCysQ2LsW4 +51zEcHl3UL3h/Lf/3ZBsYtms+XJvasP+lPT7shuXgVQjRcumhWSjNrAfLIFoazfxKH9i1pYp0U W3jSM1MgSPjU00kAq+uplRYhYS6gFBhfXMAFpvgE= X-Google-Smtp-Source: AGHT+IH6J9ciuaccqKpGQttTdCYOJpGUwq8BOKka5PFrTar/pAnLhWPVHltYaXseiWnZozYTMvU0YA== X-Received: by 2002:a05:651c:50b:b0:32a:66f7:8a15 with SMTP id 38308e7fff4ca-32a66f78ac7mr1999411fa.39.1748248574668; Mon, 26 May 2025 01:36: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 38308e7fff4ca-32a6502c667sm1271651fa.101.2025.05.26.01.36.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 May 2025 01:36:14 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v4 3/4] oeqa decorator/data.py: add skipIfNotBuildArch decorator Date: Mon, 26 May 2025 11:35:46 +0300 Message-ID: <20250526083548.413834-3-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250526083548.413834-1-mikko.rapeli@linaro.org> References: <20250526083548.413834-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 ; Mon, 26 May 2025 08:36:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/217259 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(+) diff --git a/meta/lib/oeqa/core/decorator/data.py b/meta/lib/oeqa/core/decorator/data.py index 5444b2cb75..0daf46334f 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 Mon May 26 08:35:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 63665 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 7DD02C5AD49 for ; Mon, 26 May 2025 08:36:20 +0000 (UTC) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by mx.groups.io with SMTP id smtpd.web10.24707.1748248578323330376 for ; Mon, 26 May 2025 01:36:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=FFkalFbY; spf=pass (domain: linaro.org, ip: 209.85.167.49, mailfrom: mikko.rapeli@linaro.org) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-55324e35f49so251122e87.3 for ; Mon, 26 May 2025 01:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1748248576; x=1748853376; 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=Q2T77bfYVyCfAmV9km7HpWHOyprzOWi89Z7O0baXSd8=; b=FFkalFbYYg9HP5B8PaBqmrcxaUsY+U3rFRawkJWoVL6NCJV1/gu0neYVAq/6IkKhBM tdspYHK7qsZ5TRCkwKXOnbRnhPjIHmRz5RhApjP0Cd9KV0NS4s3ZU7j/ksUdITSGuVxl 15SsZ8mJhwtHCS51efG/ALKCZWI9Nf5Y0aBm1X8DA/owkAZRylkfJwe8VeMD4Noe+cl9 o6ME2fjbVoxH9qLpvXWc8r3GYb4kXHXZYnIXb0hyVgtaeeIR7i04UZAte5kP5jREJrzM gWJVJ/fICdlxnE5ohAMPcojlfEDNbzTatRV2mAw9R2vFWDInBd9cPHqbXVXnI2VYlOTd NxnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748248576; x=1748853376; 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=Q2T77bfYVyCfAmV9km7HpWHOyprzOWi89Z7O0baXSd8=; b=cBRN/uw+lU9OPl8Ad2E+JUcar4xDC2WFbuEvP+lBMNpylvZ3sZ211+mDCKqPBTCNdO ojNg9oaMCe53AHCt5/3cJh8sDZ8H3PmyXPYpcQr9Blx9fod/Q7Snii9h++IWaqeikXMe gwhwfrsaKtmigJLLQJEH8dadFV9CxSnvwr639puTbuVc4q2d0QLqPFn1PQPWf6Xvv5qt l6VPXvJtqulX4t+RusXQ3SRs6rxdiloGl932z40hlyPKfXzyv/h4JplT0ZMFYv68+Wu5 fOzNOOJTzyDEr619t0TGQvdpWcrel34N8i0+JfWUj5wCS2gO1m25njhD91b2aGvu92Rg MNAA== X-Gm-Message-State: AOJu0YypMK3O/1XiKsMMmLl4VQ4ctbhVyl9vmYdUcoDU6LsM4nJbWO1x RfuDuM26fej4kyoaWuM5NyvIms5NKXTZr69eeXDhY0n5iahG7KnBIkf45DRDufmIbNMcIDm4Ha9 0isUoBCU= X-Gm-Gg: ASbGncurOqwefgaQRmFsjKTeobB+7J8dO4E8E/mYShBRK6hYCqz8HG5nKek8NObGWX2 Q41SmwTJepAe2Z6rOgr7eS0UHJPkJzgiwXiqSqRz+fS05SEPW0DanOUg9RPvjRmrkhjanLH4Ess xwfKEsxgfYSVIiWY7BO0lHFFMo7C1/AllxkTMXNqNA/2tTrawB0VlawnAv8B7Z4vQ9arE1cH7ks /PhlxSS83WUpuIEUt4pQCGVYLw3SSWFCWptTdBueDNQdytyyzx/Q4xxroOrx4OjArCSccmJ4WbW 4PpeywvdalEELUA5ufBljqipmGmqaVXZi8KKJdME9yZwy2+DhT6BVo2oUoGxMAOvEfrs/XJojIe pr/R4ph7XbGvqTyYsNp8AVaykNghU+VL99NFHeIQ= X-Google-Smtp-Source: AGHT+IHwWiPoDk4NXrqaDXqrlE4LI3HRDO+1FPsS6En+7tMxquTRalrk3KMcQYYh7IuREUam0sXDBQ== X-Received: by 2002:ac2:4c48:0:b0:54e:9cb0:5008 with SMTP id 2adb3069b0e04-5521c7b08b5mr2247815e87.32.1748248576368; Mon, 26 May 2025 01:36:16 -0700 (PDT) Received: from localhost.localdomain (87-100-218-141.bb.dnainternet.fi. [87.100.218.141]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-32a6502c667sm1271651fa.101.2025.05.26.01.36.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 May 2025 01:36:15 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v4 4/4] oeqa selftest uboot.py: add qemu KVM test case Date: Mon, 26 May 2025 11:35:47 +0300 Message-ID: <20250526083548.413834-4-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250526083548.413834-1-mikko.rapeli@linaro.org> References: <20250526083548.413834-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 ; Mon, 26 May 2025 08:36:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/217260 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 | 61 ++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 2 deletions(-) v4: use skipIfNotBuildArch, variable for image name except config where bitbake syntax causes python parsing errors when replacing variables, check that target host arch and build arch are the same for KVM to work, fixed QB_DRIVE_TYPE syntax to include /dev/ path, tested on aarch64 build machine and genericarm64 and qemuarm64 target machines v1: https://lists.openembedded.org/g/openembedded-core/message/217107 diff --git a/meta/lib/oeqa/selftest/cases/uboot.py b/meta/lib/oeqa/selftest/cases/uboot.py index 96da4efb06..cd9c74f52f 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,60 @@ 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" +# qemu usb causes u-boot reset atm +QB_OPT_APPEND = "" +""") + 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)