Ignore:
Timestamp:
Nov 19, 2007, 1:13:50 PM (13 years ago)
Author:
Bruno Cornec
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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.