Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] board/raspberrypi: enable hdmi console for systemd
@ 2023-08-12  5:08 Alexey Roslyakov
  2023-08-12 10:47 ` Thomas Petazzoni via buildroot
  2023-09-12  6:05 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Alexey Roslyakov @ 2023-08-12  5:08 UTC (permalink / raw)
  To: buildroot; +Cc: Alexey Roslyakov

Most of the users use HDMI console on RPi and with increasing popularity
of systemd they face a trouble.
systemd doesn't use /etc/inittab, enable getty@tty1.service instead.

Signed-off-by: Alexey Roslyakov <alexey.roslyakov@gmail.com>
---
 board/raspberrypi/post-build.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/board/raspberrypi/post-build.sh b/board/raspberrypi/post-build.sh
index b24256fcea..5da989f37c 100755
--- a/board/raspberrypi/post-build.sh
+++ b/board/raspberrypi/post-build.sh
@@ -8,6 +8,12 @@ if [ -e ${TARGET_DIR}/etc/inittab ]; then
     grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \
 	sed -i '/GENERIC_SERIAL/a\
 tty1::respawn:/sbin/getty -L  tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab
+else
+	# systemd doesn't use /etc/inittab, enable getty.tty1.service instead
+	if [ -d ${TARGET_DIR}/etc/systemd ]; then
+		mkdir -p "${TARGET_DIR}/etc/systemd/system/getty.target.wants"
+		ln -sf "/lib/systemd/system/getty@.service" "${TARGET_DIR}/etc/systemd/system/getty.target.wants/getty@tty1.service"
+	fi
 fi
 
 # exnsure overlays exists for genimage
-- 
2.41.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-09-12  6:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-12  5:08 [Buildroot] [PATCH 1/1] board/raspberrypi: enable hdmi console for systemd Alexey Roslyakov
2023-08-12 10:47 ` Thomas Petazzoni via buildroot
2023-09-12  6:05 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox