[PATCH] xen/sysvinit: add hvc0 console only if not there already
Bertrand Marquis
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@...>
---
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-cor=
e/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 115=
200 hvc0" >> ${D}${sysconfdir}/inittab
+ # if SERIAL_CONSOLES contains hvc0, it is already added in inittab s=
o 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
}
--=20
2.25.1
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@...>
---
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-cor=
e/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 115=
200 hvc0" >> ${D}${sysconfdir}/inittab
+ # if SERIAL_CONSOLES contains hvc0, it is already added in inittab s=
o 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
}
--=20
2.25.1