Print this page
4526 nightly contains a great deal of effectively dead code

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/Install.sh
          +++ new/usr/src/tools/scripts/Install.sh
↓ open down ↓ 364 lines elided ↑ open up ↑
 365  365                  else
 366  366                          newdir="$dir/${OBJD}32"
 367  367                  fi
 368  368                  mkdir -p "$root/$newdir"
 369  369                  [ "$VERBOSE" = "V" ] && echo "mv $file $newdir"
 370  370                  mv "$root/$file" "$root/$newdir"
 371  371          done
 372  372  }
 373  373  
 374  374  #
 375      -# usage: fixcrypto listfile ctop
 376      -# Massage entries in listfile for crypto modules, so that they point
 377      -# into ctop.
 378      -#
 379      -function fixcrypto {
 380      -        typeset listfile=$1
 381      -        typeset ctop=$2
 382      -
 383      -        typeset ccontents=/tmp/crypto-toc$$
 384      -        find "$ctop" -type f -print > $ccontents
 385      -        typeset root=root_$MACH
 386      -        [ "$OBJD" = obj ] && root=root_$MACH-nd
 387      -
 388      -        grep -v ^MOD $listfile > $listfile.no-mod
 389      -        grep ^MOD $listfile | while read tag srcdir module targdir size impl; do
 390      -                #
 391      -                # We don't just grep for ${OBJD}$size/$module because
 392      -                # there can be generic and platform-dependent versions
 393      -                # of a module.
 394      -                #
 395      -                newsrcfile=$(grep -w $root/$targdir/${OBJD}$size/$module $ccontents)
 396      -                if [ -n "$newsrcfile" ]; then
 397      -                        # srcdir doesn't include final objNN or debugNN
 398      -                        echo $tag $module $targdir $size $impl \
 399      -                            $(dirname $(dirname "$newsrcfile"))
 400      -                else
 401      -                        echo $tag $module $targdir $size $impl $srcdir
 402      -                fi
 403      -        done > $listfile.mod
 404      -        cat $listfile.mod $listfile.no-mod > $listfile
 405      -
 406      -        rm -f $listfile.mod
 407      -        rm -f $listfile.no-mod
 408      -        rm -f $ccontents
 409      -}
 410      -
 411      -#
 412  375  # Copy a module, or create a link, as needed.
 413  376  #
 414      -
 415  377  function copymod {
 416  378          case $1 in
 417  379          MOD)
 418  380                  targdir=$INSTALL_FILES/$4
 419  381                  tstmkdir $targdir
 420  382                  target=$targdir/$3
 421  383                  verbose "$INSTALL_CP $2/${OBJD}$5/$3 $target"
 422  384                  $INSTALL_CP $2/${OBJD}$5/$3 $target || \
 423  385                      fail "can't create $target"
 424  386                  ;;
↓ open down ↓ 110 lines elided ↑ open up ↑
 535  497  
 536  498          #
 537  499          # Get a list of all modules, configuration files, and links
 538  500          # that we might want to install.
 539  501          #
 540  502          verbose "Building module list..."
 541  503          (cd $KARCH; MAKEFLAGS=e $make -K $MODSTATE modlist.karch) | \
 542  504              egrep "^MOD|^CONF|^LINK|^SYMLINK" > $modlist
 543  505          [ "$VERBOSE" = "V" ] && cat $modlist
 544  506          check_modlist $modlist
 545      -        if [ -n "$ON_CRYPTO_BINS" ]; then
 546      -                cryptotar="$ON_CRYPTO_BINS"
 547      -                if [ "$OBJD" = obj ]; then
 548      -                        isa=$(uname -p)
 549      -                        cryptotar=$(echo "$ON_CRYPTO_BINS" |
 550      -                            sed -e s/.$isa.tar.bz2/-nd.$isa.tar.bz2/)
 551      -                fi
 552      -                [ -f "$cryptotar" ] || fail "crypto ($cryptotar) doesn't exist"
 553      -                cryptotree=$(mktemp -d /tmp/crypto.XXXXXX)
 554      -                [ -n "$cryptotree" ] || fail "can't create tree for crypto"
 555      -                unpack_crypto "$cryptotar" "$cryptotree"
 556      -                #
 557      -                # fixcrypto must come before fixglom, because
 558      -                # fixcrypto uses the unglommed path to find things in
 559      -                # the unpacked crypto.
 560      -                #
 561      -                fixcrypto $modlist "$cryptotree"
 562      -        fi
 563  507          if [ "$GLOM" = "yes" ]; then
 564  508                  fixglom $modlist $GLOMNAME
 565  509                  filtimpl $modlist $IMPL
 566  510          fi
 567  511          if [[ -n "$files" && "$files" != All ]]; then
 568  512                  filtmod $modlist "$files"
 569  513          fi
 570  514  
 571  515          #
 572  516          # Copy modules and create links.  For architectures with both
↓ open down ↓ 152 lines elided ↑ open up ↑
 725  669          typeset destdir=
 726  670  
 727  671          platdir=$INSTALL_FILES/platform/$KARCH/$GLOMNAME
 728  672          if [[ $GLOM = "yes" ]] ; then
 729  673                  machdir=$platdir
 730  674          else
 731  675                  machdir=$INSTALL_FILES/kernel
 732  676          fi
 733  677  
 734  678          srctrees=$SRC
 735      -        if [ -z "$ON_CRYPTO_BINS" ]; then
 736      -                echo "Warning: ON_CRYPTO_BINS not set; pre-signed" \
 737      -                    "crypto not provided."
 738      -        fi
 739  679          if [[ $WANT64 = "yes" ]] ; then
 740  680                  # kmdbmod for sparc and x86 are built and installed
 741  681                  # in different places
 742  682                  if [[ $(mach) = "i386" ]] ; then
 743  683                          kmdbpath=$SRC/cmd/mdb/$isadir/$b64srcdir/kmdb/kmdbmod
 744  684                          destdir=$machdir/misc/$b64tgtdir
 745  685                  else
 746  686                          kmdbpath=$SRC/cmd/mdb/$KARCH/$b64srcdir/kmdb/kmdbmod
 747  687                          destdir=$platdir/misc/$b64tgtdir
 748  688                  fi
↓ open down ↓ 306 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX