Changeset 1815


Ignore:
Timestamp:
Nov 19, 2007, 1:13:50 PM (12 years ago)
Author:
bruno
Message:
  • Increase BOOT_SIZE and EXTRA_SIZE to support features such as HW recovery
  • Handles udev.files files which could be symlinks
  • Improve udev support for distro with compressed modules (mdv e.g.)
  • Fix modules.dep copy
  • /sbin/pam_console_apply is needed by mdv udev conf
  • Adds support for nohw boot option to avoid re-setuping the HW conf
Location:
branches/2.2.5/mindi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi/README.bkphw

    r1761 r1815  
    2727echo /usr/local/lib >> /etc/ld.so.conf
    2828ldconfig
    29 perl -pi -e 's~^HOME=.*~HOME="/usr/local/bin"~' /usr/local/bin/cpqacuxe
    30 sed -i -e '/LD_LIBRARY_PATH/d' /usr/local/bin/cpqacuxe
    31 
    32 You also may have to remove the LD_ASSUME_KERNEL line in that script.
    3329
    3430You're now ready to check your configuration by running mindi-bkphw.
  • branches/2.2.5/mindi/mindi

    r1810 r1815  
    4040TMPDIR=/tmp
    4141
    42 EXTRA_SPACE=24576         ; # increase if you run out of ramdisk space
    43 BOOT_SIZE=8192       ;      # size of the boot disk
     42EXTRA_SPACE=32768         ; # increase if you run out of ramdisk space
     43BOOT_SIZE=16384       ;      # size of the boot disk
    4444MAX_DISKS=99
    4545WRITE_BOOT_FLOPPIES="yes" ; # do you want to be propted to write floppy images
     
    665665    fi
    666666    modpaths=`find $1 -name $2.*o -type f`
    667     [ "$?" -ne "0" ] && Die "find $1 -name $2.o -type f --- failed"
     667    #[ "$?" -ne "0" ] && Die "find $1 -name $2.o -type f --- failed"
    668668    [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.o.gz -type f`
    669669    [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.ko.gz -type f`
     
    28302830            lis=""
    28312831            # Get only the files which exist in that list
     2832            # and potentially their symlink structure
    28322833            for i in $lis2; do
    2833                 if [ -f $i ]; then
     2834                if [ -h $i ]; then
     2835                    j=$i
     2836                    while [ -h $j ]; do
     2837                        lis="$lis $j"
     2838                        j=`readlink $j`
     2839                    done
     2840                    lis="$lis $j"
     2841                elif [ -f $i ]; then
    28342842                    lis="$lis $i"
    28352843                fi
     
    29302938        echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE
    29312939        cp --parents -pdf $i $mountpoint 2>/dev/null || LogIt "Unable to copy $i to $mountpoint"
    2932         if [ "`echo "$i" | grep -F ".gz"`" ]; then
     2940        # Uncompress modules if not useing udev and native modprobe
     2941        if [ ! -f $mountpoint/tmp/USE-UDEV ]; then
     2942            if [ "`echo "$i" | grep -F ".gz"`" ]; then
    29332943                gunzip -f $mountpoint/$i
    2934                 i=`echo $i | sed 's/.gz//'`
    2935         fi
    2936         [ "`echo "$i" | grep -F ".gz"`" ] && gunzip -f $mountpoint/`basename $i`
    2937     done
     2944                #i=`echo $i | sed 's/.gz//'`
     2945            fi
     2946        fi
     2947    done
     2948
     2949    # Also copy modules.dep in case of udev so that normal modprobe works
     2950    cp --parents -pdf /$floppy_modules_path/modules.dep $mountpoint 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
     2951
    29382952    # For all modules supported, create symlinks under the mountpoint
    29392953    for i in $EXTRA_MODS $NET_MODS $SCSI_MODS; do
    2940         all_modules="$all_modules `FindSpecificModuleInPath $floppy_modules_path $i`"
     2954        all_modules="$all_modules `FindSpecificModuleInPath $mountpoint $i`"
    29412955    done
    29422956    for i in $all_modules; do
     2957        j=`echo $i | sed 's~^$mountpoint/~~'`
    29432958        (cd $mountpoint ; ln -s $i . 2>/dev/null)
    29442959    done
    2945     # Also copy modules.dep in case of udev so that normal modprobe works
    2946     p=`echo $i | cut -d/ -f1-3`
    2947     cp -df $p/modules.dep $mountpoint/$p 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
    29482960    if [ ! -e "/sbin/devfsd" ] || [ "$disksize" -lt "2880" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then
    29492961        echo "Deleting devfsd daemon from ramdisk" >> $LOGFILE
     
    32733285        export MONDO_SHARE=""
    32743286        MindiExit $?
     3287    elif [ "$1" = "--readalllink" ] ; then
     3288        [ ! "$2" ] && Die "Please specify the binary to look at"
     3289        ReadAllLink $2
     3290        # Avoids logfile content for mondo
     3291        export MONDO_SHARE=""
     3292        MindiExit $?
    32753293    elif [ "$1" = "--makemountlist" ] ; then
    32763294        [ ! "$2" ] && Die "Please specify the output file"
     
    34943512                LogIt "WARNING - failed to create 2.88MB floppy disk image."
    34953513                LogIt "Please reduce your kernel's size if you want to make a 2.88MB floppy disk."
    3496                 PrepareBootDiskImage_SYSLINUX $CACHE_LOC $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create 5.76MB floppy disk image."
     3514                PrepareBootDiskImage_SYSLINUX $CACHE_LOC $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create $BOOT_SIZE kB floppy disk image."
    34973515            fi
    34983516        fi
  • branches/2.2.5/mindi/rootfs/sbin/init

    r1813 r1815  
    196196#   Load the VIA IDE module first thing if it exists (requires ide-core).
    197197#   This is to ensure that DMA is working for VIA chipsets with 2.6 kernels.
    198     for module in /ide-core.ko /via82cxxx.ko; do
     198    for module in /ide-core.ko* /via82cxxx.ko*; do
    199199        [ -f "$module" ] && MyInsmod $module > /dev/null 2> /dev/null
    200200    done
     
    315315    answer="NO"
    316316
     317    grep -q nohw /proc/cmdline
     318    if [ "$?" -eq 0 ]; then
     319        return
     320    fi
    317321    if [ -x ./mindi-rsthw ]; then
    318322        grep -q RESTORE /proc/cmdline
    319323        if [ "$?" -ne 0 ]; then
    320             clear
     324            #clear
    321325            echo "*********************************************************************"
    322326            echo "Do you want to restore the HW configuration of the original machine ?"
     
    362366[ -d /proc/bus/usb ] && ! grep -q /proc/bus/usb /proc/mounts && mount -t usbfs none /proc/bus/usb
    363367if [ -e "/tmp/USE-UDEV" ] ; then
    364     if [ -f usbhid.ko ]; then
     368    if [ -f usbhid.ko || -f usbhid.ko.gz ]; then
    365369        modprobe -q usbhid
    366370    fi
    367     if [ -f uhcd_hci.ko ]; then
     371    if [ -f uhcd_hci.ko || -f uhcd_hci.ko.gz ]; then
    368372        modprobe -q uhcd_hci
    369373    fi
    370374else
    371375    if [ -f uhcd_hci.ko ]; then
    372         insmod uhcd_hci.ko
     376        insmod uhcd_hci.ko*
    373377    fi
    374378    if [ -f usbhid.ko ]; then
    375         insmod usbcore.ko
    376         insmod usbhid.ko
     379        insmod usbcore.ko*
     380        insmod usbhid.ko*
    377381    fi
    378382fi
     
    538542ModprobeAllModules() {
    539543
    540     for m in *.ko; do
    541         j=`echo $m | sed 's/\.ko$//'`
    542         if [ -e $j ]; then
    543             modprobe -q $j
    544         fi
     544    for m in *.ko*; do
     545        j=`echo $m | sed 's/\.ko.*$//'`
     546        modprobe -q $j
    545547    done
    546548}
  • branches/2.2.5/mindi/udev.files

    r1789 r1815  
    1313/sbin/udevcontrol
    1414/sbin/udevtrigger
     15/sbin/pam_console_apply
Note: See TracChangeset for help on using the changeset viewer.