Message ID | 20230628125609.1327477-1-akuster808@gmail.com |
---|---|
State | New |
Headers | show |
Series | [meta-security] layer: add more memory for Qemu machines | expand |
On Wed, 2023-06-28 at 08:56 -0400, Armin Kuster wrote: > Signed-off-by: Armin Kuster <akuster808@gmail.com> > --- > conf/layer.conf | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/conf/layer.conf b/conf/layer.conf > index 334a945..5f289cb 100644 > --- a/conf/layer.conf > +++ b/conf/layer.conf > @@ -28,4 +28,7 @@ INHERIT += "sanity-meta-security" > > QB_KERNEL_CMDLINE_APPEND = " ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', 'apparmor=1 security=apparmor', '', d)}" > > +# We need more mem to run many apps in this layer > +QB_MEM="-m 2048" > + > addpylib ${LAYERDIR}/lib oeqa Putting that unconditionally in a layer.conf is a pretty poor thing to do for usability IMO as it effectively forces that decision on anyone including the layer. There has to be a better way to handle that, at least conditionally on some override? Cheers, Richard
On 6/28/23 12:47 PM, Richard Purdie wrote: > On Wed, 2023-06-28 at 08:56 -0400, Armin Kuster wrote: >> Signed-off-by: Armin Kuster <akuster808@gmail.com> >> --- >> conf/layer.conf | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/conf/layer.conf b/conf/layer.conf >> index 334a945..5f289cb 100644 >> --- a/conf/layer.conf >> +++ b/conf/layer.conf >> @@ -28,4 +28,7 @@ INHERIT += "sanity-meta-security" >> >> QB_KERNEL_CMDLINE_APPEND = " ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', 'apparmor=1 security=apparmor', '', d)}" >> >> +# We need more mem to run many apps in this layer >> +QB_MEM="-m 2048" >> + >> addpylib ${LAYERDIR}/lib oeqa > Putting that unconditionally in a layer.conf is a pretty poor thing to > do for usability IMO as it effectively forces that decision on anyone > including the layer. There has to be a better way to handle that, at > least conditionally on some override? Yep. I moved it and the other qemu params to the image instead. That patch has not been sent. thanks, Armin > > Cheers, > > Richard > >
Hi, On Wed, Jun 28, 2023 at 05:47:21PM +0100, Richard Purdie wrote: > On Wed, 2023-06-28 at 08:56 -0400, Armin Kuster wrote: > > Signed-off-by: Armin Kuster <akuster808@gmail.com> > > --- > > conf/layer.conf | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/conf/layer.conf b/conf/layer.conf > > index 334a945..5f289cb 100644 > > --- a/conf/layer.conf > > +++ b/conf/layer.conf > > @@ -28,4 +28,7 @@ INHERIT += "sanity-meta-security" > > > > QB_KERNEL_CMDLINE_APPEND = " ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', 'apparmor=1 security=apparmor', '', d)}" > > > > +# We need more mem to run many apps in this layer > > +QB_MEM="-m 2048" > > + > > addpylib ${LAYERDIR}/lib oeqa > > Putting that unconditionally in a layer.conf is a pretty poor thing to > do for usability IMO as it effectively forces that decision on anyone > including the layer. There has to be a better way to handle that, at > least conditionally on some override? Currently these belong logically to machine config but what about generic machine targets. Could an image config define how much memory is needed to run the image on qemu? Cheers, -Mikko
On Thu, 2023-06-29 at 13:45 +0300, Mikko Rapeli wrote: > Hi, > > On Wed, Jun 28, 2023 at 05:47:21PM +0100, Richard Purdie wrote: > > On Wed, 2023-06-28 at 08:56 -0400, Armin Kuster wrote: > > > Signed-off-by: Armin Kuster <akuster808@gmail.com> > > > --- > > > conf/layer.conf | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/conf/layer.conf b/conf/layer.conf > > > index 334a945..5f289cb 100644 > > > --- a/conf/layer.conf > > > +++ b/conf/layer.conf > > > @@ -28,4 +28,7 @@ INHERIT += "sanity-meta-security" > > > > > > QB_KERNEL_CMDLINE_APPEND = " ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', 'apparmor=1 security=apparmor', '', d)}" > > > > > > +# We need more mem to run many apps in this layer > > > +QB_MEM="-m 2048" > > > + > > > addpylib ${LAYERDIR}/lib oeqa > > > > Putting that unconditionally in a layer.conf is a pretty poor thing to > > do for usability IMO as it effectively forces that decision on anyone > > including the layer. There has to be a better way to handle that, at > > least conditionally on some override? > > Currently these belong logically to machine config but what about generic > machine targets. Could an image config define how much memory is needed > to run the image on qemu? I believe Armin did move these to the image recipe which is what we do in core in some cases for this too. I think that makes more sense. Cheers, Richard
Hi, On Thu, Jun 29, 2023 at 01:45:41PM +0300, Mikko Rapeli via lists.yoctoproject.org wrote: > Currently these belong logically to machine config but what about generic > machine targets. Could an image config define how much memory is needed > to run the image on qemu? Done already in Message-Id: <20230628192752.3209428-1-akuster808@gmail.com>, sorry for the noise... Cheers, -Mikko
On 29 Jun 2023, at 12:45, Mikko Rapeli via lists.yoctoproject.org <mikko.rapeli=linaro.org@lists.yoctoproject.org> wrote: > On Wed, Jun 28, 2023 at 05:47:21PM +0100, Richard Purdie wrote: >> On Wed, 2023-06-28 at 08:56 -0400, Armin Kuster wrote: >>> Signed-off-by: Armin Kuster <akuster808@gmail.com> >>> --- >>> conf/layer.conf | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/conf/layer.conf b/conf/layer.conf >>> index 334a945..5f289cb 100644 >>> --- a/conf/layer.conf >>> +++ b/conf/layer.conf >>> @@ -28,4 +28,7 @@ INHERIT += "sanity-meta-security" >>> >>> QB_KERNEL_CMDLINE_APPEND = " ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', 'apparmor=1 security=apparmor', '', d)}" >>> >>> +# We need more mem to run many apps in this layer >>> +QB_MEM="-m 2048" >>> + >>> addpylib ${LAYERDIR}/lib oeqa >> >> Putting that unconditionally in a layer.conf is a pretty poor thing to >> do for usability IMO as it effectively forces that decision on anyone >> including the layer. There has to be a better way to handle that, at >> least conditionally on some override? > > Currently these belong logically to machine config but what about generic > machine targets. Could an image config define how much memory is needed > to run the image on qemu? $ git grep -l QB_MEM classes-recipe/baremetal-image.bbclass classes-recipe/qemuboot.bbclass recipes-core/images/build-appliance-image_15.0.0.bb recipes-core/images/core-image-ptest.bb recipes-graphics/images/core-image-weston-sdk.bb recipes-graphics/images/core-image-weston.bb recipes-graphics/images/core-image-x11.bb recipes-sato/images/core-image-sato-sdk.bb recipes-sato/images/core-image-sato.bb Yes, you can set that in an image recipe. Ross
diff --git a/conf/layer.conf b/conf/layer.conf index 334a945..5f289cb 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -28,4 +28,7 @@ INHERIT += "sanity-meta-security" QB_KERNEL_CMDLINE_APPEND = " ${@bb.utils.contains('DISTRO_FEATURES', 'apparmor', 'apparmor=1 security=apparmor', '', d)}" +# We need more mem to run many apps in this layer +QB_MEM="-m 2048" + addpylib ${LAYERDIR}/lib oeqa
Signed-off-by: Armin Kuster <akuster808@gmail.com> --- conf/layer.conf | 3 +++ 1 file changed, 3 insertions(+)