[isar-cip-core][PATCH 11/12] customizations: Mask hvc0 console under qemu-riscv64


Jan Kiszka
 

From: Jan Kiszka <jan.kiszka@...>

RISC-V kernels tend to come with a virtual console via SBI. Under QEMU,
this is redundant to the serial console that Linux support as well,
giving two prompts on the UART. Disable the virtual on via systemd.

Signed-off-by: Jan Kiszka <jan.kiszka@...>
---
recipes-core/customizations/customizations.bb | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/recipes-core/customizations/customizations.bb b/recipes-core/customizations/customizations.bb
index 96e88ddb..c057d576 100644
--- a/recipes-core/customizations/customizations.bb
+++ b/recipes-core/customizations/customizations.bb
@@ -12,3 +12,11 @@
require common.inc

DESCRIPTION = "CIP Core image demo & customizations"
+
+do_prepare_build_prepend_qemu-riscv64() {
+ if ! grep -q serial-getty@... ${WORKDIR}/postinst; then
+ # suppress SBI console - overlaps with serial console
+ echo >> ${WORKDIR}/postinst
+ echo "systemctl mask serial-getty@..." >> ${WORKDIR}/postinst
+ fi
+}
--
2.35.3