Changeset 3310 for branches/3.2


Ignore:
Timestamp:
Jul 3, 2014, 10:24:14 PM (5 years ago)
Author:
bruno
Message:
  • Remove EXTRA_MODS variable as it was leading to modules missing at restore time. Now part of CDROM_MODS and were anyway loaded 99% of the time.
  • Optimize modules list computation between mindi and restore init script.
  • As a consequence do not try to relaod modules list twice as there is not difference in modules list anymore, eveything is in the boot part.
Location:
branches/3.2/mindi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3304 r3310  
    7171USB_MODS="usb-storage usb_storage usb-ohci usb-uhci input hid uhci_hcd uhci-hcd ehci-hcd ehci-pci ohci-hcd ohci_hcd ohci-pci xhci xhci-hcd usbkbd usbhid keybdev mousedev scsi_mod ff-memless ums_cypress ums-cypress cp210x usbserial"
    7272NET_MODS="nfs nfsv2 nfsv3 nfsv4 nfsd loop mii 3c59x e100 bcm5700 cnic be2net bnx2 bnx2x bnx2i mdio e1000 e1000e igb dca eepro100 ne2k-pci tg3 pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmxnet3 vmnet exportfs fuse netbk xenblktap r8169 virtio_net via_rhine ipv6 ptp"
    73 CDROM_MODS="$TAPE_MODS $IDE_MODS $USB_MODS $PCMCIA_MODS $SCSI_MODS $NET_MODS cdrom isocd isofs sg sr_mod iso9660 vfat fat"
    74 # Those modules will only go on the backup media, not the boot media.
    75 EXTRA_MODS="$CDROM_MODS loop md-mod lvm-mod dm-mod dm_mod dm-multipath dm-emc dm-hp-sw dm-rdac dm-region-hash multipath jfs xfs btrfs reiserfs ext2 ext3 minix nfs nfsd ext4 ocfs2 configfs vxfs "
     73CDROM_MODS="$TAPE_MODS $IDE_MODS $USB_MODS $PCMCIA_MODS $SCSI_MODS $NET_MODS cdrom isocd isofs sg sr_mod iso9660 vfat fat loop md-mod lvm-mod dm-mod dm_mod dm-multipath dm-emc dm-hp-sw dm-rdac dm-region-hash multipath jfs xfs btrfs reiserfs ext2 ext3 minix nfs nfsd ext4 ocfs2 configfs vxfs "
    7674# Replace with that line for HP OCMP e.g.
    7775#DENY_MODS="MPS_Driver_Mapper mps octtldrv tscttl streams kqemu fdomain"
     
    818816    for i in $DENY_MODS; do
    819817        module_list=`echo ${module_list} | tr ' ' '\n' | grep -Ev "^${i}$" | tr '\n' ' '`
    820         EXTRA_MODS=`echo ${EXTRA_MODS} | tr ' ' '\n' | grep -Ev "^${i}$" | tr '\n' ' '`
    821818    done
    822819###
     
    833830### Sq-Mod End
    834831###
    835     # Get rid of duplicates, so that if a live kernel module also appears
    836     # in $EXTRA_MODS that it won't get reported as "live module file not found" twice.
    837     for module in `echo $module_list $EXTRA_MODS | tr ' ' '\n' | sort -u` ; do
     832    # Get rid of duplicates
     833    for module in `echo $module_list | tr ' ' '\n' | sort -u` ; do
    838834        r=`find /lib/modules/$kern -type f | grep "/${module}\..*o" | tail -n1`
    839835        if [ -z "$r" ]; then
     
    26312627        list_of_groovy_mods="$list_of_groovy_mods $NET_MODS"
    26322628    fi
    2633     if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ "$USBDEVICE" != "" ]; then
    2634         list_of_groovy_mods="$list_of_groovy_mods $EXTRA_MODS"
    2635     fi
    26362629    for i in $DENY_MODS; do
    26372630        LogFile "INFO: Removing $i from the list of modules to load"
     
    27232716        echo -en "$LAST_FILELIST_NUMBER" > $mountpoint/tmp/LAST-FILELIST-NUMBER
    27242717    fi
     2718
     2719    # Create module list to load at restore time
     2720    rm -f $mountpoint/tmp/modules
     2721    for m in $CDROM_MODS; do
     2722        echo $m >> $mountpoint/tmp/modules
     2723    done
     2724
    27252725    mkdir -p $mountpoint/proc
    27262726    LogFile "---------------------------"
     
    30183018$FDISK -l >> $LOGFILE
    30193019LogFile "----------------"
    3020 LogFile "List of extra modules is:"
    3021 LogFile "$EXTRA_MODS"
    3022 LogFile "-------------"
    30233020
    30243021# Compute libata version
  • branches/3.2/mindi/rootfs/etc/init.d/rcS

    r3305 r3310  
    795795
    796796    echo "Searching for modules to install..."
    797     lismod=`find /lib/modules -name '*\.ko*' -o -name '*\.o*'`
     797    if [ ! -e /tmp/modules ]; then
     798        LogIt "Unable to find the modules list. Computing one. This may take some time..."
     799        lismod=`find /lib/modules -name '*\.ko*' -o -name '*\.o*'`
     800        for m in $lismod; do
     801            k=`basename $m | sed 's/\.ko.*$//'`
     802            j=`basename $k | sed 's/\.o.*$//'`
     803            echo "$j" >> /tmp/modules
     804        done
     805    fi
    798806    # loading forced modules first
    799     for m in $lismod; do
    800         k=`basename $m | sed 's/\.ko.*$//'`
    801         j=`basename $k | sed 's/\.o.*$//'`
     807    for j in `cat /tmp/modules`; do
    802808        echo "$FORCE_MODS" | grep -q "$j "
    803809        if [ $? -eq 0 ]; then
     
    806812        fi
    807813    done
    808     for m in $lismod; do
    809         k=`basename $m | sed 's/\.ko.*$//'`
    810         j=`basename $k | sed 's/\.o.*$//'`
     814    for j in `cat /tmp/modules`; do
    811815        echo "$DENY_MODS" | grep -q "$j "
    812816        if [ $? -eq 0 ]; then
     
    855859    # BCO: test return value
    856860    install-additional-tools
    857     # Keep the kernel silent again
    858     PKLVL=`cut -f1 /proc/sys/kernel/printk`
    859     echo 0 > /proc/sys/kernel/printk
    860     ModprobeAllModules
    861     echo $PKLVL > /proc/sys/kernel/printk
    862861
    863862    # Retry failed udev events now that local filesystems are mounted read-write
     
    882881export PATH GROOVY USER LOGFILE ARCH
    883882
    884 mount -o remount rw /
     883mount -o remount,rw /
    885884rm -f $LOGFILE
    886885
Note: See TracChangeset for help on using the changeset viewer.