public inbox for poky@lists.yoctoproject.org
 help / color / mirror / Atom feed
From: "Antonin Godard" <antonin.godard@bootlin.com>
To: <adrian.freihofer@siemens.com>, <poky@lists.yoctoproject.org>
Subject: Re: [poky] [PATCH 4/4] oe-selftest: add a beaglebone-yocto fitimage Qemu test
Date: Wed, 25 Jun 2025 08:56:26 +0200	[thread overview]
Message-ID: <DAVF299ZN27S.1C7D9FG8EU5MT@bootlin.com> (raw)
In-Reply-To: <20250621162642.804605-5-adrian.freihofer@siemens.com>

On Sat Jun 21, 2025 at 6:26 PM CEST, Adrian Freihofer via lists.yoctoproject.org wrote:
> From: Adrian Freihofer <adrian.freihofer@siemens.com>
>
> The kernel configuration of the beaglebone-yocto MACHINE supports booting
> on real hardware as well as in Qemu. Add an oe-selftest which tests that
> booting in Qemu is possible even when the kernel is a FIT image kernel
> with a RAM disk.
> Since Qemu does not support FIT images, Qemu boots the zImage in direct
> kernel mode. This works with or without initramfs.
>
> Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
> ---
>  .../selftest/cases/beaglebone_yocto_qemu.py   | 39 +++++++++++++++++++
>  1 file changed, 39 insertions(+)
>  create mode 100644 meta-yocto-bsp/lib/oeqa/selftest/cases/beaglebone_yocto_qemu.py
>
> diff --git a/meta-yocto-bsp/lib/oeqa/selftest/cases/beaglebone_yocto_qemu.py b/meta-yocto-bsp/lib/oeqa/selftest/cases/beaglebone_yocto_qemu.py
> new file mode 100644
> index 00000000000..aeae431fd2c
> --- /dev/null
> +++ b/meta-yocto-bsp/lib/oeqa/selftest/cases/beaglebone_yocto_qemu.py
> @@ -0,0 +1,39 @@
> +
> +from oeqa.selftest.case import OESelftestTestCase
> +from oeqa.utils.commands import runCmd, bitbake, runqemu, runqemu_check_taps
> +from oeqa.core.decorator import OETestTag
> +
> +
> +class BeagleboneYoctoQemuTests(OESelftestTestCase):
> +
> +    @OETestTag("runqemu")
> +    def test_fit_image_initramfs_qemu(self):
> +        """
> +        Summary:     Verify building an image including a FIT image kernel and booting in Qemu works.
> +        Expected:    1. core-image-minimal including a FIT image in /boot gets built
> +                     2. Qemu can boot the zImage and initramfs with direct kernel boot
> +                        since Qemu does not support FIT images
> +        """
> +
> +        config = """
> +DISTRO = "poky"
> +MACHINE = "beaglebone-yocto"
> +INITRAMFS_IMAGE = "core-image-initramfs-boot"
> +FIT_IMAGE_KERNEL = "1"
> +# Do not override kernel command line network configuration
> +BAD_RECOMMENDATIONS:append:pn-oe-selftest-image = " init-ifupdown"
> +"""
> +        self.write_config(config)
> +        if not runqemu_check_taps():
> +            self.skipTest('No tap devices found - you must set up tap devices with scripts/runqemu-gen-tapdevs before running this test')
> +        testimage = "oe-selftest-image"
> +        bitbake(testimage)
> +        # Boot the image
> +        with runqemu(testimage) as qemu:
> +            # Run a test command to see if it was installed properly
> +            sshargs = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
> +            result = runCmd('ssh %s root@%s %s' % (sshargs, qemu.ip, "ls -1 /boot"))
> +            self.logger.debug("ls -1 /boot: %s" % str(result.output))
> +            boot_files = result.output.splitlines()
> +            self.assertIn("fitImage", boot_files)
> +            self.assertNotIn("zImage", boot_files)

Hi Adrian,

I think this is causing the following issue on the autobuilder:

ERROR: Nothing RPROVIDES 'ssh-pregen-hostkeys' (but /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-730917/meta-selftest/recipes-test/images/oe-selftest-image.bb RDEPENDS on or otherwise requires it)
ssh-pregen-hostkeys was skipped: incompatible with machine beaglebone-yocto (not in COMPATIBLE_MACHINE)

Can you look into it?

Thanks,
Antonin

-- 
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



      reply	other threads:[~2025-06-25  6:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-21 16:26 [PATCH 0/4] FIT image beaglebone-yocto (poky part) AdrianF
2025-06-21 16:26 ` [PATCH 1/4] beaglebone-yocto: support initramfs in qemu AdrianF
2025-06-21 16:26 ` [PATCH 2/4] beaglebone-yocto: support FIT images AdrianF
2025-06-21 16:26 ` [PATCH 3/4] beaglebone-yocto: remove redundant boot files AdrianF
2025-06-21 16:26 ` [PATCH 4/4] oe-selftest: add a beaglebone-yocto fitimage Qemu test AdrianF
2025-06-25  6:56   ` Antonin Godard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DAVF299ZN27S.1C7D9FG8EU5MT@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=adrian.freihofer@siemens.com \
    --cc=poky@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox