Print this page
Support for PREBUILT_ILLUMOS, and optional /tmp/debug.$$ output.

Split Close
Expand all
Collapse all
          --- old/build/illumos-kvm/build.sh
          +++ new/build/illumos-kvm/build.sh
↓ open down ↓ 28 lines elided ↑ open up ↑
  29   29  
  30   30  # First we build the kernel module
  31   31  PROG=illumos-kvm
  32   32  # This is pretty meaningless, and should be "0.5.11" but we messed that up
  33   33  # by starting with "1.0.x" so this'll do.  There should be no need to change
  34   34  # this going forward.
  35   35  VER=1.0.5.11
  36   36  # Default to building tip, but site.sh can force a specific commit checkout.
  37   37  COMMIT=$KVM_ROLLBACK
  38   38  SRC_REPO=https://github.com/joyent/illumos-kvm.git
  39      -KERNEL_SOURCE=/code/omnios-$RELVER/illumos-omnios
       39 +if [ -d ${PREBUILT_ILLUMOS:-/dev/null} ]; then
       40 +    logmsg "Using pre-built Illumos at $PREBUILT_ILLUMOS (may need to wait...)"
       41 +    wait_for_prebuilt
       42 +    KERNEL_SOURCE=$PREBUILT_ILLUMOS
       43 +else
       44 +    KERNEL_SOURCE=/code/omnios-$RELVER/illumos-omnios
       45 +fi
  40   46  PROTO_AREA=$KERNEL_SOURCE/proto/root_i386
  41   47  PATCHDIR=patches.$PROG
  42   48  PKG=driver/virtualization/kvm
  43   49  SUMMARY="placeholder; reset below"
  44   50  DESC="$SUMMARY"
  45   51  
  46   52  # These are the dependencies for both the module and the cmds
  47   53  BUILD_DEPENDS_IPS="archiver/gnu-tar developer/gcc47 developer/versioning/git file/gnu-coreutils"
  48   54  
  49   55  # Only 64-bit matters
↓ open down ↓ 51 lines elided ↑ open up ↑
 101  107  SUMMARY="Illumos KVM kernel driver ($PROG ${COMMIT:0:10})"
 102  108  DESC="KVM is the kernel virtual machine, a framework for the in-kernel acceleration of QEMU."
 103  109  make_package kvm.mog
 104  110  clean_up
 105  111  
 106  112  # Next, the utilities (they follow the kernel module version)
 107  113  PROG=illumos-kvm-cmd
 108  114  # Default to building tip, but site.sh can force a specific commit checkout.
 109  115  COMMIT=$KVM_CMD_ROLLBACK
 110  116  SRC_REPO=https://github.com/joyent/illumos-kvm-cmd.git
 111      -KERNEL_SOURCE=/code/omnios-$RELVER/illumos-omnios
      117 +if [ -d $PREBUILT_ILLUMOS:-/dev/null ]; then
      118 +    logmsg "Using pre-built Illumos at $PREBUILT_ILLUMOS (may need to wait...)"
      119 +    wait_for_prebuilt
      120 +    KERNEL_SOURCE=$PREBUILT_ILLUMOS
      121 +else
      122 +    KERNEL_SOURCE=/code/omnios-$RELVER/illumos-omnios
      123 +fi
 112  124  KVM_DIR=$TMPDIR/illumos-kvm-$VER
 113  125  PATCHDIR=patches.$PROG
 114  126  PKG=system/kvm
 115  127  
 116  128  # Reset a couple of important things
 117  129  BUILDDIR=$PROG-$VER  # This must be explicitly reset from the run above
 118  130  PREFIX=/usr
 119  131  
 120  132  # Only 64-bit matters
 121  133  BUILDARCH=64
↓ open down ↓ 32 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX