summaryrefslogtreecommitdiffstats
path: root/main/mkinitfs/0001-init-fix-loading-of-fbcon.patch
blob: 485229a2c37d80067690830a26a50c0ad794b106 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 8427257b986105d09c4c287e739af152dc6ccfce Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 26 Nov 2014 13:53:23 +0000
Subject: [PATCH] init: fix loading of fbcon

we check if /sys/class/graphics/fb0 exists before loading fbcon and
allow user to disable tiwh nofbcon as boot option
---
 initramfs-init.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/initramfs-init.in b/initramfs-init.in
index 7831995..4b010f6 100755
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -386,7 +386,7 @@ eval set -- `cat /proc/cmdline`
 
 myopts="alpine_dev autodetect autoraid chart cryptroot cryptdm debug_init
 	dma init_args keep_apk_new modules ovl_dev pkgs quiet root_size root
-	usbdelay ip alpine_repo apkovl alpine_start"
+	usbdelay ip alpine_repo apkovl alpine_start nofbcon"
 
 for opt; do
 	case "$opt" in
@@ -524,11 +524,11 @@ scan_drivers
 scan_drivers
 eend 0
 
-ebegin "Setting up framebuffer console"
-if [ -d /lib/modules/`uname -r`/kernel/drivers/gpu ]; then
+if [ -z "$KOPT_nofbcon" ] && [ -e /sys/class/graphics/fb0 ]; then
+	ebegin "Setting up framebuffer console"
 	modprobe -q fbcon &>/dev/null
+	eend 0
 fi
-eend 0
 
 # check if root=... was set
 if [ -n "$KOPT_root" ]; then
-- 
2.1.3