Re: New assignment operator?

Tom Rini

On Tue, Jun 15, 2021 at 11:29:01AM +0100, Richard Purdie wrote:

We have an interesting problem with initramfs images.
I'm going to intentionally avoid using "image" as gets overloaded I

This is because an initramfs can be more than one of:
- The only filesystem container we create for a MACHINE
- A filesystem container that gets bundled inside of the kernel vmlinux.
- A filesystem container that gets bundled inside of a container along
side a kernel (zImage, Image, etc), one or more device trees and
perhaps other blobs.
- A filesystem container that gets placed inside of another filesystem
via wic.

And once you start to add in the why for those use cases, things can get
racey too.

They do something like:


which looks innocent enough until a BSP does:

IMAGE_FSTYPES_collie = "xxx"

where collie is MACHINE, hence an override which causes confusion asĀ 
the value of INITRAMFS_FSTYPES is never used for that machine.
And this starts to be a lot more common of a problem than it might seem,
once you start having multiple cases from the list I made above in use.
When you aren't dealing with public layers, the fix is "easy" and it's
to adjust the machine confs and image recipes to not do what they were

What I want to suggest is that the problem is with how we treat
initramfs like it's another image, when it's not. What if for this
problem we treat INITRAMFS_FSTYPES separate from IMAGE_FSTYPES? Make
them "inherit initramfs" which in turn generates filesystem containers
based only on what INITRAMFS_FSTYPES evaluates out to. And soft-assign
that to cpio.gz by default.

This is a long standing issue where in standard metadata, there is no way
to undo an override (or append/prepend/remove).
This is a separate problem. Is there some way to make remove be the
last operation? One of:
FOO_remove = "bar"
FOO_forcevariable_remove = "baz"

really ought to do what I mean and take bar or baz out of FOO. Even if
some part of OVERRIDE prior to forcevariable puts it in.


Join to automatically receive all group messages.