SVN: geninitrd/trunk: Makefile geninitrd mod-uvesafb.sh

glen glen at pld-linux.org
Fri Apr 3 01:07:05 CEST 2009


Author: glen
Date: Fri Apr  3 01:07:05 2009
New Revision: 10293

Added:
   geninitrd/trunk/mod-uvesafb.sh
Modified:
   geninitrd/trunk/Makefile
   geninitrd/trunk/geninitrd
Log:
- uvesafb (v86d) modularized

Modified: geninitrd/trunk/Makefile
==============================================================================
--- geninitrd/trunk/Makefile	(original)
+++ geninitrd/trunk/Makefile	Fri Apr  3 01:07:05 2009
@@ -1,6 +1,6 @@
 # when making release, make sure you do it as RELEASE document describes
 VERSION		:= 10000.3
-MODS		:= ide luks multipath dmraid lvm md blkid udev tuxonice suspend fbsplash condecor bootsplash
+MODS		:= ide luks multipath dmraid lvm md blkid udev tuxonice suspend fbsplash condecor bootsplash uvesafb
 FILES_MODS  := $(MODS:%=mod-%.sh)
 FILES		:= Makefile geninitrd.sysconfig geninitrd functions $(FILES_MODS) geninitrd.8 geninitrd.8.xml ChangeLog
 prefix		:= /usr

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Fri Apr  3 01:07:05 2009
@@ -45,9 +45,6 @@
 # are /dev nodes already created from /proc/devices info?
 proc_partitions=no
 
-# whether v86d should be installed
-need_v86d=0
-
 # if we should init NFS at boot
 have_nfs=no
 
@@ -341,11 +338,6 @@
 		done
 		if [ $have = 0 ]; then
 			MODULES="$MODULES $mod"
-
-			# if we are adding uvesafb, we need v86d as well
-			if [ "$module" = "uvesafb" ]; then
-				need_v86d=yes
-			fi				
 		fi
 	done
 }
@@ -692,14 +684,6 @@
 	done
 }
 
-initrd_gen_v86d() {
-	debug "initrd_gen_v86d"
-	mknod $DESTDIR/dev/mem c 1 1
-	mknod $DESTDIR/dev/tty1 c 4 1
-	inst_d /sbin
-	inst_exec /sbin/v86d /sbin
-}
-
 # Generates /dev nodes based on /proc/partitions information.
 # Needs /proc mounted.
 # Can be called multiple times.
@@ -876,7 +860,7 @@
 	. /etc/sysconfig/geninitrd
 fi
 
-geninitrd_load_mods ide luks multipath dmraid lvm md blkid udev tuxonice suspend fbsplash condecor
+geninitrd_load_mods ide luks multipath dmraid lvm md blkid udev tuxonice suspend fbsplash condecor bootsplash uvesafb
 
 while [ $# -gt 0 ]; do
 	case $1 in
@@ -1249,9 +1233,8 @@
 	initrd_gen_tuxonice
 fi
 
-if is_yes "$need_v86d"; then
-	initrd_gen_v86d
-fi
+find_modules_uvesafb
+initrd_gen_uvesafb
 
 if is_yes "$have_luks"; then
 	initrd_gen_luks

Added: geninitrd/trunk/mod-uvesafb.sh
==============================================================================
--- (empty file)
+++ geninitrd/trunk/mod-uvesafb.sh	Fri Apr  3 01:07:05 2009
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# geninitrd mod: uvesafb
+
+# whether v86d should be installed
+need_uvesafb=no
+
+# find modules for for fbsplash
+# @access	public
+find_modules_uvesafb() {
+	# if we are adding uvesafb, we need v86d as well
+	local m
+	for m in $MODULES; do
+		if [ "$m" = "uvesafb" ]; then
+			need_uvesafb=yes
+		fi
+	done
+}
+
+# generate initrd fragment
+# @access	public
+initrd_gen_uvesafb() {
+	if ! is_yes "$need_uvesafb"; then
+		return
+	fi
+
+	debug "initrd_gen_uvesafb"
+	mknod $DESTDIR/dev/mem c 1 1
+	mknod $DESTDIR/dev/tty1 c 4 1
+	inst_d /sbin
+	inst_exec /sbin/v86d /sbin
+}


More information about the pld-cvs-commit mailing list