All of lore.kernel.org
 help / color / mirror / Atom feed
* Subject: [PATCHv2] qemuboot: change QB_MEM default strengths
@ 2020-10-08 10:50 Brett Warren
  2020-10-08 11:36 ` [OE-core] " Alexander Kanavin
  2020-10-08 21:25 ` Khem Raj
  0 siblings, 2 replies; 7+ messages in thread
From: Brett Warren @ 2020-10-08 10:50 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]

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 was changed to a default asssignment. To accomodate this,
qemuboot's default assignment of QB_MEM was changed to the week
variant.

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

diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index d8f62ef6ea..8e4ee9e49b 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 ??= "-m 256"
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..ec5e2e20fc 100644
--- a/meta/recipes-sato/images/core-image-sato.bb
+++ b/meta/recipes-sato/images/core-image-sato.bb
@@ -11,5 +11,5 @@ 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 ?= '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'
QB_MEM_qemumips = "-m 256"
--
2.17.1

[-- Attachment #2: Type: text/html, Size: 1966 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [OE-core] Subject: [PATCHv2] qemuboot: change QB_MEM default strengths
  2020-10-08 10:50 Subject: [PATCHv2] qemuboot: change QB_MEM default strengths Brett Warren
@ 2020-10-08 11:36 ` Alexander Kanavin
  2020-10-08 11:51   ` Brett Warren
  2020-10-08 21:25 ` Khem Raj
  1 sibling, 1 reply; 7+ messages in thread
From: Alexander Kanavin @ 2020-10-08 11:36 UTC (permalink / raw)
  To: Brett Warren; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1914 bytes --]

Isn’t it better to just make a custom image recipe instead?

Alex

On Thu 8. Oct 2020 at 12.53, Brett Warren <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 was changed to a default asssignment. To accomodate this,
> qemuboot's default assignment of QB_MEM was changed to the week
> variant.
>
> Signed-off-by: Brett Warren <brett.warren@arm.com>
> ---
>  meta/classes/qemuboot.bbclass               | 2 +-
>  meta/recipes-sato/images/core-image-sato.bb | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
> index d8f62ef6ea..8e4ee9e49b 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 ??= "-m 256"
>  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..ec5e2e20fc 100644
> --- a/meta/recipes-sato/images/core-image-sato.bb
> +++ b/meta/recipes-sato/images/core-image-sato.bb
> @@ -11,5 +11,5 @@ 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 ?= '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512",
> "-m 256", d)}'
>  QB_MEM_qemumips = "-m 256"
> --
> 2.17.1
> 
>
>

[-- Attachment #2: Type: text/html, Size: 2864 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] Subject: [PATCHv2] qemuboot: change QB_MEM default strengths
  2020-10-08 11:36 ` [OE-core] " Alexander Kanavin
@ 2020-10-08 11:51   ` Brett Warren
  2020-10-08 22:00     ` Alexander Kanavin
  0 siblings, 1 reply; 7+ messages in thread
From: Brett Warren @ 2020-10-08 11:51 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2958 bytes --]

Do you mean instead of the machine configuration changing QB_MEM, it should be done via another image recipe?

For context, I'm trying to enable the following line in qemuarm.confv (meta-arm):

QB_MEM = "-m 1024"

This is prevented by core-image-sato.bb overriding it instead.

Brett
________________________________
From: Alexander Kanavin <alex.kanavin@gmail.com>
Sent: 08 October 2020 12:36
To: Brett Warren <Brett.Warren@arm.com>
Cc: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] Subject: [PATCHv2] qemuboot: change QB_MEM default strengths

Isn’t it better to just make a custom image recipe instead?

Alex

On Thu 8. Oct 2020 at 12.53, Brett Warren <brett.warren@arm.com<mailto: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 was changed to a default asssignment. To accomodate this,
qemuboot's default assignment of QB_MEM was changed to the week
variant.

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

diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index d8f62ef6ea..8e4ee9e49b 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 ??= "-m 256"
 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<http://core-image-sato.bb> b/meta/recipes-sato/images/core-image-sato.bb<http://core-image-sato.bb>
index 673106eb6d..ec5e2e20fc 100644
--- a/meta/recipes-sato/images/core-image-sato.bb<http://core-image-sato.bb>
+++ b/meta/recipes-sato/images/core-image-sato.bb<http://core-image-sato.bb>
@@ -11,5 +11,5 @@ 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 ?= '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'
 QB_MEM_qemumips = "-m 256"
--
2.17.1


IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

[-- Attachment #2: Type: text/html, Size: 5552 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [OE-core] Subject: [PATCHv2] qemuboot: change QB_MEM default strengths
  2020-10-08 10:50 Subject: [PATCHv2] qemuboot: change QB_MEM default strengths Brett Warren
  2020-10-08 11:36 ` [OE-core] " Alexander Kanavin
@ 2020-10-08 21:25 ` Khem Raj
  1 sibling, 0 replies; 7+ messages in thread
From: Khem Raj @ 2020-10-08 21:25 UTC (permalink / raw)
  To: Brett Warren; +Cc: Patches and discussions about the oe-core layer

On Thu, Oct 8, 2020 at 3:53 AM Brett Warren <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 was changed to a default asssignment. To accomodate this,
> qemuboot's default assignment of QB_MEM was changed to the week

typo s/the week/be weak/

> variant.
>
> Signed-off-by: Brett Warren <brett.warren@arm.com>
> ---
>  meta/classes/qemuboot.bbclass               | 2 +-
>  meta/recipes-sato/images/core-image-sato.bb | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
> index d8f62ef6ea..8e4ee9e49b 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 ??= "-m 256"
>  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..ec5e2e20fc 100644
> --- a/meta/recipes-sato/images/core-image-sato.bb
> +++ b/meta/recipes-sato/images/core-image-sato.bb
> @@ -11,5 +11,5 @@ 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 ?= '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'
>  QB_MEM_qemumips = "-m 256"

Ideally, it should check for minimum required memory it needs and
offset it only if passed value is lower and accept any higher value
coming from environment
what happens if you set

QB_MEM_<machine> = "xxx" in machine conf or local.conf does it still
overwrite that here ?

> --
> 2.17.1
> 
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] Subject: [PATCHv2] qemuboot: change QB_MEM default strengths
  2020-10-08 11:51   ` Brett Warren
@ 2020-10-08 22:00     ` Alexander Kanavin
  2020-10-08 22:11       ` Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Kanavin @ 2020-10-08 22:00 UTC (permalink / raw)
  To: Brett Warren; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3480 bytes --]

Can you provide a bit more context? Why is that setting desirable to have
in meta-arm's machine definition?

The problem with setting QB_MEM in machine configurations is that different
images need completely different amounts of memory; for some (such as ptest
images) even 1024 is not enough, for others (core-image-minimal) 256 is
plenty. The right place to set this is in the image recipes, with qemuboot
class providing the smallest possible default.

Alex

On Thu, 8 Oct 2020 at 13:51, Brett Warren <Brett.Warren@arm.com> wrote:

> Do you mean instead of the machine configuration changing QB_MEM, it
> should be done via another image recipe?
>
> For context, I'm trying to enable the following line in qemuarm.confv
> (meta-arm):
>
> QB_MEM = "-m 1024"
>
> This is prevented by core-image-sato.bb overriding it instead.
>
> Brett
> ------------------------------
> *From:* Alexander Kanavin <alex.kanavin@gmail.com>
> *Sent:* 08 October 2020 12:36
> *To:* Brett Warren <Brett.Warren@arm.com>
> *Cc:* openembedded-core@lists.openembedded.org <
> openembedded-core@lists.openembedded.org>
> *Subject:* Re: [OE-core] Subject: [PATCHv2] qemuboot: change QB_MEM
> default strengths
>
> Isn’t it better to just make a custom image recipe instead?
>
> Alex
>
> On Thu 8. Oct 2020 at 12.53, Brett Warren <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 was changed to a default asssignment. To accomodate this,
> qemuboot's default assignment of QB_MEM was changed to the week
> variant.
>
> Signed-off-by: Brett Warren <brett.warren@arm.com>
> ---
>  meta/classes/qemuboot.bbclass               | 2 +-
>  meta/recipes-sato/images/core-image-sato.bb | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
> index d8f62ef6ea..8e4ee9e49b 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 ??= "-m 256"
>  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..ec5e2e20fc 100644
> --- a/meta/recipes-sato/images/core-image-sato.bb
> +++ b/meta/recipes-sato/images/core-image-sato.bb
> @@ -11,5 +11,5 @@ 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 ?= '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512",
> "-m 256", d)}'
>  QB_MEM_qemumips = "-m 256"
> --
> 2.17.1
> 
>
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>

[-- Attachment #2: Type: text/html, Size: 6342 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] Subject: [PATCHv2] qemuboot: change QB_MEM default strengths
  2020-10-08 22:00     ` Alexander Kanavin
@ 2020-10-08 22:11       ` Khem Raj
  2020-10-12 10:15         ` Brett Warren
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2020-10-08 22:11 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Brett Warren, openembedded-core

someone may decide to allocate large amount of RAM to the machine as a
distro policy so images should not be overwriting that unless its less
than what it requires to run,

On Thu, Oct 8, 2020 at 3:01 PM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>
> Can you provide a bit more context? Why is that setting desirable to have in meta-arm's machine definition?
>
> The problem with setting QB_MEM in machine configurations is that different images need completely different amounts of memory; for some (such as ptest images) even 1024 is not enough, for others (core-image-minimal) 256 is plenty. The right place to set this is in the image recipes, with qemuboot class providing the smallest possible default.
>
> Alex
>
> On Thu, 8 Oct 2020 at 13:51, Brett Warren <Brett.Warren@arm.com> wrote:
>>
>> Do you mean instead of the machine configuration changing QB_MEM, it should be done via another image recipe?
>>
>> For context, I'm trying to enable the following line in qemuarm.confv (meta-arm):
>>
>> QB_MEM = "-m 1024"
>>
>> This is prevented by core-image-sato.bb overriding it instead.
>>
>> Brett
>> ________________________________
>> From: Alexander Kanavin <alex.kanavin@gmail.com>
>> Sent: 08 October 2020 12:36
>> To: Brett Warren <Brett.Warren@arm.com>
>> Cc: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>
>> Subject: Re: [OE-core] Subject: [PATCHv2] qemuboot: change QB_MEM default strengths
>>
>> Isn’t it better to just make a custom image recipe instead?
>>
>> Alex
>>
>> On Thu 8. Oct 2020 at 12.53, Brett Warren <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 was changed to a default asssignment. To accomodate this,
>> qemuboot's default assignment of QB_MEM was changed to the week
>> variant.
>>
>> Signed-off-by: Brett Warren <brett.warren@arm.com>
>> ---
>>  meta/classes/qemuboot.bbclass               | 2 +-
>>  meta/recipes-sato/images/core-image-sato.bb | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
>> index d8f62ef6ea..8e4ee9e49b 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 ??= "-m 256"
>>  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..ec5e2e20fc 100644
>> --- a/meta/recipes-sato/images/core-image-sato.bb
>> +++ b/meta/recipes-sato/images/core-image-sato.bb
>> @@ -11,5 +11,5 @@ 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 ?= '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'
>>  QB_MEM_qemumips = "-m 256"
>> --
>> 2.17.1
>>
>>
>> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>
>
> 
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] Subject: [PATCHv2] qemuboot: change QB_MEM default strengths
  2020-10-08 22:11       ` Khem Raj
@ 2020-10-12 10:15         ` Brett Warren
  0 siblings, 0 replies; 7+ messages in thread
From: Brett Warren @ 2020-10-12 10:15 UTC (permalink / raw)
  To: Khem Raj, Alexander Kanavin; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 4989 bytes --]

For qemuarm64-secureboot, trusted-firmware-a needed 1024MB of memory to operate when using u-boot, so an override was provided in the machine configuration. This is because the default BL33 load address is set to 512MB, so u-boot always ends up overflowing without increasing the memory available.

There is a possibility that this load address could be set lower later (https://lists.denx.de/pipermail/u-boot/2020-September/427616.html) but for now this patch is needed to make core-image-sato work on qemuarm64-secureboot.
________________________________
From: Khem Raj <raj.khem@gmail.com>
Sent: 08 October 2020 23:11
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: Brett Warren <Brett.Warren@arm.com>; openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] Subject: [PATCHv2] qemuboot: change QB_MEM default strengths

someone may decide to allocate large amount of RAM to the machine as a
distro policy so images should not be overwriting that unless its less
than what it requires to run,

On Thu, Oct 8, 2020 at 3:01 PM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>
> Can you provide a bit more context? Why is that setting desirable to have in meta-arm's machine definition?
>
> The problem with setting QB_MEM in machine configurations is that different images need completely different amounts of memory; for some (such as ptest images) even 1024 is not enough, for others (core-image-minimal) 256 is plenty. The right place to set this is in the image recipes, with qemuboot class providing the smallest possible default.
>
> Alex
>
> On Thu, 8 Oct 2020 at 13:51, Brett Warren <Brett.Warren@arm.com> wrote:
>>
>> Do you mean instead of the machine configuration changing QB_MEM, it should be done via another image recipe?
>>
>> For context, I'm trying to enable the following line in qemuarm.confv (meta-arm):
>>
>> QB_MEM = "-m 1024"
>>
>> This is prevented by core-image-sato.bb overriding it instead.
>>
>> Brett
>> ________________________________
>> From: Alexander Kanavin <alex.kanavin@gmail.com>
>> Sent: 08 October 2020 12:36
>> To: Brett Warren <Brett.Warren@arm.com>
>> Cc: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>
>> Subject: Re: [OE-core] Subject: [PATCHv2] qemuboot: change QB_MEM default strengths
>>
>> Isn’t it better to just make a custom image recipe instead?
>>
>> Alex
>>
>> On Thu 8. Oct 2020 at 12.53, Brett Warren <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 was changed to a default asssignment. To accomodate this,
>> qemuboot's default assignment of QB_MEM was changed to the week
>> variant.
>>
>> Signed-off-by: Brett Warren <brett.warren@arm.com>
>> ---
>>  meta/classes/qemuboot.bbclass               | 2 +-
>>  meta/recipes-sato/images/core-image-sato.bb | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
>> index d8f62ef6ea..8e4ee9e49b 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 ??= "-m 256"
>>  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..ec5e2e20fc 100644
>> --- a/meta/recipes-sato/images/core-image-sato.bb
>> +++ b/meta/recipes-sato/images/core-image-sato.bb
>> @@ -11,5 +11,5 @@ 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 ?= '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'
>>  QB_MEM_qemumips = "-m 256"
>> --
>> 2.17.1
>>
>>
>> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>
>
> 
>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

[-- Attachment #2: Type: text/html, Size: 7174 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-10-12 10:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08 10:50 Subject: [PATCHv2] qemuboot: change QB_MEM default strengths Brett Warren
2020-10-08 11:36 ` [OE-core] " Alexander Kanavin
2020-10-08 11:51   ` Brett Warren
2020-10-08 22:00     ` Alexander Kanavin
2020-10-08 22:11       ` Khem Raj
2020-10-12 10:15         ` Brett Warren
2020-10-08 21:25 ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.