Changeset 1718


Ignore:
Timestamp:
Oct 28, 2007, 11:18:13 AM (12 years ago)
Author:
bruno
Message:
  • Still working on udev support in mindi
    • auto creation of the right links at boot time with udev-links.conf(from Mandriva 2008.0)
    • rework startup of udev as current makes kernel crash (from Mandriva 2008.0)
    • add support for 64 bits udev
  • Try to render MyInsmod? silent at boot time
Location:
branches/2.2.5/mindi
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi/mindi

    r1716 r1718  
    27682768        echo "udev device manager found" > tmp/USE-UDEV
    27692769        cp --parents -Rdf /etc/udev . 2> /dev/null
    2770         cp --parents -Rdf /lib/udev . 2> /dev/null
     2770        cp --parents -Rdf /lib/udev /lib64/udev . 2> /dev/null
    27712771    fi
    27722772    for w in cdrom floppy groovy-stuff ; do
  • branches/2.2.5/mindi/rootfs/sbin/init

    r1717 r1718  
    252252}
    253253
     254# Taken from udev management in Mandriva 2008.0. Kudos guys
     255make_extra_nodes () {
     256    # there are a few things that sysfs does not export for us.
     257    # these things are listed in /etc/udev/links.conf
     258    grep '^[^#]' /etc/udev-links.conf | \
     259    while read type name arg1; do
     260        [ "$type" -a "$name" -a ! -e "/dev/$name" -a ! -L "/dev/$name" ] ||continue
     261        case "$type" in
     262            L) ln -s $arg1 /dev/$name ;;
     263            D) mkdir -p /dev/$name ;;
     264            M) mknod --mode=600 /dev/$name $arg1 ;;
     265            *) gprintf "udev-links.conf: unparseable line (%s %s %s)\n" "$type" "$name" "$arg1" ;;
     266        esac
     267    done
     268}
     269
     270
    254271RunUdevd() {
    255     # Inspiration from LFS docs
    256     mkdir -p /lib/udev/devices &&
    257     mknod -m0666 /lib/udev/devices/null c 1 3
    258     ln -sf /proc/self/fd /lib/udev/devices/fd &&
    259     ln -sf /proc/self/fd/0 /lib/udev/devices/stdin &&
    260     ln -sf /proc/self/fd/1 /lib/udev/devices/stdout &&
    261     ln -sf /proc/self/fd/2 /lib/udev/devices/stderr &&
    262     ln -sf /proc/kcore /lib/udev/devices/core &&
    263     mkdir -p /lib/udev/devices/{pts,shm}
    264     cp -R /lib/udev/devices/* /dev
     272    # Inspiration from Mandriva 2008.0 startup script
     273    echo "Preparing udev environment..."
     274    mv /dev /dev.static
     275    mkdir /dev
     276    mount -n -o size=5M,mode=0755 -t tmpfs none /dev
     277    make_extra_nodes
     278    mount -n -t devpts -o mode=620 none /dev/pts
     279    mount -n -t tmpfs  none /dev/shm
    265280    udevd --daemon
    266281}
    267 
    268 
    269282
    270283
     
    448461    install-additional-tools
    449462    echo "Inserting modules ..."
     463    # Keep the kernel silent again
     464    PKLVL=`cut -f1 /proc/sys/kernel/printk`
     465    echo 0 > /proc/sys/kernel/printk
    450466    insert-all-my-modules >> $LOGFILE 2>> $LOGFILE
     467    echo $PKLVL > /proc/sys/kernel/printk
    451468}
    452469
     
    480497    RunUdevd
    481498fi
    482 echo "Starting potential Raid/LVMs ..."
    483499ExtractDevTarballs
    484500LaunchTerminals
     501
     502# Keeping kernel silent  for module insertion
     503PKLVL=`cut -f1 /proc/sys/kernel/printk`
     504echo 0 > /proc/sys/kernel/printk
    485505InsertEssentialModules
     506echo $PKLVL > /proc/sys/kernel/printk
     507
    486508EnableCcissIfAppropriate
    487509#-------------------------------
Note: See TracChangeset for help on using the changeset viewer.