Re: [docs] [PATCH] ref-manual/variables.rst: document the INITRAMFS_MAXSIZE variable

Antonin Godard
2025-04-24T08:04:32Z

Hi Christos,

On Wed Apr 23, 2025 at 9:24 PM CEST, Christos Gavros via lists.yoctoproject.org wrote:
> hi Antonin and Quentin
>
> i had a further look on that.
>
> When initramfs is included in build (INITRAMFS_IMAGE = "core-image-minimal-initramfs" in local.conf)
> then the 'IMAGE_ROOTFS' is pointing to build/tmp/work/qemux86_64-poky-linux/core-image-minimal-initramfs/1.0/rootfs.
> This directory is approximately 115000kb.
> If INITRAMFS_MAXSIZE = "1100000" then the error is generated.
> If INITRAMFS_MAXSIZE = "1600000" then the build is ok.
> So i think that the INITRAMFS_MAXSIZE refers to the size of the directory and not the final image type.

How were your IMAGE_OVERHEAD_FACTOR and IMAGE_ROOTFS_ALIGNMENT variables set
during your test? I'm pretty sure they affect the final condition when I looked
at the code a couple of weeks ago.

Could you include how these two variables affect the final condition with
regards to INITRAMFS_MAXSIZE?

> The condition " if image_fstypes == initramfs_fstypes != ''  and initramfs_maxsize: ", exists
> because in the recipe "core-image-minimal-initramfs" there is the assignment IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}".
> So the INITRAMFS_MAXSIZE is evaluated only when one of the initramfs recipes is included.
>
> Shall i submit a v2 ?

I think Quentin had valid comments on your patch:
week -> weak
the size is in kilobytes, not bytes

I'll let you take a second look at their comments.

Thanks,
Antonin

--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering