init: Set console cursor and font only on systems without Frecon.
The configuration of cursor and large font are both not required for systems
using Frecon.
BUG=none
TEST=Manually boots on Link.
Change-Id: I11a66c2cac5d164285f20ebdcf8c909e0c32789f
Reviewed-on: https://chromium-review.googlesource.com/269077
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Wei-Ning Huang <wnhuang@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
diff --git a/init/common.d/vt2_hacks/cursor.sh b/init/common.d/vt2_hacks/cursor.sh
index 793c6af..13498a1 100644
--- a/init/common.d/vt2_hacks/cursor.sh
+++ b/init/common.d/vt2_hacks/cursor.sh
@@ -4,6 +4,14 @@
# found in the LICENSE file.
# This file will be executed when user logins into VT2 or ssh.
+is_freon() {
+ # Currently 'frecon' is only available on boards with Freon enabled.
+ if [ -x "/sbin/frecon" ]; then
+ return 0
+ else
+ return 1
+ fi
+}
is_highres() {
local modes_file="/sys/class/graphics/fb0/modes"
@@ -53,11 +61,14 @@
}
main() {
- # Factory always needs cursor.
- setterm -cursor on
+ # Frecon by default has cursor and large font enabled.
+ if ! is_freon; then
+ # Factory with VT always needs cursor.
+ setterm -cursor on
- # On high-DPI systems, we need large console fonts.
- set_vt_fonts || true
+ # On high-DPI systems, we need large console fonts.
+ set_vt_fonts || true
+ fi
# Put '/usr/local/factory/bin' at the head of PATH so that we can run factory
# binaries easily.