All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bruce Ashfield" <bruce.ashfield@gmail.com>
To: Patrick Godwin <pbg.dev@outlook.com>
Cc: "meta-virtualization@lists.yoctoproject.org"
	<meta-virtualization@lists.yoctoproject.org>
Subject: Re: [meta-virtualization] Building xen-image-minimal for RPi4 Compute Module
Date: Thu, 11 Nov 2021 09:52:55 -0500	[thread overview]
Message-ID: <CADkTA4NLB7k+oF0K1YeXuGchi8UJHsHQtEdmKvvZcN1jNxoQnA@mail.gmail.com> (raw)
In-Reply-To: <CO1PR08MB7016339CB7AA08CE6D133344F08F9@CO1PR08MB7016.namprd08.prod.outlook.com>

Sorry for the slow reply,

On Fri, Nov 5, 2021 at 11:45 PM Patrick Godwin <pbg.dev@outlook.com> wrote:
>
> I'm in the process of building xen-image-minimal for my Raspberry Pi 4 Compute Module and am hitting some issues when running the image on physical hardware. Upon inspecting the boot partition of the sd-card, I noticed that the image only contained the dtb for the Raspberry Pi 4B; this makes sense when I look at xen-raspberrypi4-64.inc:
>

Not sure if you've sorted this out yet.

We do have reference images that booted on the RPI, but I can't say that I've
been testing them myself. I'm hoping that my reply will catch the attention of
those that do have the h/w and they can comment in more detail.

>     # Override the meta-raspberrypi default kernel preference
>     PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
>     KERNEL_DEVICETREE ?= "broadcom/bcm2711-rpi-4-b.dtb"
>
> Compared with the device tree blobs declared in meta-raspberrypi's raspberrypi4-64.conf:
>
>     RPI_KERNEL_DEVICETREE = " \
>         broadcom/bcm2711-rpi-4-b.dtb \
>         broadcom/bcm2711-rpi-400.dtb \
>         broadcom/bcm2711-rpi-cm4.dtb \
>     "
>
> Looking into it further, it seems that the device tree listing in the kernel used in the xen-image-minimal build doesn't contain the newer firmware blobs contained in meta-raspberrypi, which causes devices like ethernet to fail to start up when the image finally boots.
>

There's a different level of support on the h/w between linux-yocto and the
'vendor' rpi tree. We use linux-yocto for the core enablement because the
branches are stable/not rebased and have a cadence we can predict (all
mentioned things are breakages we've hit before!).

That being said, you can change the kernel provider to the linux-rpi, and
the rest of the meta-virt settings, etc, are still applicable and should work.

> I've tried adding the bcm2711-rpi-cm4 firmware blob to the SD card manually, but that causes u-boot to fail with the error "Bad Linux ARM64 Image Magic!" after the Boot Xen step in output. I also tried manually replacing the bootfiles written by the xen sd card image with the latest blobs from meta-raspberrypi's packages, but once the OS boots I find that xen is no longer running, making me suspect I screwed up the configuration somewhere.
>

It could be a kernel configuration issue between the two images, if
the Xen packages are on the image, but nothing is running. Can you
interact with the Xen support via the xen cli at all ? Just to get a
better error message ?

> Is this something I can trivially fix? Is there a way for me to override the device tree selection used by the minimal xen image in my local.conf? Or do I need to investigate patching one of the meta-virtualization recipes?

Anything that needs changing, should be overridable via variable or
through bbappends, so hopefully no patching is required.

Bruce

>
> (Apologies if I've used any of the wrong lingo/terms here; still new to RasPi/Yocto/Xen :D)
>
>
> 
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

  reply	other threads:[~2021-11-11 14:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-06  3:45 Building xen-image-minimal for RPi4 Compute Module pbg.dev
2021-11-11 14:52 ` Bruce Ashfield [this message]
2021-11-15  7:29   ` [meta-virtualization] " Patrick Godwin
     [not found]   ` <16B7A7B60457CCFF.31948@lists.yoctoproject.org>
2021-11-23  1:00     ` Patrick Godwin

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=CADkTA4NLB7k+oF0K1YeXuGchi8UJHsHQtEdmKvvZcN1jNxoQnA@mail.gmail.com \
    --to=bruce.ashfield@gmail.com \
    --cc=meta-virtualization@lists.yoctoproject.org \
    --cc=pbg.dev@outlook.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.