Re: New assignment operator?

Mark Hatle

On 6/15/21 9:15 AM, Richard Purdie wrote:
On Tue, 2021-06-15 at 16:50 +0300, Petr Nechaev wrote:
Hi All,

I've been using bitbake for >5 years now, however I do not understand 
the nature of the problem at all. Could you clarify what the problem is 
i.e. what's the difference between these lines:

VAR_A = "${VAR_B}"
Consider this example where the BSP sets:

IMAGE_FSTYPES_somemachine = "ext4"

then the initramfs image recipe does:


Given that config, if you set MACHINE = "somemachine", which image 
type would you expect the initramfs image to have?

The answer is that it will try and generate an ext4 initramfs. 
What you'd expect/want is a cpio initramfs.

The reason is that the machine override, i.e.:

IMAGE_FSTYPES_somemachine = "ext4"

cannot be undone.
I've hit this issue in the past (different context, but I believe the same
issue). What I end up doing is (in the initramfs) is effectively:

OVERRIDES .= ":ramfs"
IMAGE_FSTYPES_ramfs = "cpio"

doing this in the recipe (or a bbclass that should only be loaded by a recipe)
ensures that we can set IMAGE_FSTYPE to a specific value, and avoids the
specific issue mentioned here.

(At least it worked well in the case I needed it for, not sure if it would here,
but it may be what is needed.)




Join to automatically receive all group messages.