diff mbox series

gemini: splash banner on framebuffer console

Message ID 20210418151557.1742304-1-linus.walleij@linaro.org
State Accepted, archived
Headers show
Series gemini: splash banner on framebuffer console | expand

Commit Message

Linus Walleij April 18, 2021, 3:15 p.m. UTC
The D-Link DIR-685 has a small screen with a framebuffer
console, so if we have this, when we start, display the
banner on this framebuffer console so the user know they
are running OpenWRT as root filesystem.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
This is nice on any routers with a screen. OK I guess
there is just the one: D-Link DIR-685.

If you know of more routers with screens I can try to make
this more generic. Also need suggestions of where to
put it in that case. target/linux/generic?
---
 target/linux/gemini/base-files/etc/board.d/03_splash | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100755 target/linux/gemini/base-files/etc/board.d/03_splash
diff mbox series

Patch

diff --git a/target/linux/gemini/base-files/etc/board.d/03_splash b/target/linux/gemini/base-files/etc/board.d/03_splash
new file mode 100755
index 000000000000..6fe5458046a2
--- /dev/null
+++ b/target/linux/gemini/base-files/etc/board.d/03_splash
@@ -0,0 +1,9 @@ 
+#!/bin/sh
+
+# OpenWRT splash screen if using framebuffer console
+if [ ! -d /sys/class/graphics/fbcon ] ; then
+	exit 0
+fi
+
+echo 0 > /sys/class/graphics/fbcon/cursor_blink
+cat /etc/banner > /dev/tty0