diff mbox series

genericarm64.conf: set runqemu memory config to 512 Mb

Message ID 20251223082457.3465827-1-mikko.rapeli@linaro.org (mailing list archive)
State New
Headers show
Series genericarm64.conf: set runqemu memory config to 512 Mb | expand

Commit Message

Mikko Rapeli Dec. 23, 2025, 8:24 a.m. UTC
The genericarm64 initramfs is larger than 256 Mb which is
the default runqemu memory config and thus boot fails when
extracted initramfs does not fit.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 meta-yocto-bsp/conf/machine/genericarm64.conf | 1 +
 1 file changed, 1 insertion(+)

Comments

Khem Raj Dec. 23, 2025, 8:28 p.m. UTC | #1
On Tue, Dec 23, 2025 at 12:25 AM Mikko Rapeli via lists.yoctoproject.org
<mikko.rapeli=linaro.org@lists.yoctoproject.org> wrote:

> The genericarm64 initramfs is larger than 256 Mb which is
> the default runqemu memory config and thus boot fails when
> extracted initramfs does not fit.
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> ---
>  meta-yocto-bsp/conf/machine/genericarm64.conf | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta-yocto-bsp/conf/machine/genericarm64.conf
> b/meta-yocto-bsp/conf/machine/genericarm64.conf
> index 5d1010e..ce22b17 100644
> --- a/meta-yocto-bsp/conf/machine/genericarm64.conf
> +++ b/meta-yocto-bsp/conf/machine/genericarm64.conf
> @@ -57,6 +57,7 @@ QB_MACHINE ?= "-machine virt"
>  QB_CPU ?= "-cpu cortex-a76"
>  QB_CPU_KVM ?= "-cpu host -machine gic-version=3"
>  QB_SMP ?= "-smp 4"
> +QB_MEM ?= "-m 512"
>

Some image recipes e.g. core-image-sato sets it conditionally like
QB_MEM = '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m
256", d)}'

I wonder what happens with this change, will it get reset to 256 for
qemuarm64 when not using opengl ?


>  # Boot into U-Boot and let that scan the disk for the next step, don't
> pass any kernel or filesystem hints
>  QB_DEFAULT_BIOS ?= "u-boot.bin"
>  QB_DEFAULT_KERNEL ?= "none"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#13809):
> https://lists.yoctoproject.org/g/poky/message/13809
> Mute This Topic: https://lists.yoctoproject.org/mt/116913418/1997914
> Group Owner: poky+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Mikko Rapeli Dec. 29, 2025, 7:46 a.m. UTC | #2
Hi,

On Tue, Dec 23, 2025 at 12:28:00PM -0800, Khem Raj wrote:
> On Tue, Dec 23, 2025 at 12:25 AM Mikko Rapeli via lists.yoctoproject.org
> <mikko.rapeli=linaro.org@lists.yoctoproject.org> wrote:
> 
> > The genericarm64 initramfs is larger than 256 Mb which is
> > the default runqemu memory config and thus boot fails when
> > extracted initramfs does not fit.
> >
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> > ---
> >  meta-yocto-bsp/conf/machine/genericarm64.conf | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/meta-yocto-bsp/conf/machine/genericarm64.conf
> > b/meta-yocto-bsp/conf/machine/genericarm64.conf
> > index 5d1010e..ce22b17 100644
> > --- a/meta-yocto-bsp/conf/machine/genericarm64.conf
> > +++ b/meta-yocto-bsp/conf/machine/genericarm64.conf
> > @@ -57,6 +57,7 @@ QB_MACHINE ?= "-machine virt"
> >  QB_CPU ?= "-cpu cortex-a76"
> >  QB_CPU_KVM ?= "-cpu host -machine gic-version=3"
> >  QB_SMP ?= "-smp 4"
> > +QB_MEM ?= "-m 512"
> >
> 
> Some image recipes e.g. core-image-sato sets it conditionally like
> QB_MEM = '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m
> 256", d)}'

You are right, this overrides the value:

# $QB_MEM [5 operations]
#   set? /home/builder/src/gpit/build/../meta-yocto/meta-yocto-bsp/conf/machine/genericarm64.conf:60
#     "-m 512"
#   set /home/builder/src/gpit/build/../core/meta/recipes-sato/images/core-image-sato.bb:18
#     "${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}"
#   set? /home/builder/src/gpit/build/../core/meta/classes-recipe/qemuboot.bbclass:96
#     "-m 256"
#   override[qemuarmv5]:set /home/builder/src/gpit/build/../core/meta/recipes-sato/images/core-image-sato.bb:19
#     "-m 256"
#   override[qemumips]:set /home/builder/src/gpit/build/../core/meta/recipes-sato/images/core-image-sato.bb:20
#     "-m 256"
# pre-expansion value:
#   "${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}"
QB_MEM="-m 256"

So 256 Mb without opengl in DISTRO_FEATURES.

But the problem solved by this patch is core-image-minimal or other images
which do not set QB_MEM at all and thus rely on defaults from qemuboot.bbclass or
runqemu and they don't work on genericarm64 with a large initramfs. With this
patch they work:

# $QB_MEM [2 operations]
#   set? /home/builder/src/gpit/build/../meta-yocto/meta-yocto-bsp/conf/machine/genericarm64.conf:60
#     "-m 512"
#   set? /home/builder/src/gpit/build/../core/meta/classes-recipe/qemuboot.bbclass:96
#     "-m 256"
# pre-expansion value:
#   "-m 512"
QB_MEM="-m 512"

> I wonder what happens with this change, will it get reset to 256 for
> qemuarm64 when not using opengl ?

I guess you meant genericarm64 since qemuarm64 is not affected by this.
So without "opengl" in DISTRO_FEATURES the 256 Mb is set which is not
ok but I don't know how to fix that atm. genericarm64 enables "opengl"
and I don't see a need to test genericarm64 without "opengl" support.

Cheers,

-Mikko
diff mbox series

Patch

diff --git a/meta-yocto-bsp/conf/machine/genericarm64.conf b/meta-yocto-bsp/conf/machine/genericarm64.conf
index 5d1010e..ce22b17 100644
--- a/meta-yocto-bsp/conf/machine/genericarm64.conf
+++ b/meta-yocto-bsp/conf/machine/genericarm64.conf
@@ -57,6 +57,7 @@  QB_MACHINE ?= "-machine virt"
 QB_CPU ?= "-cpu cortex-a76"
 QB_CPU_KVM ?= "-cpu host -machine gic-version=3"
 QB_SMP ?= "-smp 4"
+QB_MEM ?= "-m 512"
 # Boot into U-Boot and let that scan the disk for the next step, don't pass any kernel or filesystem hints
 QB_DEFAULT_BIOS ?= "u-boot.bin"
 QB_DEFAULT_KERNEL ?= "none"