Print this page
4108 remove ON_CRYPTO_BINS from tools

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/Install.sh
          +++ new/usr/src/tools/scripts/Install.sh
↓ open down ↓ 328 lines elided ↑ open up ↑
 329  329          }
 330  330          $1 == "LINK" {
 331  331                  if (modmatch($4))
 332  332                          print
 333  333          }
 334  334          ' $1 > $1.new
 335  335          mv $1.new $1
 336  336  }
 337  337  
 338  338  #
 339      -# Unpack the crypto tarball into the given tree, then massage the
 340      -# tree so that the binaries are all in objNN or debugNN directories.
 341      -#
 342      -function unpack_crypto {
 343      -        typeset tarfile=$1
 344      -        typeset ctop=$2
 345      -        [ -d "$ctop" ] || fail "Can't create tree for crypto modules."
 346      -
 347      -        [ "$VERBOSE" = "V" ] && echo "unpacking crypto tarball into $ctop..."
 348      -        bzcat "$tarfile" | (cd "$ctop"; tar xf -)
 349      -
 350      -        typeset root="$ctop/proto/root_$MACH"
 351      -        [ $OBJD = obj ] && root="$ctop/proto/root_$MACH-nd"
 352      -        [ -d "$root" ] || fail "Can't unpack crypto tarball."
 353      -
 354      -        (cd "$root"; for d in platform kernel usr/kernel; do
 355      -                [ ! -d $d ] && continue
 356      -                find $d -type f -print
 357      -        done) | while read file; do
 358      -                typeset dir=$(dirname "$file")
 359      -                typeset base=$(basename "$file")
 360      -                typeset type=$(basename "$dir")
 361      -                if [ "$type" = amd64 ]; then
 362      -                        newdir="$dir/${OBJD}64"
 363      -                elif [ "$type" = sparcv9 ]; then
 364      -                        newdir="$dir/${OBJD}64"
 365      -                else
 366      -                        newdir="$dir/${OBJD}32"
 367      -                fi
 368      -                mkdir -p "$root/$newdir"
 369      -                [ "$VERBOSE" = "V" ] && echo "mv $file $newdir"
 370      -                mv "$root/$file" "$root/$newdir"
 371      -        done
 372      -}
 373      -
 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  339  # Copy a module, or create a link, as needed.
 413  340  #
 414  341  
 415  342  function copymod {
 416  343          case $1 in
 417  344          MOD)
 418  345                  targdir=$INSTALL_FILES/$4
 419  346                  tstmkdir $targdir
 420  347                  target=$targdir/$3
 421  348                  verbose "$INSTALL_CP $2/${OBJD}$5/$3 $target"
↓ open down ↓ 113 lines elided ↑ open up ↑
 535  462  
 536  463          #
 537  464          # Get a list of all modules, configuration files, and links
 538  465          # that we might want to install.
 539  466          #
 540  467          verbose "Building module list..."
 541  468          (cd $KARCH; MAKEFLAGS=e $make -K $MODSTATE modlist.karch) | \
 542  469              egrep "^MOD|^CONF|^LINK|^SYMLINK" > $modlist
 543  470          [ "$VERBOSE" = "V" ] && cat $modlist
 544  471          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  472          if [ "$GLOM" = "yes" ]; then
 564  473                  fixglom $modlist $GLOMNAME
 565  474                  filtimpl $modlist $IMPL
 566  475          fi
 567  476          if [[ -n "$files" && "$files" != All ]]; then
 568  477                  filtmod $modlist "$files"
 569  478          fi
 570  479  
 571  480          #
 572  481          # Copy modules and create links.  For architectures with both
↓ open down ↓ 154 lines elided ↑ open up ↑
 727  636          platdir=$INSTALL_FILES/platform/$KARCH/$GLOMNAME
 728  637          if [[ $GLOM = "yes" ]] ; then
 729  638                  machdir=$platdir
 730  639          else
 731  640                  machdir=$INSTALL_FILES/kernel
 732  641          fi
 733  642  
 734  643          srctrees=$SRC
 735  644          if [[ -d $SRC/../closed && "$CLOSED_IS_PRESENT" != no ]]; then
 736  645                  srctrees="$srctrees $SRC/../closed"
 737      -        else
 738      -                if [ -z "$ON_CRYPTO_BINS" ]; then
 739      -                        echo "Warning: ON_CRYPTO_BINS not set; pre-signed" \
 740      -                            "crypto not provided."
 741      -                fi
 742  646          fi
 743  647          if [[ $WANT64 = "yes" ]] ; then
 744  648                  # kmdbmod for sparc and x86 are built and installed
 745  649                  # in different places
 746  650                  if [[ $(mach) = "i386" ]] ; then
 747  651                          kmdbpath=$SRC/cmd/mdb/$isadir/$b64srcdir/kmdb/kmdbmod
 748  652                          destdir=$machdir/misc/$b64tgtdir
 749  653                  else
 750  654                          kmdbpath=$SRC/cmd/mdb/$KARCH/$b64srcdir/kmdb/kmdbmod
 751  655                          destdir=$platdir/misc/$b64tgtdir
↓ open down ↓ 113 lines elided ↑ open up ↑
 865  769  $TARGET_MACHINE using 'tar xvf $TARGET_DIR/Install.tar'"
 866  770          STATE=4
 867  771  }
 868  772  
 869  773  function okexit {
 870  774          cd /tmp
 871  775          test "$CLEANUP" = c && remove_dir $INSTALL_DIR
 872  776          save_state
 873  777          rm -rf $modstatedir
 874  778          rm -f $modlist
 875      -        [ -n "$cryptotree" ] && rm -rf "$cryptotree"
 876  779          verbose "Install complete"
 877  780          exit 0
 878  781  }
 879  782  
 880  783  #
 881  784  # Process options
 882  785  #
 883  786  
 884  787  RCOPTS=""
 885  788  LIBCREATE="no"
↓ open down ↓ 173 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX