[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#386441: initramfs-tools: Support custom framebuffer modules



Package: initramfs-tools
Version: 0.78
Severity: minor
Tags: patch

The attached patch adds support for the "video" kernel parameter to the framebuffer script. This allows for the use of non-vesa/vga framebuffer drivers and at the same time simplifies the logic a bit.

--
David Härdeman
diff -ur ./initramfs-tools-0.78.orig/scripts/init-top/framebuffer ./initramfs-tools-0.78/scripts/init-top/framebuffer
--- ./initramfs-tools-0.78.orig/scripts/init-top/framebuffer	2006-07-24 23:28:00.000000000 +0200
+++ ./initramfs-tools-0.78/scripts/init-top/framebuffer	2006-09-07 19:10:22.000000000 +0200
@@ -13,27 +13,32 @@
 	;;
 esac
 
-SPLASH=false;
-VESA=false;
+FB=""
 
 for x in $(cat /proc/cmdline); do
 	case $x in
 	splash*)
-		SPLASH=true;
+		# Let the other options take precedent
+		if [ -z "$FB" ]; then
+			FB="vga16fb"
+		fi
 		;;
 	vga=*)
-		VESA=true;
+		FB="vesafb"
+		;;
+	video=*)
+		# Look for an argument like video=<driver>:<xres>x<yres>[-<bpp>][@refresh]
+		TMP=$(echo $x | cut -d '=' -f2 | cut -s -d ':' -f1)
+		if [ -n "$TMP" ]; then
+			FB="$TMP"
+		fi
 		;;
 	esac
 done
 
-if [ $SPLASH = "true" -o $VESA = "true" ]; then
+if [ -n "$FB" ]; then
 	modprobe -q fbcon
-	if [ $VESA = "true" ]; then
-		modprobe -q vesafb
-	else
-		modprobe -q vga16fb
-	fi
+	modprobe -q $FB
 	mknod /dev/fb0 c 29 0
 	for i in 0 1 2 3 4 5 6 7 8; do
 		mknod /dev/tty$i c 4 $i

Reply to: