Bug#386441: initramfs-tools: Support custom framebuffer modules
On Thu, 07 Sep 2006, David Härdeman wrote:
> 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.
looks good, need to merge anyway the improvement by mjg59
in ubuntu to add fb unconditionaly, although i don't know
yet the reason of his change.
nitpicking below.
> --
> 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)
please use shell expansion, cut is not available in klibc-utils.
i know that's a bit of a pain but the initramfs-tools core
needs to work with klibc only.
> + 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
thanks + regards
--
maks
Reply to: