meta-virtualization.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/sysvinit: add hvc0 console only if not there already
@ 2022-06-28 15:29 Bertrand Marquis
  2022-07-05 20:29 ` [meta-virtualization] " Bruce Ashfield
  2022-07-07 14:56 ` Bruce Ashfield
  0 siblings, 2 replies; 5+ messages in thread
From: Bertrand Marquis @ 2022-06-28 15:29 UTC (permalink / raw)
  To: meta-virtualization; +Cc: nd, christopher.w.clark

The base inittab recipe is creating inittab entries for consoles listed
in SERIAL_CONSOLES.
For qemu, this contains "115200,hvc0" so an entry is created in inittab
for it.
Prevent to create a second entry if hvc0 is present in SERIAL_CONSOLES.

On qemuarm, this solves issues with the console when starting on top of
Xen as dom0.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 recipes-core/sysvinit/sysvinit-inittab_xen.inc | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/recipes-core/sysvinit/sysvinit-inittab_xen.inc b/recipes-core/sysvinit/sysvinit-inittab_xen.inc
index 7f92bd1..724f47d 100644
--- a/recipes-core/sysvinit/sysvinit-inittab_xen.inc
+++ b/recipes-core/sysvinit/sysvinit-inittab_xen.inc
@@ -1,4 +1,10 @@
+
+
 do_install:append() {
-                echo "" >> ${D}${sysconfdir}/inittab
-                echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab
+    # if SERIAL_CONSOLES contains hvc0, it is already added in inittab so do
+    # not add it twice
+    if echo "${SERIAL_CONSOLES}" | grep -vq "hvc0"; then
+        echo "" >> ${D}${sysconfdir}/inittab
+        echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab
+    fi
 }
-- 
2.25.1



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

* Re: [meta-virtualization] [PATCH] xen/sysvinit: add hvc0 console only if not there already
  2022-06-28 15:29 [PATCH] xen/sysvinit: add hvc0 console only if not there already Bertrand Marquis
@ 2022-07-05 20:29 ` Bruce Ashfield
  2022-07-06  5:25   ` Christopher Clark
  2022-07-06  7:38   ` Bertrand Marquis
  2022-07-07 14:56 ` Bruce Ashfield
  1 sibling, 2 replies; 5+ messages in thread
From: Bruce Ashfield @ 2022-07-05 20:29 UTC (permalink / raw)
  To: Bertrand Marquis; +Cc: meta-virtualization, nd, christopher.w.clark

Looks ok to me. I'll give it another day to hear from Christopher, and then
I'll do the merge.

Bruce

In message: [meta-virtualization] [PATCH] xen/sysvinit: add hvc0 console only if not there already
on 28/06/2022 Bertrand Marquis wrote:

> The base inittab recipe is creating inittab entries for consoles listed
> in SERIAL_CONSOLES.
> For qemu, this contains "115200,hvc0" so an entry is created in inittab
> for it.
> Prevent to create a second entry if hvc0 is present in SERIAL_CONSOLES.
> 
> On qemuarm, this solves issues with the console when starting on top of
> Xen as dom0.
> 
> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
> ---
>  recipes-core/sysvinit/sysvinit-inittab_xen.inc | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/recipes-core/sysvinit/sysvinit-inittab_xen.inc b/recipes-core/sysvinit/sysvinit-inittab_xen.inc
> index 7f92bd1..724f47d 100644
> --- a/recipes-core/sysvinit/sysvinit-inittab_xen.inc
> +++ b/recipes-core/sysvinit/sysvinit-inittab_xen.inc
> @@ -1,4 +1,10 @@
> +
> +
>  do_install:append() {
> -                echo "" >> ${D}${sysconfdir}/inittab
> -                echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab
> +    # if SERIAL_CONSOLES contains hvc0, it is already added in inittab so do
> +    # not add it twice
> +    if echo "${SERIAL_CONSOLES}" | grep -vq "hvc0"; then
> +        echo "" >> ${D}${sysconfdir}/inittab
> +        echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab
> +    fi
>  }
> -- 
> 2.25.1
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#7400): https://lists.yoctoproject.org/g/meta-virtualization/message/7400
> Mute This Topic: https://lists.yoctoproject.org/mt/92046232/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 



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

* Re: [meta-virtualization] [PATCH] xen/sysvinit: add hvc0 console only if not there already
  2022-07-05 20:29 ` [meta-virtualization] " Bruce Ashfield
@ 2022-07-06  5:25   ` Christopher Clark
  2022-07-06  7:38   ` Bertrand Marquis
  1 sibling, 0 replies; 5+ messages in thread
From: Christopher Clark @ 2022-07-06  5:25 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Bertrand Marquis, meta-virtualization, nd

On Tue, Jul 5, 2022 at 1:29 PM Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>
> Looks ok to me. I'll give it another day to hear from Christopher, and then
> I'll do the merge.

Ack from me - thanks

Christopher

>
> Bruce
>
> In message: [meta-virtualization] [PATCH] xen/sysvinit: add hvc0 console only if not there already
> on 28/06/2022 Bertrand Marquis wrote:
>
> > The base inittab recipe is creating inittab entries for consoles listed
> > in SERIAL_CONSOLES.
> > For qemu, this contains "115200,hvc0" so an entry is created in inittab
> > for it.
> > Prevent to create a second entry if hvc0 is present in SERIAL_CONSOLES.
> >
> > On qemuarm, this solves issues with the console when starting on top of
> > Xen as dom0.
> >
> > Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
> > ---
> >  recipes-core/sysvinit/sysvinit-inittab_xen.inc | 10 ++++++++--
> >  1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/recipes-core/sysvinit/sysvinit-inittab_xen.inc b/recipes-core/sysvinit/sysvinit-inittab_xen.inc
> > index 7f92bd1..724f47d 100644
> > --- a/recipes-core/sysvinit/sysvinit-inittab_xen.inc
> > +++ b/recipes-core/sysvinit/sysvinit-inittab_xen.inc
> > @@ -1,4 +1,10 @@
> > +
> > +
> >  do_install:append() {
> > -                echo "" >> ${D}${sysconfdir}/inittab
> > -                echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab
> > +    # if SERIAL_CONSOLES contains hvc0, it is already added in inittab so do
> > +    # not add it twice
> > +    if echo "${SERIAL_CONSOLES}" | grep -vq "hvc0"; then
> > +        echo "" >> ${D}${sysconfdir}/inittab
> > +        echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab
> > +    fi
> >  }
> > --
> > 2.25.1
> >
>
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#7400): https://lists.yoctoproject.org/g/meta-virtualization/message/7400
> > Mute This Topic: https://lists.yoctoproject.org/mt/92046232/1050810
> > Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> > Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>


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

* Re: [meta-virtualization] [PATCH] xen/sysvinit: add hvc0 console only if not there already
  2022-07-05 20:29 ` [meta-virtualization] " Bruce Ashfield
  2022-07-06  5:25   ` Christopher Clark
@ 2022-07-06  7:38   ` Bertrand Marquis
  1 sibling, 0 replies; 5+ messages in thread
From: Bertrand Marquis @ 2022-07-06  7:38 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization, nd, christopher.w.clark

Hi Bruce,

> On 5 Jul 2022, at 21:29, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
> 
> Looks ok to me. I'll give it another day to hear from Christopher, and then
> I'll do the merge.

He just did (thanks Christopher), would you mind also pushing this to kirkstone branch ?

Thanks
Bertrand

> 
> Bruce
> 
> In message: [meta-virtualization] [PATCH] xen/sysvinit: add hvc0 console only if not there already
> on 28/06/2022 Bertrand Marquis wrote:
> 
>> The base inittab recipe is creating inittab entries for consoles listed
>> in SERIAL_CONSOLES.
>> For qemu, this contains "115200,hvc0" so an entry is created in inittab
>> for it.
>> Prevent to create a second entry if hvc0 is present in SERIAL_CONSOLES.
>> 
>> On qemuarm, this solves issues with the console when starting on top of
>> Xen as dom0.
>> 
>> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
>> ---
>> recipes-core/sysvinit/sysvinit-inittab_xen.inc | 10 ++++++++--
>> 1 file changed, 8 insertions(+), 2 deletions(-)
>> 
>> diff --git a/recipes-core/sysvinit/sysvinit-inittab_xen.inc b/recipes-core/sysvinit/sysvinit-inittab_xen.inc
>> index 7f92bd1..724f47d 100644
>> --- a/recipes-core/sysvinit/sysvinit-inittab_xen.inc
>> +++ b/recipes-core/sysvinit/sysvinit-inittab_xen.inc
>> @@ -1,4 +1,10 @@
>> +
>> +
>> do_install:append() {
>> -                echo "" >> ${D}${sysconfdir}/inittab
>> -                echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab
>> +    # if SERIAL_CONSOLES contains hvc0, it is already added in inittab so do
>> +    # not add it twice
>> +    if echo "${SERIAL_CONSOLES}" | grep -vq "hvc0"; then
>> +        echo "" >> ${D}${sysconfdir}/inittab
>> +        echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab
>> +    fi
>> }
>> -- 
>> 2.25.1
>> 
> 
>> 
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#7400): https://lists.yoctoproject.org/g/meta-virtualization/message/7400
>> Mute This Topic: https://lists.yoctoproject.org/mt/92046232/1050810
>> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
>> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>> 
> 



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

* Re: [meta-virtualization] [PATCH] xen/sysvinit: add hvc0 console only if not there already
  2022-06-28 15:29 [PATCH] xen/sysvinit: add hvc0 console only if not there already Bertrand Marquis
  2022-07-05 20:29 ` [meta-virtualization] " Bruce Ashfield
@ 2022-07-07 14:56 ` Bruce Ashfield
  1 sibling, 0 replies; 5+ messages in thread
From: Bruce Ashfield @ 2022-07-07 14:56 UTC (permalink / raw)
  To: Bertrand Marquis; +Cc: meta-virtualization, nd, christopher.w.clark

merged to master and kirkstone.

Bruce

In message: [meta-virtualization] [PATCH] xen/sysvinit: add hvc0 console only if not there already
on 28/06/2022 Bertrand Marquis wrote:

> The base inittab recipe is creating inittab entries for consoles listed
> in SERIAL_CONSOLES.
> For qemu, this contains "115200,hvc0" so an entry is created in inittab
> for it.
> Prevent to create a second entry if hvc0 is present in SERIAL_CONSOLES.
> 
> On qemuarm, this solves issues with the console when starting on top of
> Xen as dom0.
> 
> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
> ---
>  recipes-core/sysvinit/sysvinit-inittab_xen.inc | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/recipes-core/sysvinit/sysvinit-inittab_xen.inc b/recipes-core/sysvinit/sysvinit-inittab_xen.inc
> index 7f92bd1..724f47d 100644
> --- a/recipes-core/sysvinit/sysvinit-inittab_xen.inc
> +++ b/recipes-core/sysvinit/sysvinit-inittab_xen.inc
> @@ -1,4 +1,10 @@
> +
> +
>  do_install:append() {
> -                echo "" >> ${D}${sysconfdir}/inittab
> -                echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab
> +    # if SERIAL_CONSOLES contains hvc0, it is already added in inittab so do
> +    # not add it twice
> +    if echo "${SERIAL_CONSOLES}" | grep -vq "hvc0"; then
> +        echo "" >> ${D}${sysconfdir}/inittab
> +        echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab
> +    fi
>  }
> -- 
> 2.25.1
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#7400): https://lists.yoctoproject.org/g/meta-virtualization/message/7400
> Mute This Topic: https://lists.yoctoproject.org/mt/92046232/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 



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

end of thread, other threads:[~2022-07-07 14:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28 15:29 [PATCH] xen/sysvinit: add hvc0 console only if not there already Bertrand Marquis
2022-07-05 20:29 ` [meta-virtualization] " Bruce Ashfield
2022-07-06  5:25   ` Christopher Clark
2022-07-06  7:38   ` Bertrand Marquis
2022-07-07 14:56 ` Bruce Ashfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).