diff options
| author | Bertrand Marquis <bertrand.marquis@arm.com> | 2022-06-28 16:29:54 +0100 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2022-07-07 10:55:15 -0400 |
| commit | aa0ac74a03da311d3bd4819502c556a184835a84 (patch) | |
| tree | 501cba419f80c3df0cf1190ddbe365b30de0d90c /recipes-core | |
| parent | 93abfdb32743c3bb2242c9d40e6dd94f487d8166 (diff) | |
| download | meta-virtualization-aa0ac74a03da311d3bd4819502c556a184835a84.tar.gz | |
xen/sysvinit: add hvc0 console only if not there already
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>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-core')
| -rw-r--r-- | recipes-core/sysvinit/sysvinit-inittab_xen.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/recipes-core/sysvinit/sysvinit-inittab_xen.inc b/recipes-core/sysvinit/sysvinit-inittab_xen.inc index 7f92bd1f..724f47dc 100644 --- a/recipes-core/sysvinit/sysvinit-inittab_xen.inc +++ b/recipes-core/sysvinit/sysvinit-inittab_xen.inc | |||
| @@ -1,4 +1,10 @@ | |||
| 1 | |||
| 2 | |||
| 1 | do_install:append() { | 3 | do_install:append() { |
| 2 | echo "" >> ${D}${sysconfdir}/inittab | 4 | # if SERIAL_CONSOLES contains hvc0, it is already added in inittab so do |
| 3 | echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab | 5 | # not add it twice |
| 6 | if echo "${SERIAL_CONSOLES}" | grep -vq "hvc0"; then | ||
| 7 | echo "" >> ${D}${sysconfdir}/inittab | ||
| 8 | echo "X0:12345:respawn:${base_sbindir}/getty-wrapper 115200 hvc0" >> ${D}${sysconfdir}/inittab | ||
| 9 | fi | ||
| 4 | } | 10 | } |
