From patchwork Sun Nov 29 00:07:08 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 106266 Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [80.241.56.161]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.5747.1795910848595209428 for ; Sat, 28 Nov 2026 16:07:28 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@mailbox.org header.s=mail20150812 header.b=k6bUTujM; spf=pass (domain: mailbox.org, ip: 80.241.56.161, mailfrom: marek.vasut@mailbox.org) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4jcSC10x5KzKmxW; Sun, 29 Nov 2026 01:07:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1795910845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=HsDbgUaLnW9y33SoEF+ARRM6HHhYuQhe+FdZmq5EU10=; b=k6bUTujMjv8YzKM5jY/mmaTfxuJT2ptZ8iwfJOlMF9Z058cGyTHGxRxSDVm3W5qnSQNGZ8 msoPk4lP90lNuGVEbzNrYvqQuxQM7+dN2WD+ez9uAPFhtNWL8ZX/cP0A8ADiePhgzUvwu6 8TvkaJnnkQJV5gCghLhvqhnYONhBJCVzkc1AsCJhg+qxyY212HQ19zdvGM5rnAFTeYJdJX /7Kddsncml83gtaKKz+z1L/WSMVv7uqILT6g9XkMYhTBVZ0aECoKgXs6nbT2aSxQW2KkEE ZsxBkv1z2pPdaR5c6rk/q2JK37mos6DNQ9MtGlxv/JQsr25TGudK1qERmr/aqg== From: Marek Vasut To: openembedded-core@lists.openembedded.org Cc: Marek Vasut , Fabio Estevam , Ross Burton , Ryan Eatmon , Yoann Congal Subject: [PATCH 1/2] selftest: uboot: Test UBOOT_ELF Date: Sun, 29 Nov 2026 01:07:08 +0100 Message-ID: <20261129000720.272757-1-marek.vasut@mailbox.org> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 X-MBO-RS-ID: a6b97758b0c507fdc81 X-MBO-RS-META: du1b6z8c43511swx1sb4rrcwddsfykjf List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Sun, 29 Nov 2026 00:07:37 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251510 Test handling of UBOOT_ELF , which is a configuration that ships u-boot.elf alongside U-Boot build artifacts. The u-boot.elf may not be built by default, so build it explicitly via UBOOT_MAKE_TARGET. Test for the u-boot.elf file existence after the build. Signed-off-by: Marek Vasut --- Cc: Fabio Estevam Cc: Ross Burton Cc: Ryan Eatmon Cc: Yoann Congal --- meta/lib/oeqa/selftest/cases/uboot.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/uboot.py b/meta/lib/oeqa/selftest/cases/uboot.py index 847fa205a13..fc2aea7d03a 100644 --- a/meta/lib/oeqa/selftest/cases/uboot.py +++ b/meta/lib/oeqa/selftest/cases/uboot.py @@ -98,6 +98,26 @@ QB_DRIVE_TYPE = "/dev/vd" # with KVM enabled self.assertTrue("KVM: hypervisor services detected" in output, msg=output) + def test_uboot_elf_binary(self): + """ + Tests building the U-Boot u-boot.elf file. + """ + + self.write_config(textwrap.dedent(""" + UBOOT_MAKE_TARGET = "u-boot.elf" + UBOOT_ELF = "u-boot.elf" + """)) + + bitbake("u-boot") + + bb_vars = get_bb_vars(["DEPLOYDIR", "UBOOT_ELF_BINARY"], "u-boot") + + uboot_elf_binary_path = os.path.realpath(os.path.join( + bb_vars["DEPLOYDIR"], bb_vars["UBOOT_ELF_BINARY"] + )) + + self.assertExists(uboot_elf_binary_path) + def test_uboot_initial_env_binary(self): """ Tests building the initial U-Boot environment in binary format with From patchwork Sun Nov 29 00:07:09 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 106267 Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.5907.1795910849306321470 for ; Sat, 28 Nov 2026 16:07:29 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@mailbox.org header.s=mail20150812 header.b=h2oU3k1k; spf=pass (domain: mailbox.org, ip: 80.241.56.171, mailfrom: marek.vasut@mailbox.org) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4jcSC16TcHzMlm5; Sun, 29 Nov 2026 01:07:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1795910845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aG/nDz8C2lmRaetThyFQ306HScwyj0FmM5g1Z9yMF54=; b=h2oU3k1k+tTxM7AZrshiyjNCg99XeO2l5owrYnGe7WuNgBk+VrL9fd18OqkceGJl/aiTvt b2wfhclyZtX0FiN8uKBjqueIJCI9yXADPzdOoYFG22oBhYjAo1sSSJJsk6P+8jWJSjkGN/ 6HAFR0f7piFwv/y29K2iKTmgxWAFhWjYsOKc9Yt/a8S4hCUTzecBEL8x1YYp1umFVKe2zb e1hP9h0lWiNxpgfxmehBwcnjJeU9SJg/oKjfruKGOahEY0tr5AEz9AKyVP5GxlYm0JTIMz OpUSAOynJnhtKNTv88Q0wvmW+LrafGBHO4QKicrIlLUD396w5UtbiOOnnu+r0A== From: Marek Vasut To: openembedded-core@lists.openembedded.org Cc: Marek Vasut , Fabio Estevam , Ross Burton , Ryan Eatmon , Yoann Congal Subject: [PATCH 2/2] selftest: uboot: Test UBOOT_ELF_SREC Date: Sun, 29 Nov 2026 01:07:09 +0100 Message-ID: <20261129000720.272757-2-marek.vasut@mailbox.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261129000720.272757-1-marek.vasut@mailbox.org> References: <20261129000720.272757-1-marek.vasut@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: 9efa5e564baefc5f3f4 X-MBO-RS-META: uw6bqpyaxo1shx56171puusku6a6wdqp List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Sun, 29 Nov 2026 00:07:37 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251511 Test handling of UBOOT_ELF_SREC , which is a configuration that ships u-boot-elf.srec alongside U-Boot build artifacts. The u-boot.elf may not be built by default, so build it explicitly via UBOOT_MAKE_TARGET. Test for the u-boot-elf.srec file existence after the build and confirm that it is an S-record file by matching on the leading Sn characters that must be present in an S-record file. Signed-off-by: Marek Vasut --- Cc: Fabio Estevam Cc: Ross Burton Cc: Ryan Eatmon Cc: Yoann Congal --- DEPENDS: https://lists.openembedded.org/g/openembedded-core/message/250303 https://patchwork.yoctoproject.org/project/oe-core/patch/20261116011833.2775540-1-marek.vasut@mailbox.org/ --- meta/lib/oeqa/selftest/cases/uboot.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/uboot.py b/meta/lib/oeqa/selftest/cases/uboot.py index fc2aea7d03a..556b1277330 100644 --- a/meta/lib/oeqa/selftest/cases/uboot.py +++ b/meta/lib/oeqa/selftest/cases/uboot.py @@ -6,7 +6,9 @@ # import os +import re import textwrap +import oeqa.utils.ftools as ftools from oeqa.selftest.case import OESelftestTestCase from oeqa.utils.commands import bitbake, runqemu, get_bb_var, get_bb_vars @@ -118,6 +120,30 @@ QB_DRIVE_TYPE = "/dev/vd" self.assertExists(uboot_elf_binary_path) + def test_uboot_elf_srec_binary(self): + """ + Tests building the U-Boot u-boot-elf.srec file. + """ + + self.write_config(textwrap.dedent(""" + UBOOT_MAKE_TARGET = "u-boot-elf.srec" + UBOOT_ELF_SREC = "u-boot-elf.srec" + """)) + + bitbake("u-boot") + + bb_vars = get_bb_vars(["DEPLOYDIR", "UBOOT_ELF_SREC_BINARY"], "u-boot") + + uboot_elf_srec_binary_path = os.path.realpath(os.path.join( + bb_vars["DEPLOYDIR"], bb_vars["UBOOT_ELF_SREC_BINARY"] + )) + + self.assertExists(uboot_elf_srec_binary_path) + + contents = ftools.read_file(uboot_elf_srec_binary_path) + find_in_contents = re.search(r"^S[0-9]", contents) + self.assertTrue(find_in_contents, msg = "Generated %s is not an S-record" % uboot_elf_srec_binary_path) + def test_uboot_initial_env_binary(self): """ Tests building the initial U-Boot environment in binary format with