* [OE-core][PATCH] runqemu: Add QB_KERNEL_CMDLINE
@ 2022-06-15 9:59 Raju Kumar Pothuraju
2022-06-15 11:11 ` Alexander Kanavin
0 siblings, 1 reply; 4+ messages in thread
From: Raju Kumar Pothuraju @ 2022-06-15 9:59 UTC (permalink / raw)
To: openembedded-core; +Cc: mark.hatle, Raju Kumar Pothuraju
runqemu auto generating the KERNEL_CMDLINE values and specifying using
-append option to qemu boot command which will lead to override the
kernel_cmdline/bootargs which are specified in DTB when using -dtb option.
Add new macro QB_KERNEL_CMDLINE to specify not to add the runqemu
generated KERNEL_CMDLINE values instead use which are in the DTB if
value defined as 'none'.
Add provision to override bootargs using # runqemu bootparams="root=/dev/ram0"
Signed-off-by: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>
---
scripts/runqemu | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index 6e1f073ed2..97ea37d690 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1486,9 +1486,15 @@ class BaseConfig(object):
def start_qemu(self):
import shlex
if self.kernel:
- kernel_opts = "-kernel %s -append '%s %s %s %s'" % (self.kernel, self.kernel_cmdline,
+ kernel_opts = "-kernel %s" % (self.kernel)
+ if self.get('QB_KERNEL_CMDLINE') != "none":
+ kernel_opts += " -append '%s %s %s %s'" % (self.kernel_cmdline,
self.kernel_cmdline_script, self.get('QB_KERNEL_CMDLINE_APPEND'),
self.bootparams)
+ else:
+ if self.bootparams:
+ kernel_opts += " -append '%s'" % (self.bootparams)
+
if self.dtb:
kernel_opts += " -dtb %s" % self.dtb
else:
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [OE-core][PATCH] runqemu: Add QB_KERNEL_CMDLINE
2022-06-15 9:59 [OE-core][PATCH] runqemu: Add QB_KERNEL_CMDLINE Raju Kumar Pothuraju
@ 2022-06-15 11:11 ` Alexander Kanavin
[not found] ` <DM6PR12MB5007FE96BE467CCA804E9AB0E5AD9@DM6PR12MB5007.namprd12.prod.outlook.com>
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Kanavin @ 2022-06-15 11:11 UTC (permalink / raw)
To: Raju Kumar Pothuraju; +Cc: OE-core, mark.hatle
This means QB_KERNEL_CMDLINE needs to be set by default everywhere to
preserve existing behaviour, I'm not sure this is going to work. Can
you achieve the desired effect with a reverse condition?
Alex
On Wed, 15 Jun 2022 at 11:59, Raju Kumar Pothuraju
<raju.kumar-pothuraju@xilinx.com> wrote:
>
> runqemu auto generating the KERNEL_CMDLINE values and specifying using
> -append option to qemu boot command which will lead to override the
> kernel_cmdline/bootargs which are specified in DTB when using -dtb option.
> Add new macro QB_KERNEL_CMDLINE to specify not to add the runqemu
> generated KERNEL_CMDLINE values instead use which are in the DTB if
> value defined as 'none'.
> Add provision to override bootargs using # runqemu bootparams="root=/dev/ram0"
>
> Signed-off-by: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>
> ---
> scripts/runqemu | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/runqemu b/scripts/runqemu
> index 6e1f073ed2..97ea37d690 100755
> --- a/scripts/runqemu
> +++ b/scripts/runqemu
> @@ -1486,9 +1486,15 @@ class BaseConfig(object):
> def start_qemu(self):
> import shlex
> if self.kernel:
> - kernel_opts = "-kernel %s -append '%s %s %s %s'" % (self.kernel, self.kernel_cmdline,
> + kernel_opts = "-kernel %s" % (self.kernel)
> + if self.get('QB_KERNEL_CMDLINE') != "none":
> + kernel_opts += " -append '%s %s %s %s'" % (self.kernel_cmdline,
> self.kernel_cmdline_script, self.get('QB_KERNEL_CMDLINE_APPEND'),
> self.bootparams)
> + else:
> + if self.bootparams:
> + kernel_opts += " -append '%s'" % (self.bootparams)
> +
> if self.dtb:
> kernel_opts += " -dtb %s" % self.dtb
> else:
> --
> 2.17.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#166926): https://lists.openembedded.org/g/openembedded-core/message/166926
> Mute This Topic: https://lists.openembedded.org/mt/91773086/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core][PATCH] runqemu: Add QB_KERNEL_CMDLINE
[not found] ` <DM6PR12MB5007FE96BE467CCA804E9AB0E5AD9@DM6PR12MB5007.namprd12.prod.outlook.com>
@ 2022-06-15 11:27 ` Alexander Kanavin
[not found] ` <DM6PR12MB500709E8ACC7DEC3DC3108B5E5AD9@DM6PR12MB5007.namprd12.prod.outlook.com>
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Kanavin @ 2022-06-15 11:27 UTC (permalink / raw)
To: Pothuraju, Rajukumar; +Cc: Raju Kumar Pothuraju, OE-core, mark.hatle
Right, I still find the naming confusing though. Can it be
QB_RUNQEMU_KERNEL_CMDLINE_SUPPRESS? The name needs to indicate that it
does not contain the actual cmdline, but only a flag to suppress it.
Alex
On Wed, 15 Jun 2022 at 13:19, Pothuraju, Rajukumar
<rajukumar.pothuraju@amd.com> wrote:
>
> Hi Alexander,
>
> > -----Original Message-----
> > From: Alexander Kanavin <alex.kanavin@gmail.com>
> > Sent: Wednesday, June 15, 2022 4:42 PM
> > To: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>
> > Cc: OE-core <openembedded-core@lists.openembedded.org>;
> > mark.hatle@xilinx.com
> > Subject: Re: [OE-core][PATCH] runqemu: Add QB_KERNEL_CMDLINE
> >
> > CAUTION: This message has originated from an External Source. Please use
> > proper judgment and caution when opening attachments, clicking links, or
> > responding to this email.
> >
> >
> > This means QB_KERNEL_CMDLINE needs to be set by default everywhere to
> > preserve existing behaviour, I'm not sure this is going to work. Can you
> > achieve the desired effect with a reverse condition?
> The default flow works as it is, to skip that you have to set QB_KERNEL_CMDLINE to "none".
>
> Regards,
> Rajukumar P.
> >
> > Alex
> >
> > On Wed, 15 Jun 2022 at 11:59, Raju Kumar Pothuraju <raju.kumar-
> > pothuraju@xilinx.com> wrote:
> > >
> > > runqemu auto generating the KERNEL_CMDLINE values and specifying using
> > > -append option to qemu boot command which will lead to override the
> > > kernel_cmdline/bootargs which are specified in DTB when using -dtb
> > option.
> > > Add new macro QB_KERNEL_CMDLINE to specify not to add the runqemu
> > > generated KERNEL_CMDLINE values instead use which are in the DTB if
> > > value defined as 'none'.
> > > Add provision to override bootargs using # runqemu
> > bootparams="root=/dev/ram0"
> > >
> > > Signed-off-by: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>
> > > ---
> > > scripts/runqemu | 8 +++++++-
> > > 1 file changed, 7 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/scripts/runqemu b/scripts/runqemu index
> > > 6e1f073ed2..97ea37d690 100755
> > > --- a/scripts/runqemu
> > > +++ b/scripts/runqemu
> > > @@ -1486,9 +1486,15 @@ class BaseConfig(object):
> > > def start_qemu(self):
> > > import shlex
> > > if self.kernel:
> > > - kernel_opts = "-kernel %s -append '%s %s %s %s'" % (self.kernel,
> > self.kernel_cmdline,
> > > + kernel_opts = "-kernel %s" % (self.kernel)
> > > + if self.get('QB_KERNEL_CMDLINE') != "none":
> > > + kernel_opts += " -append '%s %s %s %s'" %
> > > + (self.kernel_cmdline,
> > > self.kernel_cmdline_script,
> > self.get('QB_KERNEL_CMDLINE_APPEND'),
> > >
> > > self.bootparams)
> > > + else:
> > > + if self.bootparams:
> > > + kernel_opts += " -append '%s'" %
> > > + (self.bootparams)
> > > +
> > > if self.dtb:
> > > kernel_opts += " -dtb %s" % self.dtb
> > > else:
> > > --
> > > 2.17.1
> > >
> > >
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > Links: You receive all messages sent to this group.
> > > View/Reply Online (#166926):
> > > https://lists.openembedded.org/g/openembedded-core/message/166926
> > > Mute This Topic: https://lists.openembedded.org/mt/91773086/1686489
> > > Group Owner: openembedded-core+owner@lists.openembedded.org
> > > Unsubscribe: https://lists.openembedded.org/g/openembedded-
> > core/unsub
> > > [alex.kanavin@gmail.com]
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core][PATCH] runqemu: Add QB_KERNEL_CMDLINE
[not found] ` <DM6PR12MB500709E8ACC7DEC3DC3108B5E5AD9@DM6PR12MB5007.namprd12.prod.outlook.com>
@ 2022-06-15 15:21 ` Alexander Kanavin
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Kanavin @ 2022-06-15 15:21 UTC (permalink / raw)
To: Pothuraju, Rajukumar; +Cc: Raju Kumar Pothuraju, OE-core, mark.hatle
Right, that's ok then, although the naming for both could be improved.
Alex
On Wed, 15 Jun 2022 at 14:17, Pothuraju, Rajukumar
<rajukumar.pothuraju@amd.com> wrote:
>
> I have taken reference of QB_ROOTFS https://github.com/openembedded/openembedded-core/blob/master/scripts/runqemu#L1218 so QB_KERNEL_CMDLINE and QB_KERNEL_CMDLINE_APPEND will be in sync right.
>
> Regards,
> Rajukumar P.
>
> > -----Original Message-----
> > From: Alexander Kanavin <alex.kanavin@gmail.com>
> > Sent: Wednesday, June 15, 2022 4:57 PM
> > To: Pothuraju, Rajukumar <rajukumar.pothuraju@amd.com>
> > Cc: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>; OE-core
> > <openembedded-core@lists.openembedded.org>; mark.hatle@xilinx.com
> > Subject: Re: [OE-core][PATCH] runqemu: Add QB_KERNEL_CMDLINE
> >
> > CAUTION: This message has originated from an External Source. Please use
> > proper judgment and caution when opening attachments, clicking links, or
> > responding to this email.
> >
> >
> > Right, I still find the naming confusing though. Can it be
> > QB_RUNQEMU_KERNEL_CMDLINE_SUPPRESS? The name needs to indicate
> > that it does not contain the actual cmdline, but only a flag to suppress it.
> >
> > Alex
> >
> > On Wed, 15 Jun 2022 at 13:19, Pothuraju, Rajukumar
> > <rajukumar.pothuraju@amd.com> wrote:
> > >
> > > Hi Alexander,
> > >
> > > > -----Original Message-----
> > > > From: Alexander Kanavin <alex.kanavin@gmail.com>
> > > > Sent: Wednesday, June 15, 2022 4:42 PM
> > > > To: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>
> > > > Cc: OE-core <openembedded-core@lists.openembedded.org>;
> > > > mark.hatle@xilinx.com
> > > > Subject: Re: [OE-core][PATCH] runqemu: Add QB_KERNEL_CMDLINE
> > > >
> > > > CAUTION: This message has originated from an External Source. Please
> > > > use proper judgment and caution when opening attachments, clicking
> > > > links, or responding to this email.
> > > >
> > > >
> > > > This means QB_KERNEL_CMDLINE needs to be set by default everywhere
> > > > to preserve existing behaviour, I'm not sure this is going to work.
> > > > Can you achieve the desired effect with a reverse condition?
> > > The default flow works as it is, to skip that you have to set
> > QB_KERNEL_CMDLINE to "none".
> > >
> > > Regards,
> > > Rajukumar P.
> > > >
> > > > Alex
> > > >
> > > > On Wed, 15 Jun 2022 at 11:59, Raju Kumar Pothuraju <raju.kumar-
> > > > pothuraju@xilinx.com> wrote:
> > > > >
> > > > > runqemu auto generating the KERNEL_CMDLINE values and specifying
> > > > > using -append option to qemu boot command which will lead to
> > > > > override the kernel_cmdline/bootargs which are specified in DTB
> > > > > when using -dtb
> > > > option.
> > > > > Add new macro QB_KERNEL_CMDLINE to specify not to add the
> > runqemu
> > > > > generated KERNEL_CMDLINE values instead use which are in the DTB
> > > > > if value defined as 'none'.
> > > > > Add provision to override bootargs using # runqemu
> > > > bootparams="root=/dev/ram0"
> > > > >
> > > > > Signed-off-by: Raju Kumar Pothuraju
> > > > > <raju.kumar-pothuraju@xilinx.com>
> > > > > ---
> > > > > scripts/runqemu | 8 +++++++-
> > > > > 1 file changed, 7 insertions(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/scripts/runqemu b/scripts/runqemu index
> > > > > 6e1f073ed2..97ea37d690 100755
> > > > > --- a/scripts/runqemu
> > > > > +++ b/scripts/runqemu
> > > > > @@ -1486,9 +1486,15 @@ class BaseConfig(object):
> > > > > def start_qemu(self):
> > > > > import shlex
> > > > > if self.kernel:
> > > > > - kernel_opts = "-kernel %s -append '%s %s %s %s'" % (self.kernel,
> > > > self.kernel_cmdline,
> > > > > + kernel_opts = "-kernel %s" % (self.kernel)
> > > > > + if self.get('QB_KERNEL_CMDLINE') != "none":
> > > > > + kernel_opts += " -append '%s %s %s %s'" %
> > > > > + (self.kernel_cmdline,
> > > > >
> > > > > self.kernel_cmdline_script,
> > > > self.get('QB_KERNEL_CMDLINE_APPEND'),
> > > > >
> > > > > self.bootparams)
> > > > > + else:
> > > > > + if self.bootparams:
> > > > > + kernel_opts += " -append '%s'" %
> > > > > + (self.bootparams)
> > > > > +
> > > > > if self.dtb:
> > > > > kernel_opts += " -dtb %s" % self.dtb
> > > > > else:
> > > > > --
> > > > > 2.17.1
> > > > >
> > > > >
> > > > > -=-=-=-=-=-=-=-=-=-=-=-
> > > > > Links: You receive all messages sent to this group.
> > > > > View/Reply Online (#166926):
> > > > > https://lists.openembedded.org/g/openembedded-
> > core/message/166926
> > > > > Mute This Topic:
> > > > > https://lists.openembedded.org/mt/91773086/1686489
> > > > > Group Owner: openembedded-core+owner@lists.openembedded.org
> > > > > Unsubscribe: https://lists.openembedded.org/g/openembedded-
> > > > core/unsub
> > > > > [alex.kanavin@gmail.com]
> > > > > -=-=-=-=-=-=-=-=-=-=-=-
> > > > >
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-15 15:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15 9:59 [OE-core][PATCH] runqemu: Add QB_KERNEL_CMDLINE Raju Kumar Pothuraju
2022-06-15 11:11 ` Alexander Kanavin
[not found] ` <DM6PR12MB5007FE96BE467CCA804E9AB0E5AD9@DM6PR12MB5007.namprd12.prod.outlook.com>
2022-06-15 11:27 ` Alexander Kanavin
[not found] ` <DM6PR12MB500709E8ACC7DEC3DC3108B5E5AD9@DM6PR12MB5007.namprd12.prod.outlook.com>
2022-06-15 15:21 ` Alexander Kanavin
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.