From patchwork Thu May 22 13:41:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 63519 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 E801BC54E90 for ; Thu, 22 May 2025 13:41:49 +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.web11.24220.1747921301557661802 for ; Thu, 22 May 2025 06:41:42 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=bqte3ef0; 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-54e816aeca6so11182234e87.2 for ; Thu, 22 May 2025 06:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747921299; x=1748526099; 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=Wl7Gv72rNy8qeJ8HK+1ee82obvQkq1/VilSTPTii5Pw=; b=bqte3ef0d9dwgWBPInqezRHl927T6kqyoMSxgBsJlLw07PkC9BVYwJNLHwh+qb0vqk uFrsgFx4LXNRG0D6xmoO7tgIX+bTcesE6Gk75IqytHqX57coh1XjCL5VnfJAP6YU3k/W RECqCmE1996pbDRQH9uSAxvEUnNaqyBU3mwlzT4yAq3oMe3WmkF7L/YOyt9RI9yRFwXH gwvkA4vDrb43wVPOW2YC9jZD09Dwt63aSB+t8wXz8XJClOJQaLKNQLjyLgk5gx8zDOBj PgwiKq+bzv79h2Qhr7MzC+SqMKc3EMPq5ndKitnWsmb9aKeeZ0Bo74f+zvUZLGGFM36y W4KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747921299; x=1748526099; 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=Wl7Gv72rNy8qeJ8HK+1ee82obvQkq1/VilSTPTii5Pw=; b=WiQdLF5Hm9vOynyqqAKnGZoTyhPwNJp41g6GBUg7FIgOJGjY4cOoFAGzajv01Rggvq K5ifUaQSBVhLcrZgfs3oErlPAlv6n8c5Fwf/f8ABLwU39GAudIjCN4cld+UbV9vkEsaT Am0r4sGvycuwRmKsSSUDKJ0W9BGDbvm3I/GECNkyTHT9IJxcWdCoGO13agEf7xfbk5MD iR4wWdpQIXy2NmrfgMfH6WjRuKgGudOBad2ezgl75CPzRtXfIkykb9kYKijFNxRKJm/K lENj9q4bA5Qyz4xGRoujG85tjkyF0jL33pi230UJx9kJ3yDitB9f6/XND3u3E0BZBLVl fUYg== X-Gm-Message-State: AOJu0YwmbbwbmroYlBZ0l2wbxGqKgDeWIkQ3RqHng9OGjgLNktvVLt7p XGn+6QI+G44C6r4naBIh0UZXO8Phh6fUna66OHxEav92YZfeGQaYSBE3X86syCp6PsFpnJXxzR/ JwllqwXv7riGF X-Gm-Gg: ASbGncu7QEUCKfrKFxU+IgAwjj1vZIqMA3bR9MGW/QLcEpVGk9P82FaM7pV4fnRRQZy bu8hniGcTDwnc0HRaSUGyPYVu2pgfu7qOibLKhZUf2CZOnJ7cw93EJdWD1L83VhONv2Uaw/THXE ctgqsfENNJKeY3YcvkyGtjKDc663XV9Ce3QFGqN6xsAxDi5FN8B3KIhWv12WWlym+TcsdHmDPX9 rcES4b7urY3pkYkUbWG09EPWRCbTUHJm/pHkBOvR+hsNnAvAT5PdTxyImPexf9GGg5AQJ7Zwod7 1QHvV64F1l43v3sBOh1nmo8dQBJorsxE8GZ9J5e27QSOf9zVwv4+WEWZbjq6TeoZ9lrWpFz6LkU sJhVSbaujVfVvOIdgGinBH0Jh9JDQ X-Google-Smtp-Source: AGHT+IHioCZTiSeO82SANN3T0XI8kW1PVpdN3Os4Kk9AL5ks0n7pgMP3RpVh5Uq3s6BqULQSkE/TCA== X-Received: by 2002:a05:6512:438c:b0:54f:c512:89d9 with SMTP id 2adb3069b0e04-550e726a019mr7620168e87.55.1747921299517; Thu, 22 May 2025 06:41:39 -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-550e6f15f8fsm3410312e87.37.2025.05.22.06.41.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 May 2025 06:41:39 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli , Ilias Apalodimas Subject: [PATCH v3 1/3] u-boot: disable CONFIG_BLOBLIST on genericarm64 and qemuarm64 Date: Thu, 22 May 2025 16:41:14 +0300 Message-ID: <20250522134116.254270-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 ; Thu, 22 May 2025 13:41:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/217105 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 v3: added u-boot discussion link to commit message 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 Thu May 22 13:41:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 63518 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 E804EC54ED0 for ; Thu, 22 May 2025 13:41:49 +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.web11.24222.1747921303041044812 for ; Thu, 22 May 2025 06:41:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=MIbLJ9S5; 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-54298ec925bso12506664e87.3 for ; Thu, 22 May 2025 06:41:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747921301; x=1748526101; 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=MIbLJ9S51tIQCTYPDjb8Bof2AJthwsqnhVB7m8gPKUIXMxEZmY5WB825KAMKqSO7V/ aG2QnU9eNIO75PWZw2AUBfBX1VKblysT1y/FlWIXgn+NhKEABumqgGDxXmybI63i2xrq eAqpIKM80FPFzBBEwTgyK0rP/1J4lFKBrp+3KnvE5j6l0rniCldWXxaoC55vNdc/OiJK mO25JroT3WHsThgj2I62H402vX8Sad5q7KD8lDOkhVz2PdujUMJVVKvoYogJcEoM0qrs +Wb81+94vc+3Zo871q/MHjUS0m/lbDKsOibIyhPIbe+BM6Ry8c+kAYGQcA9FcxHdCtLT C11w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747921301; x=1748526101; 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=GyRVA+dSR7yCk+dDbuCh4JGfTjvWrFnII6Re7M/gY38m5v03bePSljGMCUg+36lrIa woRc8KgEfWK5VoVBlBsx59kz2jZPAgAteD2+/VNrkOB6ZT8EDYHsocAyFtEm7t5W4JVr mVs0YvADG6QskDmC15bJsIXDzMxKhDUMKXp/BneWRtoWbBXhHz35kq8+2BFkLFljsJ/V cs9OjbAkGWjYVx3ZMA/kJN9ChDdbRthvIuPLZIWBcPszWf41tvXFHFky6agYycthU7fC 2shgzr5wpO7laO8ASyIxhJK+lgw6MvrTgX2Kg2aK+G7fWHn9Rq+4IcZxvoUdF5ACNOS0 CA8g== X-Gm-Message-State: AOJu0YzD9mQVgvcKCfwzH3g+TbwgJtGpqzcqUdWiHnrZxzqfzaU0Q22N Vs85SDjVext5Ra9TwnWKE3B/4dy7eoIF4qH9vZCh6ysTktN+XcNmMKh6oLIGpsGHyvtP9fRVbjP XjnXT1u1alaql X-Gm-Gg: ASbGnctBzvdtYeFHLBUxP9KsdubBCiVGnPnnqqekfl6P90rXFSvZkjvef0D4k/eBZX1 NOHIOZkShby3h3eQtZpVZdoLm3FEgChi3HFOTatdDiGtXvIxNTyiM9U/70OsYs3Dnw6AAtKiZ+a fbyJgS7vjLidBQLTr1Iv7mnJ3mHOXDzmpd3YKWVJTfGiCeJ7LLWo8rVEAAVS99UpcxOQ50LMF7N xu2qPE1bx/3hZfunq2pVdwx/YR1oRC/H4g3LBoeSTgYI3duCVL8DVkRhtFcrbFOBdUiV3H98qMf FdGq80MLKVat74alOASdiGdhKyPxBb0GH25oVRKtETxcj8LOwsXeO6sn2vVy0KtbGotlfkHzla1 0ak/312PCI3O7B2k0/vavBa1v/J8y X-Google-Smtp-Source: AGHT+IFnsH7S9JkCbRueLhT99Kow9lnHfHqtos9qCiaCcQj/JH6jwAqP0iQwmyzgwGjDRkwyAraTYQ== X-Received: by 2002:a05:6512:159f:b0:545:285f:cd7f with SMTP id 2adb3069b0e04-550e71afb8fmr8835836e87.14.1747921301070; Thu, 22 May 2025 06:41:41 -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-550e6f15f8fsm3410312e87.37.2025.05.22.06.41.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 May 2025 06:41:40 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH 2/3] qemuarm64.conf: allow overriding QB_OPT_APPEND Date: Thu, 22 May 2025 16:41:15 +0300 Message-ID: <20250522134116.254270-2-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250522134116.254270-1-mikko.rapeli@linaro.org> References: <20250522134116.254270-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 ; Thu, 22 May 2025 13:41:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/217106 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 Thu May 22 13:41:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 63520 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 EB963C54F2E for ; Thu, 22 May 2025 13:41:49 +0000 (UTC) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by mx.groups.io with SMTP id smtpd.web11.24223.1747921304467685169 for ; Thu, 22 May 2025 06:41:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=Tza/tx2z; spf=pass (domain: linaro.org, ip: 209.85.167.43, mailfrom: mikko.rapeli@linaro.org) Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-551efcb745eso6140178e87.2 for ; Thu, 22 May 2025 06:41:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747921303; x=1748526103; 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=RGbRSpk+6J6LvdN+BrsYwKjqv9SLszmpHOiD/IQOlI0=; b=Tza/tx2zB8+t3W+BHODPT5O8unbUG007str66SpSLpJ3vxLK4A297hrWPNRiUmgJ31 0RpuOQyKkqpVBMWNbHJ/z//v51S9eI8++7QiUJCu1eqKl14EACPw0bMc2uFAq+SNG2a/ p2L5D+/YzwhPWB+PEb14Uh4/XGw6RBXSfhM52WHloHnjAELjxJEEI9asV7f0o0gzHwn6 4xv7XGwAd+JeY0LpalVBMvOsMmP/uaXS5xQNfwWVyje6J/9WQX5P3BCBSkEmmWuOUQO7 J1Gzs85KG352kxhbrdYnPHqwNUtGu0qxm9L4k9XXPv7yny3dg63RZtynmZITPJ+5s3Hn vW+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747921303; x=1748526103; 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=RGbRSpk+6J6LvdN+BrsYwKjqv9SLszmpHOiD/IQOlI0=; b=KQo5BwnW6MDLVx46xwyiLnvLBKbapiJb/HzBzueBN/WfN58O2ey5n8jXfyNKQahcTm lQb4gJrFInOWiVKJTXzbKi86q3VGl+j8i8CQSHcNtzJMSvDSfw5U32YzodzGIzFpgap2 7N51UoVI0ajV2rhy5AcCEXrclSat44WK6FMTxx1nu6zKDsEvW1dtqFvui/AnK9S+JeZS dftBTiyRoW8DzhWYUbua2YT7m6YRqMCV3p+KJFUEqHUDn/UdnaY8DaviZ+1wT1KpbFUw 7CJhL12uT/QRqD/zojkLjDdNpQ5I8BullX32TcqFVmjiLRD+S2eRFyTEQyLXuZhD/LN0 yAtQ== X-Gm-Message-State: AOJu0YwMMf9iJh86+Z263qajHTonc1mIbeGz6hccQVdF001TCIhIOWhr me0qO9+tCZqemw3gt2Chm3ixHJveYru+UmgXEzuLoaCDmEjyZX3X07X/Qe+MyCqqPq/2DJkhUYX wJ4tE6mTbyhI+ X-Gm-Gg: ASbGnctwi+miEajuNLdbeuDRcJSKL1pEEKCyn5KF4IutXQNZzVSHtgXsbUa3Za/ukZe 7NjbJUknwZT5qqAcLHtdjvRNtshZ7v8e/LqBSv6xo1EvKbiQM3SXu+NA9Uz75VvWcIhF4vN8G5D Ku4g29NrjXajCJMdRcGYvD6nCrfBWZrZelQCx7N1jk0zshvIpKQbYWC4NPoVC3jwNPgM99Qk5b8 glmdaCNuDD7uB+Kvv5Ie3QfzuSkAGOfuccrCNZ8xL6XsoS7apqXIRjy84xdo/qFIB8kycc3l2ys p/eNNvswg609uSZPXl65oaBADVNSQp1yyI3lePl2gyo6yXsQPMhH9o//doXSd5VLEG9Ou/uGxxJ XidxdZvaPLVwMWW8G+FFuG5bNVT7v X-Google-Smtp-Source: AGHT+IFIENZafwysglUwf3QKblsLsxsMC1SvygTkxA+lV8CQWxRp4f3q+UzDzDRYosQFthxgWzVzfg== X-Received: by 2002:ac2:4e07:0:b0:550:e04d:2b81 with SMTP id 2adb3069b0e04-550e71d6d08mr8015156e87.27.1747921302499; Thu, 22 May 2025 06:41:42 -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-550e6f15f8fsm3410312e87.37.2025.05.22.06.41.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 May 2025 06:41:42 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH 3/3] oeqa selftest uboot.py: add qemu KVM test case Date: Thu, 22 May 2025 16:41:16 +0300 Message-ID: <20250522134116.254270-3-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250522134116.254270-1-mikko.rapeli@linaro.org> References: <20250522134116.254270-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 ; Thu, 22 May 2025 13:41:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/217107 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 | 55 ++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/uboot.py b/meta/lib/oeqa/selftest/cases/uboot.py index 39e48f8bdb..982822b389 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, get_bb_var -from oeqa.core.decorator.data import skipIfNotArch +from oeqa.utils.commands import bitbake, runqemu, get_bb_var, runCmd +from oeqa.core.decorator.data import skipIfNotArch, skipIfNotMachine from oeqa.core.decorator import OETestTag uboot_boot_patterns = { @@ -42,3 +42,54 @@ 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']) + # Also works on genericarm64 but no way to encode that currently + @skipIfNotMachine('qemuarm64', 'KVM depends that host and target architectures match, e.g. aarch64 and qemuarm64') + @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") + + 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 = "vd" +# qemu usb causes u-boot reset atm +QB_OPT_APPEND = "" +""") + bitbake("virtual/bootloader core-image-minimal") + + runqemu_params = get_bb_var('TEST_RUNQEMUPARAMS', "core-image-minimal") or "" + with runqemu('core-image-minimal', 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)