qemuboot: move QB_MEM to default in qemuboot

Submitted by brett.warren@arm.com on Oct. 1, 2020, 12:46 p.m. | Patch ID: 176927

Details

Message ID Po14.1601556389979380134.H3Ii@lists.openembedded.org
State New
Headers show

Commit Message

brett.warren@arm.com Oct. 1, 2020, 12:46 p.m.
Previously, to satisfy opengl's requirement for at least 512MB
of memory, QB_MEM was overriden by core-image-sato. This made it
impossible for machine configurations to specify their own values,
so this clause was moved to qemuboot instead and rewritten as a
default to allow other recipes to state their own values if
needed.

Signed-off-by: Brett Warren <brett.warren@arm.com>
---
meta/classes/qemuboot.bbclass               | 2 +-
meta/recipes-sato/images/core-image-sato.bb | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)

--
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142994): https://lists.openembedded.org/g/openembedded-core/message/142994
Mute This Topic: https://lists.openembedded.org/mt/77239203/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-

Patch hide | download patch | download mbox

diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index d8f62ef6ea..3a51fc5b5e 100644
--- a/meta/classes/qemuboot.bbclass
+++ b/meta/classes/qemuboot.bbclass
@@ -73,7 +73,7 @@ 
# IMAGE_CLASSES += "qemuboot"
# See "runqemu help" for more info

-QB_MEM ?= "-m 256"
+QB_MEM ?= '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'
QB_SERIAL_OPT ?= "-serial mon:stdio -serial null"
QB_DEFAULT_KERNEL ?= "${KERNEL_IMAGETYPE}"
QB_DEFAULT_FSTYPE ?= "ext4"
diff --git a/meta/recipes-sato/images/core-image-sato.bb b/meta/recipes-sato/images/core-image-sato.bb
index 673106eb6d..640313d6f7 100644
--- a/meta/recipes-sato/images/core-image-sato.bb
+++ b/meta/recipes-sato/images/core-image-sato.bb
@@ -11,5 +11,4 @@  inherit core-image
TOOLCHAIN_HOST_TASK_append = " nativesdk-intltool nativesdk-glib-2.0"
TOOLCHAIN_HOST_TASK_remove_task-populate-sdk-ext = " nativesdk-intltool nativesdk-glib-2.0"

-QB_MEM = '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'
QB_MEM_qemumips = "-m 256"

Comments

Alexander Kanavin Oct. 1, 2020, 12:50 p.m.
I believe something similar was previously rejected on the grounds that the
need for 512M of RAM is not about opengl in general, it's about Xorg
failing to start when using glamor unless there's at least 512M. Otherwise,
we should continue to verify images with just 256M.

Therefore it is image specific.

Alex

On Thu, 1 Oct 2020 at 14:46, <brett.warren@arm.com> wrote:

> Previously, to satisfy opengl's requirement for at least 512MB
> of memory, QB_MEM was overriden by core-image-sato. This made it
> impossible for machine configurations to specify their own values,
> so this clause was moved to qemuboot instead and rewritten as a
> default to allow other recipes to state their own values if
> needed.
>
> Signed-off-by: Brett Warren <brett.warren@arm.com>
> ---
> meta/classes/qemuboot.bbclass               | 2 +-
> meta/recipes-sato/images/core-image-sato.bb | 1 -
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
> index d8f62ef6ea..3a51fc5b5e 100644
> --- a/meta/classes/qemuboot.bbclass
> +++ b/meta/classes/qemuboot.bbclass
> @@ -73,7 +73,7 @@
> # IMAGE_CLASSES += "qemuboot"
> # See "runqemu help" for more info
>
> -QB_MEM ?= "-m 256"
> +QB_MEM ?= '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512",
> "-m 256", d)}'
> QB_SERIAL_OPT ?= "-serial mon:stdio -serial null"
> QB_DEFAULT_KERNEL ?= "${KERNEL_IMAGETYPE}"
> QB_DEFAULT_FSTYPE ?= "ext4"
> diff --git a/meta/recipes-sato/images/core-image-sato.bb
> b/meta/recipes-sato/images/core-image-sato.bb
> index 673106eb6d..640313d6f7 100644
> --- a/meta/recipes-sato/images/core-image-sato.bb
> +++ b/meta/recipes-sato/images/core-image-sato.bb
> @@ -11,5 +11,4 @@ inherit core-image
> TOOLCHAIN_HOST_TASK_append = " nativesdk-intltool nativesdk-glib-2.0"
> TOOLCHAIN_HOST_TASK_remove_task-populate-sdk-ext = " nativesdk-intltool
> nativesdk-glib-2.0"
>
> -QB_MEM = '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m
> 256", d)}'
> QB_MEM_qemumips = "-m 256"
> --
> 2.17.1
>
>
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142995): https://lists.openembedded.org/g/openembedded-core/message/142995
Mute This Topic: https://lists.openembedded.org/mt/77239203/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Richard Purdie Oct. 1, 2020, 2:12 p.m.
On Thu, 2020-10-01 at 14:50 +0200, Alexander Kanavin wrote:
> I believe something similar was previously rejected on the grounds
> that the need for 512M of RAM is not about opengl in general, it's
> about Xorg failing to start when using glamor unless there's at least
> 512M. Otherwise, we should continue to verify images with just 256M.
> 
> Therefore it is image specific.

Right, it makes no sense for example to need/want 512MB for core-image-
minimal.

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142997): https://lists.openembedded.org/g/openembedded-core/message/142997
Mute This Topic: https://lists.openembedded.org/mt/77239203/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
brett.warren@arm.com Oct. 2, 2020, 8:21 a.m.
On Thu, 2020-10-01 at 14:50 +0200, Alexander Kanavin wrote:
> I believe something similar was previously rejected on the grounds
> that the need for 512M of RAM is not about opengl in general, it's
> about Xorg failing to start when using glamor unless there's at least
> 512M...
> Therefore it is image specific.

In that case I'll move the line back to core-image-sato, with the small modification that it'll no longer override machine configurations.

Cheers,
Brett