From: <dha...@us...> - 2007-10-19 17:58:17
|
Revision: 1304 http://astlinux.svn.sourceforge.net/astlinux/?rev=1304&view=rev Author: dhartman Date: 2007-10-19 10:58:20 -0700 (Fri, 19 Oct 2007) Log Message: ----------- make udev do something Modified Paths: -------------- trunk/package/udev/udev.mk trunk/target/generic/target_skeleton/etc/rc Removed Paths: ------------- trunk/package/udev/init-udev Deleted: trunk/package/udev/init-udev =================================================================== --- trunk/package/udev/init-udev 2007-10-19 16:49:53 UTC (rev 1303) +++ trunk/package/udev/init-udev 2007-10-19 17:58:20 UTC (rev 1304) @@ -1,82 +0,0 @@ -#!/bin/sh -# -# udev This is a minimal non-LSB version of a UDEV startup script. It -# was derived by stripping down the udev-058 LSB version for use -# with buildroot on embedded hardware using Linux 2.6.12+ kernels. -# -# You may need to customize this for your system's resource limits -# (including startup time!) and administration. For example, if -# your early userspace has a custom initramfs or initrd you might -# need /dev much earlier; or without hotpluggable busses (like USB, -# PCMCIA, MMC/SD, and so on) your /dev might be static after boot. -# -# This script assumes your system boots right into the eventual root -# filesystem, and that init runs this udev script before any programs -# needing more device nodes than the bare-bones set -- /dev/console, -# /dev/zero, /dev/null -- that's needed to boot and run this script. -# - -# old kernels don't use udev -case $(uname -r) in -2.6*|2.7*) ;; -*) exit 0;; -esac - -# Check for missing binaries -UDEV_BIN=/sbin/udevd -test -x $UDEV_BIN || exit 5 -UDEVSTART_BIN=/sbin/udevstart -test -x $UDEVSTART_BIN || exit 5 - -# Check for config file and read it -UDEV_CONFIG=/etc/udev/udev.conf -test -r $UDEV_CONFIG || exit 6 -. $UDEV_CONFIG - -# Directory where sysfs is mounted -SYSFS_DIR=/sys - -case "$1" in - start) - # mount sysfs if it's not yet mounted - if [ ! -d $SYSFS_DIR ]; then - echo "${0}: SYSFS_DIR \"$SYSFS_DIR\" not found" - exit 1 - fi - grep -q "^sysfs $SYSFS_DIR" /proc/mounts || - mount -t sysfs /sys /sys || - exit 1 - - # mount $udev_root as ramfs if it's not yet mounted - # we know 2.6 kernels always support ramfs - if [ ! -d $udev_root ]; then - echo "${0}: udev_root \"$udev_root\" not found" - exit 1 - fi - grep -q "^udev $udev_root" /proc/mounts || - mount -t ramfs udev $udev_root || - exit 1 - - # heck, go whole-hog: use only new style hotplug - # echo $UDEV_BIN > /proc/sys/kernel/hotplug - - # populate /dev (normally) - echo -n "Populating $udev_root using udev... " - $UDEVSTART_BIN || (echo "FAIL" && exit 1) - mkdir $udev_root/pts $udev_root/shm - mount /dev/pts - echo "done" - - # Start udevd - echo -n "Starting udevd... " - $UDEVD_BIN --daemon || (echo "FAIL" && exit 1) - echo "done" - ;; - stop) - # do nothing - ;; - *) - echo "Usage: $0 {start|stop}" - exit 1 - ;; -esac Modified: trunk/package/udev/udev.mk =================================================================== --- trunk/package/udev/udev.mk 2007-10-19 16:49:53 UTC (rev 1303) +++ trunk/package/udev/udev.mk 2007-10-19 17:58:20 UTC (rev 1304) @@ -48,7 +48,7 @@ USE_LOG=false USE_SELINUX=false \ EXTRAS="extras/firmware" \ udevdir=$(UDEV_ROOT) -C $(UDEV_DIR) install - $(INSTALL) -m 0755 -D package/udev/init-udev $(TARGET_DIR)/etc/init.d/udev +# $(INSTALL) -m 0755 -D package/udev/init-udev $(TARGET_DIR)/etc/init.d/udev $(INSTALL) -m 0644 -D package/udev/udev-70-ide.rules $(TARGET_DIR)/etc/udev/rules.d/70-ide.rules $(INSTALL) -m 0644 -D package/udev/udev-55-firmware.rules $(TARGET_DIR)/etc/udev/rules.d/55-firmware.rules $(INSTALL) -m 0644 -D package/udev/udev-51-usbfs.rules $(TARGET_DIR)/etc/udev/rules.d/51-usbfs.rules Modified: trunk/target/generic/target_skeleton/etc/rc =================================================================== --- trunk/target/generic/target_skeleton/etc/rc 2007-10-19 16:49:53 UTC (rev 1303) +++ trunk/target/generic/target_skeleton/etc/rc 2007-10-19 17:58:20 UTC (rev 1304) @@ -118,8 +118,10 @@ mount -t tmpfs -o size=200k none /dev mount -t tmpfs -o size=5000k none /var mount -t tmpfs -o size=10000k none /tmp +if [ !-x /sbin/udevstart ] mkdir /dev/pts mount -t devpts none /dev/pts +fi mount -t sysfs none /sys mount -t usbfs usbfs /proc/bus/usb mkdir /tmp/etc @@ -131,10 +133,18 @@ none /var tmpfs size=5000k 0 0 " > /tmp/etc/fstab +if [ -x /sbin/udevstart ] +then +/sbin/udevstart /dev +mkdir /dev/pts +mount -t devpts none /dev/pts +/sbin/udevd --daemon +else if [ -d /stat/dev ] then cp -a /stat/dev/* /dev/ fi +fi if `grep -q "astlinux=net4801" /proc/cmdline` then This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |