Changeset 7097


Ignore:
Timestamp:
2007-05-05T20:33:18+02:00 (10 years ago)
Author:
nbd
Message:

use hotplug2 for serializing hotplug events on 2.6

Location:
trunk
Files:
4 added
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/files/etc/init.d/boot

    r7066 r7097  
    2828        [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe 
    2929         
    30         # manually trigger hotplug before loading modules 
     30        # the coldplugging of network interfaces needs to happen later, so we do it manually here 
    3131        for iface in $(awk -F: '/:/ {print $1}' /proc/net/dev); do 
    3232                /usr/bin/env -i ACTION=add INTERFACE="$iface" /sbin/hotplug-call net 
    3333        done 
    34          
    35         /sbin/hotplug2 --persistent --max-children 5 & 
    36         echo /sbin/hotplug-call > /proc/sys/kernel/hotplug 
     34        /sbin/hotplug2 --persistent --max-children 1 & 
    3735 
    3836        # create /dev/root if it doesn't exist 
  • trunk/package/base-files/files/sbin/mount_root

    r6804 r7097  
    55mount none /proc -t proc 
    66size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo) 
     7 
    78mount none /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777 
    8 if grep devfs /proc/filesystems > /dev/null; then 
     9if grep devfs /proc/filesystems >/dev/null; then 
    910        mount none /dev -t devfs 
    1011else 
    11         mount -t sysfs none /sys 
    1212        mount -t tmpfs tmpfs /dev -o size=512K 
    1313        mknod /dev/console c 5 1 
    1414        exec >/dev/console </dev/console 2>&1 
    15         mkdir /dev/shm 
    16         /sbin/hotplug2 --no-persistent --coldplug --max-children 1 
    1715fi 
     16mkdir /dev/shm 
     17if grep sysfs /proc/filesystems >/dev/null; then 
     18        mount -t sysfs none /sys 
     19        HOTPLUG="" 
     20        # use a minimal ruleset only for creating device nodes 
     21        /sbin/hotplug2 --no-persistent --coldplug --set-rules-file /etc/hotplug2-init.rules 
     22else 
     23        HOTPLUG="/sbin/hotplug2-dnode" 
     24fi 
     25echo "$HOTPLUG" > /proc/sys/kernel/hotplug 
     26 
    1827mkdir -p /dev/pts 
    1928mount none /dev/pts -t devpts 
  • trunk/package/hotplug2/Makefile

    r6582 r7097  
    2222  SECTION:=utils 
    2323  CATEGORY:=Utilities 
    24   DEPENDS:=@LINUX_2_6 +udevtrigger 
    2524  TITLE:=Dynamic device management subsystem for embedded systems 
    2625  URL:=http://isteve.bofh.cz/~isteve/hotplug2/ 
     
    3332 
    3433define Package/hotplug2/install 
     34        $(INSTALL_DIR) $(1)/etc 
     35        $(INSTALL_DATA) ./files/hotplug2.rules $(1)/etc/ 
     36        $(INSTALL_DATA) ./files/hotplug2-init.rules $(1)/etc/ 
    3537        $(INSTALL_DIR) $(1)/sbin 
    3638        $(INSTALL_BIN) $(PKG_BUILD_DIR)/hotplug2 $(1)/sbin/ 
  • trunk/package/hotplug2/files/hotplug2.rules

    r7095 r7097  
    55 
    66DEVPATH is set { 
    7                         makedev /dev/%DEVICENAME% 0644 
     7        makedev /dev/%DEVICENAME% 0644 
    88} 
    99 
    10 MODALIAS is set { 
    11                         exec /sbin/modprobe -q %MODALIAS% ; 
     10SUBSYSTEM ~~ (net|button) { 
     11        exec /sbin/hotplug-call %SUBSYSTEM%; 
    1212} 
  • trunk/target/linux/brcm-2.4/base-files/default/etc/preinit

    r6804 r7097  
    3232        M0=/dev/pty/m0 
    3333        M1=/dev/pty/m1 
     34        HOTPLUG=/sbin/hotplug-call 
    3435else 
    3536        mount -t sysfs none /sys 
     
    3738        mknod /dev/console c 5 1 
    3839        mkdir /dev/shm 
    39         /sbin/hotplug2 --no-persistent --coldplug --max_children 1 
     40        /sbin/hotplug2 --no-persistent --coldplug --set-rules-file /etc/hotplug2-init.rules 
    4041        M0=/dev/ptmx 
    4142        M1=/dev/ptmx 
     43        HOTPLUG= 
    4244fi 
    4345mkdir -p /dev/pts 
     
    8789lock -w /tmp/.failsafe 
    8890set_state preinit 
    89 echo /sbin/hotplug-call > /proc/sys/kernel/hotplug 
     91echo "$HOTPLUG" > /proc/sys/kernel/hotplug 
    9092 
    9193ifconfig $ifname 0.0.0.0 down 
  • trunk/target/linux/brcm-2.4/config/default

    r6955 r7097  
    176176CONFIG_MTD_CFI_SSTSTD=y 
    177177CONFIG_MTD_SFLASH=y 
    178 # CONFIG_MTD_SPLIT_ROOTFS is not set 
    179178# CONFIG_NATSEMI is not set 
    180179# CONFIG_NE2K_PCI is not set 
  • trunk/target/linux/generic-2.6/config-template

    r7042 r7097  
    367367CONFIG_IP6_NF_MATCH_HL=m 
    368368CONFIG_IP6_NF_MATCH_IPV6HEADER=m 
     369CONFIG_IP6_NF_MATCH_LIMIT=m 
    369370CONFIG_IP6_NF_MATCH_OPTS=m 
    370371CONFIG_IP6_NF_MATCH_OWNER=m 
Note: See TracChangeset for help on using the changeset viewer.