r4464 - in dists/trunk/utils/initramfs-tools: . scripts

Bastian Blank waldi at costa.debian.org
Fri Oct 14 19:42:15 UTC 2005


Author: waldi
Date: 2005-10-14 19:42:14 +0000 (Fri, 14 Oct 2005)
New Revision: 4464

Modified:
   dists/trunk/utils/initramfs-tools/init
   dists/trunk/utils/initramfs-tools/mkinitramfs
   dists/trunk/utils/initramfs-tools/scripts/functions
Log:
* Use udevsynthesize.
* Add hotplug agents.

* init
  - Start and kill udevd.
  - Create /dev/.udevdb.
  - Use udevsynthesize.
  - Call depmod.
* mkinitramfs
  - Install udevd and udevsynthesize instead of udevstart.
  - Install hotplug agents.
* scripts/functions
  (load_modules)
  - Don't call depmod and udevstart.
  - Don't crawl pci devices ourself.


Modified: dists/trunk/utils/initramfs-tools/init
===================================================================
--- dists/trunk/utils/initramfs-tools/init	2005-10-14 17:23:49 UTC (rev 4463)
+++ dists/trunk/utils/initramfs-tools/init	2005-10-14 19:42:14 UTC (rev 4464)
@@ -67,15 +67,21 @@
 
 . /scripts/${BOOT}
 
+depmod -a
+
+# Populate /dev tree
+log_begin_msg "Initializing /dev"
+mkdir /dev/.udevdb
+UDEVD_EXPECTED_SEQNUM=$(($(cat /sys/kernel/hotplug_seqnum) + 1)) udevd --daemon
+udevsynthesize
+sleep 2
+log_end_msg
+
 log_begin_msg "Loading modules"
 load_modules
 log_end_msg
 
-# Populate /dev tree
-log_begin_msg "Initializing /dev"
 parse_numeric ${ROOT}
-udevstart
-log_end_msg
 
 if [ x${break} = xyes ]; then 
 	panic "Spawning shell within the initramfs"
@@ -85,6 +91,8 @@
 run_scripts /scripts/init-premount
 log_end_msg
 
+killall udevd
+
 log_begin_msg "Mounting root file system"
 mountroot
 log_end_msg

Modified: dists/trunk/utils/initramfs-tools/mkinitramfs
===================================================================
--- dists/trunk/utils/initramfs-tools/mkinitramfs	2005-10-14 17:23:49 UTC (rev 4463)
+++ dists/trunk/utils/initramfs-tools/mkinitramfs	2005-10-14 19:42:14 UTC (rev 4464)
@@ -151,9 +151,11 @@
 cp ${CONFDIR}/initramfs.conf ${DESTDIR}/conf
 cp -a /etc/udev ${DESTDIR}/etc
 
-# Hack until udev is built with klibc
+# udev
 cp /sbin/udev ${DESTDIR}/sbin
-cp /sbin/udevstart ${DESTDIR}/sbin
+cp /sbin/udevd ${DESTDIR}/sbin
+cp /sbin/udevsynthesize ${DESTDIR}/sbin
+cp -a /lib/hotplug ${DESTDIR}/lib
 
 # Busybox
 cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox

Modified: dists/trunk/utils/initramfs-tools/scripts/functions
===================================================================
--- dists/trunk/utils/initramfs-tools/scripts/functions	2005-10-14 17:23:49 UTC (rev 4463)
+++ dists/trunk/utils/initramfs-tools/scripts/functions	2005-10-14 19:42:14 UTC (rev 4464)
@@ -203,8 +203,6 @@
 
 load_modules()
 {
-	depmod -a
-
 	# Load custom modules first
 	if [ -e /conf/modules ]; then
 		cat /conf/modules | while read m; do
@@ -219,18 +217,6 @@
 		done
 	fi
 
-	for x in /sys/bus/pci/devices/*; do
-		if [ -e ${x}/class ]; then
-			case $(cat ${x}/class) in
-			0x0100*|0x0101*)
-				if [ -e ${x}/modalias ]; then
-					modprobe -q $(cat ${x}/modalias)
-				fi	
-			;;
-			esac
-		fi
-	done
-
 	ide_boot_events
 
 	scsi_boot_events
@@ -239,8 +225,6 @@
 
 	# FIXME - need to start LVM here
 
-	udevstart
-
 	if [ -e /sys/power/resume ]; then
 		if [ -e "${resume}" ]; then
 			major=$((0x$(stat -c%t ${resume})))
@@ -249,12 +233,6 @@
 		fi
 	fi
 
-	for x in /sys/bus/pci/devices/*; do
-		if [ -e ${x}/modalias ]; then
-			modprobe -q $(cat ${x}/modalias)
-		fi
-	done
-
 	# Give the USB bus a moment to catch up
 	sleep 2
 




More information about the Kernel-svn-changes mailing list