public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
From: "Antonin Godard" <antonin.godard@bootlin.com>
To: "Christos Gavros" <gavrosc@yahoo.com>, <docs@lists.yoctoproject.org>
Cc: "Yoann Congal" <yoann.congal@smile.fr>,
	"Randy MacLeod" <randy.macleod@windriver.com>,
	"Antonin Godard" <antonin.godard@bootlin.com>,
	"Quentin Schulz" <quentin.schulz@cherry.de>
Subject: Re: [PATCH] ref-manual/variables.rst: document the INITRAMFS_MAXSIZE variable
Date: Wed, 02 Apr 2025 14:24:50 +0200	[thread overview]
Message-ID: <D8W5FXUH9TEX.2D2J4Y2B5HOME@bootlin.com> (raw)
In-Reply-To: <20250328205213.93625-1-gavrosc@yahoo.com>

Hi Christos,

On Fri Mar 28, 2025 at 9:52 PM CET, Christos Gavros wrote:
> This variable specifies the maximum allowed size
> of the initramfs image in bytes.
> Fixes [YOCTO #15797]
>
> CC: Yoann Congal <yoann.congal@smile.fr>
> CC: Randy MacLeod <randy.macleod@windriver.com>
> CC: Antonin Godard <antonin.godard@bootlin.com>
> Signed-off-by: Christos Gavros <gavrosc@yahoo.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 62e339ed8..c9c042096 100644
> --- a/documentation/ref-manual/variables.rst
> +++ b/documentation/ref-manual/variables.rst
> @@ -4474,6 +4474,13 @@ system and gives an overview of their function and contents.
>        See the :term:`MACHINE` variable for additional
>        information.
>  
> +   :term:`INITRAMFS_MAXSIZE`
> +      Specifies the maximum allowed size of the initramfs image in bytes.
> +      The build will fail in case the initramfs image size is bigger than
> +      the value of this variable.
> +      There is a week default value assignment (INITRAMFS_MAXSIZE ??= "131072" )

Not sure this was covered by Quentin but either the default value here needs to
be enclosed with ticks: (``INITRAMFS_MAXSIZE ??= "131072" ``).

Or better I think, we should specify where it is defined without specifying the
default value, which may evolve over time.
Like so: :oe_git:`meta/conf/bitbake.conf </openembedded-core/tree/meta/conf/bitbake.conf>`

> +      in bitbake.conf.
> +
>     :term:`INITRAMFS_MULTICONFIG`
>        Defines the multiconfig to create a multiconfig dependency to be used by
>        the :ref:`ref-classes-kernel` class.

Looking at the code of image.bbclass, we have:

  size_kb = oe.utils.directory_size(d.getVar("IMAGE_ROOTFS")) / 1024

So, it seems that the size is calculated regardless of any compression parameter
since it calculates the size of the directory?

Otherwise, there are more considerations to take into account. We have the
overhead_factor and rootfs_alignment.

Actually, INITRAMFS_MAXSIZE is going though the same operations as
IMAGE_ROOTFS_MAXSIZE, from what I read from the code.

It would be nice to include how IMAGE_OVERHEAD_FACTOR and IMAGE_ROOTFS_ALIGNMENT
affect this variable too. This is missing in the IMAGE_ROOTFS_MAXSIZE
documentation as well. :/

Antonin

-- 
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


  parent reply	other threads:[~2025-04-02 12:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250328205213.93625-1-gavrosc.ref@yahoo.com>
2025-03-28 20:52 ` [PATCH] ref-manual/variables.rst: document the INITRAMFS_MAXSIZE variable Christos Gavros
2025-03-31  8:51   ` [docs] " Quentin Schulz
2025-03-31  9:24     ` Christos Gavros
2025-04-01 19:43       ` Christos Gavros
2025-04-02  9:15         ` [docs] " Quentin Schulz
2025-04-02 12:24   ` Antonin Godard [this message]
2025-04-02 14:19     ` Christos Gavros
2025-04-23 19:24       ` Christos Gavros
2025-04-24  8:04         ` [docs] " Antonin Godard
2025-04-24 15:18           ` Christos Gavros
2025-04-25  7:34             ` [docs] " Antonin Godard
2025-04-25  8:35               ` Christos Gavros

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=D8W5FXUH9TEX.2D2J4Y2B5HOME@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=docs@lists.yoctoproject.org \
    --cc=gavrosc@yahoo.com \
    --cc=quentin.schulz@cherry.de \
    --cc=randy.macleod@windriver.com \
    --cc=yoann.congal@smile.fr \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox