| Message ID | 20251212-image-container-v1-1-fb6586d06813@bootlin.com |
|---|---|
| State | Superseded |
| Headers | show |
| Series | Document the image-container class | expand |
Hi Antonin, Seems like the SMTP server only sent the mail to myself and not other recipients. I've got to stop using this corporate setup, it's only bringing me pain. I've already removed what I told in patch 2 was to be scratched in patch 1 ;) On 12/12/25 11:22 AM, Antonin Godard via lists.yoctoproject.org wrote: > Added in OE-Core with commit f0645e172bb8 ("image-container.bbclass: > Error if not using linux-dummy"). > > Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> > --- > documentation/ref-manual/variables.rst | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst > index 71fe11b83..ac7b85992 100644 > --- a/documentation/ref-manual/variables.rst > +++ b/documentation/ref-manual/variables.rst > @@ -3955,6 +3955,13 @@ system and gives an overview of their function and contents. > variable, see the :ref:`ref-classes-image_types` > class file, which is ``meta/classes-recipe/image_types.bbclass``. > > + :term:`IMAGE_CONTAINER_NO_DUMMY` > + When inheriting the :ref:`ref-classes-image-container` class, this variable > + can be set to "1" to allow a :term:`PREFERRED_PROVIDER` for the Linux kernel > + (``virtual/kernel``) different than ``linux-dummy``. > + This seems to imply to me the default is "linux-dummy" but that isn't the case. Why would anyone select linux-dummy? A few words or cross-referencing another part of the doc where this would be explained would be nice. This also *could* imply that setting IMAGE_CONTAINER_NO_DUMMY to 0 is going to do automagic stuff for PREFERRED_PROVIDER but it isn't. I would add something like: :term:`PREFERRED_PROVIDER` also needs to be explicitly specified for ``virtual/kernel`` (e.g. ``linux-dummy``, ``linux-yocto``, ...). > + This variable should be set from a :term:`Configuration File`. > + Are you sure about that? This variable is handled from a recipe class, itself inherited only when the IMAGE_FSTYPES contains "container". The examples in meta-virtualization all have it set in an image recipe. Cheers, Quentin
Hi, On Tue Dec 16, 2025 at 11:04 AM CET, Quentin Schulz via lists.yoctoproject.org wrote: > Hi Antonin, > > Seems like the SMTP server only sent the mail to myself and not other > recipients. I've got to stop using this corporate setup, it's only > bringing me pain. > > I've already removed what I told in patch 2 was to be scratched in patch > 1 ;) > > On 12/12/25 11:22 AM, Antonin Godard via lists.yoctoproject.org wrote: >> Added in OE-Core with commit f0645e172bb8 ("image-container.bbclass: >> Error if not using linux-dummy"). >> >> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> >> --- >> documentation/ref-manual/variables.rst | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst >> index 71fe11b83..ac7b85992 100644 >> --- a/documentation/ref-manual/variables.rst >> +++ b/documentation/ref-manual/variables.rst >> @@ -3955,6 +3955,13 @@ system and gives an overview of their function and contents. >> variable, see the :ref:`ref-classes-image_types` >> class file, which is ``meta/classes-recipe/image_types.bbclass``. >> >> + :term:`IMAGE_CONTAINER_NO_DUMMY` >> + When inheriting the :ref:`ref-classes-image-container` class, this variable >> + can be set to "1" to allow a :term:`PREFERRED_PROVIDER` for the Linux kernel >> + (``virtual/kernel``) different than ``linux-dummy``. >> + > > This seems to imply to me the default is "linux-dummy" but that isn't > the case. Why would anyone select linux-dummy? A few words or > cross-referencing another part of the doc where this would be explained > would be nice. > > This also *could* imply that setting IMAGE_CONTAINER_NO_DUMMY to 0 is > going to do automagic stuff for PREFERRED_PROVIDER but it isn't. I would > add something like: > > :term:`PREFERRED_PROVIDER` also needs to be explicitly specified for > ``virtual/kernel`` (e.g. ``linux-dummy``, ``linux-yocto``, ...). When building an image that inherits the image-container class, it's preferred that PREFERRED_PROVIDER_virtual/kernel is set to "linux-dummy" globally. >> + This variable should be set from a :term:`Configuration File`. >> + > > Are you sure about that? This variable is handled from a recipe class, > itself inherited only when the IMAGE_FSTYPES contains "container". The > examples in meta-virtualization all have it set in an image recipe. Indeed, setting this from the image recipe should be enough. Rephrased to: """ When an image recipe inherits the :ref:`ref-classes-image-container` class, it expects the :term:`PREFERRED_PROVIDER` for the Linux kernel (``virtual/kernel``) to be set to ``linux-dummy`` from a :term:`configuration file`. Otherwise, an error is triggered. The :term:`IMAGE_CONTAINER_NO_DUMMY` variable allows the :term:`PREFERRED_PROVIDER` variable to be set to another value, thus skipping the check and not triggering the build error. This variable should be set from the image recipe inheriting the :ref:`ref-classes-image-container` class. See the documentation of the :ref:`ref-classes-image-container` class for more information on why setting the :term:`PREFERRED_PROVIDER` to ``linux-dummy`` is advised with this class. """ Thanks, Antonin
On 12/16/25 11:50 AM, Antonin Godard wrote: > Hi, > > On Tue Dec 16, 2025 at 11:04 AM CET, Quentin Schulz via lists.yoctoproject.org wrote: >> Hi Antonin, >> >> Seems like the SMTP server only sent the mail to myself and not other >> recipients. I've got to stop using this corporate setup, it's only >> bringing me pain. >> >> I've already removed what I told in patch 2 was to be scratched in patch >> 1 ;) >> >> On 12/12/25 11:22 AM, Antonin Godard via lists.yoctoproject.org wrote: >>> Added in OE-Core with commit f0645e172bb8 ("image-container.bbclass: >>> Error if not using linux-dummy"). >>> >>> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> >>> --- >>> documentation/ref-manual/variables.rst | 7 +++++++ >>> 1 file changed, 7 insertions(+) >>> >>> diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst >>> index 71fe11b83..ac7b85992 100644 >>> --- a/documentation/ref-manual/variables.rst >>> +++ b/documentation/ref-manual/variables.rst >>> @@ -3955,6 +3955,13 @@ system and gives an overview of their function and contents. >>> variable, see the :ref:`ref-classes-image_types` >>> class file, which is ``meta/classes-recipe/image_types.bbclass``. >>> >>> + :term:`IMAGE_CONTAINER_NO_DUMMY` >>> + When inheriting the :ref:`ref-classes-image-container` class, this variable >>> + can be set to "1" to allow a :term:`PREFERRED_PROVIDER` for the Linux kernel >>> + (``virtual/kernel``) different than ``linux-dummy``. >>> + >> >> This seems to imply to me the default is "linux-dummy" but that isn't >> the case. Why would anyone select linux-dummy? A few words or >> cross-referencing another part of the doc where this would be explained >> would be nice. >> >> This also *could* imply that setting IMAGE_CONTAINER_NO_DUMMY to 0 is >> going to do automagic stuff for PREFERRED_PROVIDER but it isn't. I would >> add something like: >> >> :term:`PREFERRED_PROVIDER` also needs to be explicitly specified for >> ``virtual/kernel`` (e.g. ``linux-dummy``, ``linux-yocto``, ...). > > When building an image that inherits the image-container class, it's preferred > that PREFERRED_PROVIDER_virtual/kernel is set to "linux-dummy" globally. > Yes, but this isn't the default in bitbake.conf or anywhere for that matter so it *needs* to be set to something (linux-dummy would be the preferred one as typically containers do not run their own kernel). >>> + This variable should be set from a :term:`Configuration File`. >>> + >> >> Are you sure about that? This variable is handled from a recipe class, >> itself inherited only when the IMAGE_FSTYPES contains "container". The >> examples in meta-virtualization all have it set in an image recipe. > > Indeed, setting this from the image recipe should be enough. > > Rephrased to: > > """ > When an image recipe inherits the :ref:`ref-classes-image-container` > class, it expects the :term:`PREFERRED_PROVIDER` for the Linux kernel > (``virtual/kernel``) to be set to ``linux-dummy`` from a > :term:`configuration file`. Otherwise, an error is triggered. > > The :term:`IMAGE_CONTAINER_NO_DUMMY` variable allows the > :term:`PREFERRED_PROVIDER` variable to be set to another value, thus skipping > the check and not triggering the build error. > > This variable should be set from the image recipe inheriting the > :ref:`ref-classes-image-container` class. > From patch 2, image-container isn't to be inherited manually, but IMAGE_FSTYPES needs to have "container" in it. Though the end result is the same... not sure it's worth the complexity in the docs. Or maybe just remove everything after "image recipe" (keep the paragraph below here though...). Or say "by adding "container" to :term:`IMAGE_FSTYPES`"? See also first sentence in this suggested section ("When an image recipe inherits..."), probably would need the same clarification. > See the documentation of the :ref:`ref-classes-image-container` class for more > information on why setting the :term:`PREFERRED_PROVIDER` to ``linux-dummy`` is > advised with this class. > """ Cheers, Quentin
Hi, On Tue Dec 16, 2025 at 12:01 PM CET, Quentin Schulz wrote: [...] > From patch 2, image-container isn't to be inherited manually, but > IMAGE_FSTYPES needs to have "container" in it. Though the end result is > the same... not sure it's worth the complexity in the docs. Or maybe > just remove everything after "image recipe" (keep the paragraph below > here though...). Or say "by adding "container" to > :term:`IMAGE_FSTYPES`"? See also first sentence in this suggested > section ("When an image recipe inherits..."), probably would need the > same clarification. Yes, just realized this… I'm reworking the class and variable documentation, to say that IMAGE_FSTYPES is enough to use this class. Antonin
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 71fe11b83..ac7b85992 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -3955,6 +3955,13 @@ system and gives an overview of their function and contents. variable, see the :ref:`ref-classes-image_types` class file, which is ``meta/classes-recipe/image_types.bbclass``. + :term:`IMAGE_CONTAINER_NO_DUMMY` + When inheriting the :ref:`ref-classes-image-container` class, this variable + can be set to "1" to allow a :term:`PREFERRED_PROVIDER` for the Linux kernel + (``virtual/kernel``) different than ``linux-dummy``. + + This variable should be set from a :term:`Configuration File`. + :term:`IMAGE_DEVICE_TABLES` Specifies one or more files that contain custom device tables that are passed to the ``makedevs`` command as part of creating an image.
Added in OE-Core with commit f0645e172bb8 ("image-container.bbclass: Error if not using linux-dummy"). Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- documentation/ref-manual/variables.rst | 7 +++++++ 1 file changed, 7 insertions(+)