Subject: [PATCHv2] qemuboot: change QB_MEM default strengths
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.
---
meta/classes/qemuboot.bbclass | 2 +- meta/recipes-sato/images/core-image-sato.bb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
meta/classes/qemuboot.bbclass +0 -0
@@ -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"
meta/recipes-sato/images/core-image-sato.bb +0 -0
@@ -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
Isn’t it better to just make a custom image recipe instead?
Alex
Quoted 46 lines · Brett Warren
Previously, to satisfy opengl's requirement for at least 512MB of memory,
QB_MEMwas 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 ofQB_MEMwas changed to the week variant.Signed-off-by Brett Warren <[email protected]>--- meta/classes/qemuboot.bbclass | 2 +- meta/recipes-sato/images/core-image-sato.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)meta/classes/qemuboot.bbclass +1
-1@@ -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"meta/recipes-sato/images/core-image-sato.bb +0
-0@@ -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-intltoolnativesdk-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
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 <[email protected]>
Sent: 08 October 2020 12:36
To: Brett Warren <[email protected]>
Cc: [email protected] <[email protected]>
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 <[email protected]<mailto:[email protected]>> 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.
--- 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(-)
meta/classes/qemuboot.bbclass +1 -1
@@ -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"
meta/recipes-sato/images/core-image-sato.bb<http://core-image-sato.bb> +1 -1
@@ -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.
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
Quoted 77 lines · Brett Warren
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 <[email protected]> *Sent:* 08 October 2020 12:36
*To:* Brett Warren <[email protected]>
*Cc:* [email protected] < [email protected]>
*Subject:* Re: [OE-core] Subject: [PATCHv2] qemuboot: changeQB_MEMdefault strengthsIsn’t it better to just make a custom image recipe instead?
Alex
On Thu 8. Oct 2020 at 12.53, Brett Warren <[email protected]> wrote:
Previously, to satisfy opengl's requirement for at least 512MB of memory,
QB_MEMwas 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 ofQB_MEMwas changed to the week variant.Signed-off-by Brett Warren <[email protected]>--- meta/classes/qemuboot.bbclass | 2 +- meta/recipes-sato/images/core-image-sato.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)meta/classes/qemuboot.bbclass +1
-1@@ -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"meta/recipes-sato/images/core-image-sato.bb +0
-0@@ -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-intltoolnativesdk-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.1IMPORTANT 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.
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,
Quoted 77 lines · Alexander Kanavin
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_MEMin 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
Quoted 65 lines · Brett Warren
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 <[email protected]>
Sent: 08 October 2020 12:36
To: Brett Warren <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: [OE-core] Subject: [PATCHv2] qemuboot: changeQB_MEMdefault strengthsIsn’t it better to just make a custom image recipe instead?
Alex
On Thu 8. Oct 2020 at 12.53, Brett Warren <[email protected]> wrote:
Previously, to satisfy opengl's requirement for at least 512MB of memory,
QB_MEMwas 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 ofQB_MEMwas changed to the week variant.Signed-off-by Brett Warren <[email protected]>--- meta/classes/qemuboot.bbclass | 2 +- meta/recipes-sato/images/core-image-sato.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)meta/classes/qemuboot.bbclass +1
-1@@ -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"meta/recipes-sato/images/core-image-sato.bb +1
-2@@ -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.
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 <[email protected]>
Sent: 08 October 2020 23:11
To: Alexander Kanavin <[email protected]>
Cc: Brett Warren <[email protected]>; [email protected] <[email protected]>
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,
Quoted 65 lines · Alexander Kanavin
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_MEMin 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
Quoted 57 lines · Brett Warren
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 <[email protected]>
Sent: 08 October 2020 12:36
To: Brett Warren <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: [OE-core] Subject: [PATCHv2] qemuboot: changeQB_MEMdefault strengthsIsn’t it better to just make a custom image recipe instead?
Alex
On Thu 8. Oct 2020 at 12.53, Brett Warren <[email protected]> wrote:
Previously, to satisfy opengl's requirement for at least 512MB of memory,
QB_MEMwas 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 ofQB_MEMwas changed to the week variant.Signed-off-by Brett Warren <[email protected]>--- meta/classes/qemuboot.bbclass | 2 +- meta/recipes-sato/images/core-image-sato.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)meta/classes/qemuboot.bbclass +1
-1@@ -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"meta/recipes-sato/images/core-image-sato.bb +0
-0@@ -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"
Quoted 12 lines
Quoted 8 lines
meta/recipes-sato/images/core-image-sato.bb +1
-2-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.
Quoted 6 lines · Brett Warren
Previously, to satisfy opengl's requirement for at least 512MB of memory,
QB_MEMwas 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 ofQB_MEMwas changed to the week
typo s/the week/be weak/
Quoted 26 lines
variant.
Signed-off-by Brett Warren <[email protected]>--- meta/classes/qemuboot.bbclass | 2 +- meta/recipes-sato/images/core-image-sato.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)meta/classes/qemuboot.bbclass +1
-1@@ -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"meta/recipes-sato/images/core-image-sato.bb +0
-0
meta/recipes-sato/images/core-image-sato.bb inherit core-image · line 15
Quoted 6 lines
meta/recipes-sato/images/core-image-sato.bb +1
-1@@ -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 ?
Quoted 4 lines
--
2.17.1