From: Cyril Chemparathy <cyril.chempara...@xilinx.com>

This commit switches over to using existing SERIAL_CONSOLES mechanism
for hvc0 inittab entry generation.  This then results in
/bin/start_getty wrapper being used, which avoids the getty failure seen
when running a xen capable rootfs natively on linux.

Signed-off-by: Cyril Chemparathy <cyril.chempara...@xilinx.com>
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-ma...@xilinx.com>
Signed-off-by: Bhargava Sreekantappa Gayathri 
<bhargava.sreekantappa-gayat...@xilinx.com>
---
Change log:
v2: Fixed whitespace trashing in our email system which was causing the patch
        to not apply

v3: Update patch author

 conf/distro/include/virt_console.inc                | 1 +
 conf/layer.conf                                     | 3 +++
 recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend | 6 ------
 3 files changed, 4 insertions(+), 6 deletions(-)
 create mode 100644 conf/distro/include/virt_console.inc
 delete mode 100644 recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend

diff --git a/conf/distro/include/virt_console.inc 
b/conf/distro/include/virt_console.inc
new file mode 100644
index 0000000..4d56806
--- /dev/null
+++ b/conf/distro/include/virt_console.inc
@@ -0,0 +1 @@
+SERIAL_CONSOLES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' 
115200;hvc0', '', d)}"
diff --git a/conf/layer.conf b/conf/layer.conf
index 4233d39..bfc47ff 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -20,6 +20,9 @@ LAYERDEPENDS_virtualization-layer = "core networking-layer"
 # Override security flags
 require conf/distro/include/virt_security_flags.inc
 
+# Add hypervisor console
+require conf/distro/include/virt_console.inc
+
 PREFERRED_PROVIDER_virtual/runc ?= "runc-docker"
 PREFERRED_PROVIDER_virtual/containerd ?= "containerd-opencontainers"
 
diff --git a/recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend 
b/recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend
deleted file mode 100644
index 1b89aec..0000000
--- a/recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend
+++ /dev/null
@@ -1,6 +0,0 @@
-do_install_append() {
-       if echo "${DISTRO_FEATURES}" | grep -q 'xen'; then
-               echo "" >> ${D}${sysconfdir}/inittab
-               echo "X0:12345:respawn:/sbin/getty 115200 hvc0" >> 
${D}${sysconfdir}/inittab
-       fi
-}
-- 
2.7.4

-- 
_______________________________________________
meta-virtualization mailing list
meta-virtualization@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-virtualization

Reply via email to