16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 # If applicable, add the following below this CDDL HEADER, with the
18 # fields enclosed by brackets "[]" replaced with your own identifying
19 # information: Portions Copyright [yyyy] [name of copyright owner]
20 #
21 # CDDL HEADER END
22 #
23 #
24 # Copyright 2011-2012 OmniTI Computer Consulting, Inc. All rights reserved.
25 # Use is subject to license terms.
26 #
27 # Load support functions
28 . ../../lib/functions.sh
29
30 # First we build the kernel module
31 PROG=illumos-kvm
32 # This is pretty meaningless, and should be "0.5.11" but we messed that up
33 # by starting with "1.0.x" so this'll do. There should be no need to change
34 # this going forward.
35 VER=1.0.5.11
36 # Default to building tip, but if needed, specify the desired commit here
37 COMMIT=
38 SRC_REPO=https://github.com/joyent/illumos-kvm.git
39 KERNEL_SOURCE=/code/omnios-$RELVER/illumos-omnios
40 PROTO_AREA=$KERNEL_SOURCE/proto/root_i386
41 PATCHDIR=patches.$PROG
42 PKG=driver/virtualization/kvm
43 SUMMARY="placeholder; reset below"
44 DESC="$SUMMARY"
45
46 # These are the dependencies for both the module and the cmds
47 BUILD_DEPENDS_IPS="archiver/gnu-tar developer/gcc47 developer/versioning/git file/gnu-coreutils"
48
49 # Only 64-bit matters
50 BUILDARCH=64
51
52 # Unset the prefix because we actually DO want things in kernel etc
53 PREFIX=""
54
55 download_source() {
56 logmsg "Obtaining source files"
57 if [[ -d $TMPDIR/$BUILDDIR ]]; then
88 logerr "--- failed to copy CDDL from kernel sources"
89 }
90 fix_drivers() {
91 logcmd mv $DESTDIR/usr/kernel $DESTDIR/ || \
92 logerr "--- couldn't move kernel bits into /"
93 }
94
95 init
96 download_source
97 patch_source
98 prep_build
99 build
100 fix_drivers
101 SUMMARY="Illumos KVM kernel driver ($PROG ${COMMIT:0:10})"
102 DESC="KVM is the kernel virtual machine, a framework for the in-kernel acceleration of QEMU."
103 make_package kvm.mog
104 clean_up
105
106 # Next, the utilities (they follow the kernel module version)
107 PROG=illumos-kvm-cmd
108 # Default to building tip, but if needed, specify the desired commit here
109 COMMIT=
110 SRC_REPO=https://github.com/joyent/illumos-kvm-cmd.git
111 KERNEL_SOURCE=/code/omnios-$RELVER/illumos-omnios
112 KVM_DIR=$TMPDIR/illumos-kvm-$VER
113 PATCHDIR=patches.$PROG
114 PKG=system/kvm
115
116 # Reset a couple of important things
117 BUILDDIR=$PROG-$VER # This must be explicitly reset from the run above
118 PREFIX=/usr
119
120 # Only 64-bit matters
121 BUILDARCH=64
122
123 # Borrowed from Joyent's build.sh within the source
124 # so we can find ctfconvert during 'make install'
125 CTFBINDIR="$KERNEL_SOURCE"/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386
126 export CTFBINDIR
127 export PATH="$PATH:$CTFBINDIR"
128
129 make_prog() {
|
16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 # If applicable, add the following below this CDDL HEADER, with the
18 # fields enclosed by brackets "[]" replaced with your own identifying
19 # information: Portions Copyright [yyyy] [name of copyright owner]
20 #
21 # CDDL HEADER END
22 #
23 #
24 # Copyright 2011-2012 OmniTI Computer Consulting, Inc. All rights reserved.
25 # Use is subject to license terms.
26 #
27 # Load support functions
28 . ../../lib/functions.sh
29
30 # First we build the kernel module
31 PROG=illumos-kvm
32 # This is pretty meaningless, and should be "0.5.11" but we messed that up
33 # by starting with "1.0.x" so this'll do. There should be no need to change
34 # this going forward.
35 VER=1.0.5.11
36 # Default to building tip, but site.sh can force a specific commit checkout.
37 COMMIT=$KVM_ROLLBACK
38 SRC_REPO=https://github.com/joyent/illumos-kvm.git
39 KERNEL_SOURCE=/code/omnios-$RELVER/illumos-omnios
40 PROTO_AREA=$KERNEL_SOURCE/proto/root_i386
41 PATCHDIR=patches.$PROG
42 PKG=driver/virtualization/kvm
43 SUMMARY="placeholder; reset below"
44 DESC="$SUMMARY"
45
46 # These are the dependencies for both the module and the cmds
47 BUILD_DEPENDS_IPS="archiver/gnu-tar developer/gcc47 developer/versioning/git file/gnu-coreutils"
48
49 # Only 64-bit matters
50 BUILDARCH=64
51
52 # Unset the prefix because we actually DO want things in kernel etc
53 PREFIX=""
54
55 download_source() {
56 logmsg "Obtaining source files"
57 if [[ -d $TMPDIR/$BUILDDIR ]]; then
88 logerr "--- failed to copy CDDL from kernel sources"
89 }
90 fix_drivers() {
91 logcmd mv $DESTDIR/usr/kernel $DESTDIR/ || \
92 logerr "--- couldn't move kernel bits into /"
93 }
94
95 init
96 download_source
97 patch_source
98 prep_build
99 build
100 fix_drivers
101 SUMMARY="Illumos KVM kernel driver ($PROG ${COMMIT:0:10})"
102 DESC="KVM is the kernel virtual machine, a framework for the in-kernel acceleration of QEMU."
103 make_package kvm.mog
104 clean_up
105
106 # Next, the utilities (they follow the kernel module version)
107 PROG=illumos-kvm-cmd
108 # Default to building tip, but site.sh can force a specific commit checkout.
109 COMMIT=$KVM_CMD_ROLLBACK
110 SRC_REPO=https://github.com/joyent/illumos-kvm-cmd.git
111 KERNEL_SOURCE=/code/omnios-$RELVER/illumos-omnios
112 KVM_DIR=$TMPDIR/illumos-kvm-$VER
113 PATCHDIR=patches.$PROG
114 PKG=system/kvm
115
116 # Reset a couple of important things
117 BUILDDIR=$PROG-$VER # This must be explicitly reset from the run above
118 PREFIX=/usr
119
120 # Only 64-bit matters
121 BUILDARCH=64
122
123 # Borrowed from Joyent's build.sh within the source
124 # so we can find ctfconvert during 'make install'
125 CTFBINDIR="$KERNEL_SOURCE"/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386
126 export CTFBINDIR
127 export PATH="$PATH:$CTFBINDIR"
128
129 make_prog() {
|