7 # Not sure what to put here
8 # TARGET_ARCH=$(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
13 TMPDIR=${TMPDIR:-"/var/tmp"}
24 # provided by target file
52 # build the lustre-tests rpm?
61 TOPDIR="${0%%${0##*/}}"
62 if [ "${TOPDIR}" ] ; then
63 TOPDIR=$(canon "${TOPDIR}/..")
71 while [ ! -d $retdir/BUILD ] ; do
72 retdir=$(canon "$retdir/..")
73 if [ "$retdir" = "/" ] ; then
89 [ "$2" ] && echo "${0##*/}: $2"
95 echo -n "Available targets:"
96 for target in $TOPDIR/lustre/kernel_patches/targets/*.target ; do
97 target_file=${target##*/}
98 echo -n " ${target_file%%.target}"
107 Usage: ${0##*/} [OPTION]... [-- <lustre configure options>]
112 same as --build-kernel --build-lustre --unpack-kernel
115 configure and compile lustre. Requires that --build-kernel was
119 configure and compile a kernel. Implies --depend-kernel.
120 Requires that --unpack-kernel was already run.
123 Prepares a kernel tree for building (similar to make mrproper
124 oldconfig dep). Requires that --unpack-kernel was already run.
127 Root directory to install into (like DESTDIR with auto*).
129 --extraversion=EXTRAVERSION
130 Overrides the target kernel\'s EXTRAVERSION text.
133 Display this message.
136 same as --install-kernel --install-lustre
139 run make install in the Lustre tree.
142 install the kernel image and modules.
145 This works just like the -j option to make, and is passed to make
148 --kerneldir=KERNELDIR
149 Directory containing linux source tarballs.
152 Name of the configuration to use. The available targets are
156 Specifies an architecture to use when choosing a kernel config
157 file. Default is i386.
159 --target-config=CONFIG
160 Specifies a special option (such as smp, bigsmp, bigmem, or BOOT)
161 to use when choosing a kernel config file. This also modifies the
162 kernel version and modules directory.
165 Untars and patches the kernel source.
168 Builds a Xen domX kernel.
170 The order that commands (--build-lustre, --unpack-kernel) are
171 specified on the command line is ignored; ${0##*/} will always
172 execute them in the correct order (unpack, then build, then install
183 (( $BUILD_LUSTRE || $BUILD_KERNEL || $DEPEND_KERNEL || \
184 $INSTALL_LUSTRE || $INSTALL_KERNEL || $SAVE_HEADERS || \
185 $UNPACK_KERNEL )) || \
186 fatal 1 "No commands specified."
188 if (( $UNPACK_KERNEL )) ; then
189 [ "$KERNELDIR" ] || \
190 fatal 1 "A kernel directory must be specified with --kerneldir."
191 [ -d "$KERNELDIR" ] || \
192 fatal 1 "$KERNELDIR is not a directory."
195 if (( $INSTALL_LUSTRE || $INSTALL_KERNEL || $SAVE_HEADERS )) ; then
196 [ -z "$DESTDIR" -o -d "$DESTDIR" ] || \
197 fatal 1 "$DESTDIR is not a directory."
200 [ "$TARGET" ] || usage 1 "A target must be specified with --target."
201 TARGET_FILE="$TOPDIR/lustre/kernel_patches/targets/$TARGET.target"
202 [ -r "$TARGET_FILE" ] || \
203 fatal 1 "Target '$TARGET' was not found. Try --list-targets."
205 if [ -z "$JOBS" -o "$JOBS" -lt "1" ] ; then
209 RPMBUILD=$(which rpmbuild 2>/dev/null | head -1)
210 if [ ! "$RPMBUILD" -o "$RPMBUILD" == "" ]; then
211 RPMBUILD=$(which rpm 2>/dev/null | head -1)
212 if [ ! "$RPMBUILD" -o "$RPMBUILD" == "" ]; then
213 usage 1 "Could not find binary for making rpms (tried rpmbuild and rpm)."
220 for series in $SERIES ; do
221 SERIES_FILE="$TOPDIR/lustre/kernel_patches/series/$series"
222 lustre_patch=$(grep lustre_version "$SERIES_FILE" 2>/dev/null)
223 [ "$lustre_patch" ] && break
225 [ "$lustre_patch" ] || \
226 fatal 1 "Could not determine Lustre version from $SERIES series."
228 awk '/^\+#define LUSTRE_KERNEL_VERSION /{ print $3 }' \
229 "$TOPDIR/lustre/kernel_patches/patches/$lustre_patch" 2>/dev/null
234 EXTRA_VERSION_save="$EXTRA_VERSION"
238 # doesn't make any sense to build OFED for xen domX's
243 [ "$KERNEL" ] || fatal 1 "Target $TARGET did not specify a kernel."
244 # Suse 2.6 has our patches in already
245 # [ "$SERIES" ] || fatal 1 "Target $TARGET did not specify a patch series."
246 # [ "$CONFIG" ] || fatal 1 "Target $TARGET did not specify a kernel config."
247 [ "$VERSION" ] || fatal 1 "Target $TARGET did not specify the kernel version."
249 if [ "$KERNELDIR" ] ; then
250 KERNEL_FILE="$KERNELDIR/$KERNEL"
251 [ -r "$KERNELDIR/$KERNEL" ] || \
252 fatal 1 "Target $TARGET's kernel file $KERNEL not found in kernel directory $KERNELDIR."
255 if [ "$SERIES" ] ; then
256 for series in $SERIES ; do
257 SERIES_FILE="$TOPDIR/lustre/kernel_patches/series/$series"
258 [ -r "$SERIES_FILE" ] || \
259 fatal 1 "Target $TARGET's series $SERIES missing from $TOPDIR/lustre/kernel_patches/series."
268 TARGET_ARCH=${TARGET_ARCH:-$BASE_ARCHS}
269 CONFIG_TARGET="${TARGET}${XENPOSTFIX}-${TARGET_ARCH}${TARGET_CONFIG:+-$TARGET_CONFIG}"
270 CONFIG_FILE="$TOPDIR/lustre/kernel_patches/kernel_configs/kernel-$VERSION-$CONFIG_TARGET.config"
271 [ -r "$CONFIG_FILE" ] ||
272 fatal 1 "Target $TARGET's config file $CONFIG_FILE missing from $TOPDIR/lustre/kernel_patches/configs."
274 if [ "$EXTRA_VERSION_save" ] ; then
275 EXTRA_VERSION="$EXTRA_VERSION_save"
277 EXTRA_VERSION="${EXTRA_VERSION}_lustre.$(get_lustre_version)"
281 # do these after load_target(), which maybe export CC
282 setup_ccache_distcc()
284 # distcc can't handle ".incbin"
285 if [ "$TARGET" == "2.6-suse" -o "$TARGET" == "2.6-rhel4" ]; then
286 if [ "$TARGET_ARCH" == "x86_64" ]; then
292 if [ "$CCACHE" ]; then
293 [[ $CC != ccache\ * ]] && CC="$CCACHE $CC"
294 [ "$DISTCC" ] && export CCACHE_PREFIX="$DISTCC"
296 [ "$DISTCC" ] && CC="$DISTCC $CC"
304 fatal 1 "tarflags(): File name argument missing."
316 fatal 1 "tarflags(): Unrecognized tar extension in file: $1"
323 echo "Untarring ${1##*/}..."
324 tar $(tarflags $1) $1
330 (( $UNPACK_KERNEL )) || return 0
331 pushd "$TOPDIR" >/dev/null
332 if [ -d linux ] ; then
333 [ -L linux ] && rm -rf $(readlink linux)
336 untar "$KERNEL_FILE" || fatal 1 "Error unpacking Linux tarball"
337 [ -d linux ] || ln -sf linux* linux
343 (( $UNPACK_KERNEL )) || return 0
344 [ "$SERIES" ] || return 0
345 pushd "$TOPDIR/linux" >/dev/null
346 for series in $SERIES ; do
347 echo -n "Applying series $series:"
348 SERIES_FILE="$TOPDIR/lustre/kernel_patches/series/$series"
349 for patch in $(<"$SERIES_FILE") ; do
350 PATCH_FILE="$TOPDIR/lustre/kernel_patches/patches/$patch"
351 [ -r "$PATCH_FILE" ] || \
352 fatal 1 "Patch file not found: $patch"
354 patch -s -p1 < "$PATCH_FILE" || fatal 1 "Error applying patch $patch."
365 if [ "$TARGET_ARCH" == "ppc64" ] ; then
366 MAKE_CC="CC=$CC -m64"
371 if [ "$ARCH" ] ; then
372 MAKE_ARCH="$MAKE ARCH=$ARCH"
378 MAKE_ARCH="$MAKE ARCH=$TARGET_ARCH"
382 MAKE_J="$MAKE -j $JOBS"
396 kill -TERM -$child_pid 2>/dev/null
398 kill -KILL -$child_pid 2>/dev/null
399 echo "$1 was killed due to timeout") &
403 # status will be set to 143 if the process had to be killed due to timeout
404 status=${PIPESTATUS[0]}
411 (( $DEPEND_KERNEL )) || return 0
412 # we need to override $CC at make time, since there is no
415 pushd "$TOPDIR/linux" >/dev/null
416 echo "Overriding EXTRAVERSION in kernel..."
417 local extra_version="${EXTRA_VERSION_DELIMITER}${EXTRA_VERSION}"
418 if [ -n "${TARGET_CONFIG}" ]; then
419 extra_version="${extra_version}${TARGET_DELIMITER}${TARGET_CONFIG}"
421 sed -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = ${extra_version}/" Makefile
422 echo "Making depend in $PWD..."
423 $MAKE "$MAKE_CC" mrproper || fatal 1 "Error running make mrproper"
425 # remove localversion-* files to avoid kernel release string
426 # srewing up by the top-level Makefile
428 cp "$CONFIG_FILE" .config
429 local UPDATE_OLDCONFIG=
430 for oc in oldconfig_nonint silentoldconfig oldconfig ; do
431 if grep -q "$oc" Makefile ; then
432 timed_run 300 $MAKE "$MAKE_CC" $oc || UPDATE_OLDCONFIG=1
437 if [ "$UPDATE_OLDCONFIG" ] ; then
438 # use the expect script to "make oldconfig" and answer the questions for
439 # new items conservatively. QA will get notified on anything newly added
440 # for them to review and adjust accordingly.
441 local logfile=$(mktemp /tmp/XXXXXX)
442 #timed_run 300 $TOPDIR/build/update_oldconfig $logfile
443 #local RC=${PIPESTATUS[0]}
444 #local RC=$(strace -f -o update_oldconfig.strace bash -c "$TOPDIR/build/update_oldconfig $logfile; echo \$?")
445 $TOPDIR/build/update_oldconfig $logfile
446 local RC=${PIPESTATUS[0]}
447 #$TOPDIR/build/update_oldconfig $logfile
448 #local RC=${PIPESTATUS[0]}
449 if [ $RC -eq 143 ]; then
450 fatal 1 "update_oldconfig timed out"
451 elif [ $RC -ne 0 ]; then
455 if [ -f update_oldconfig.strace ]; then
456 cat update_oldconfig.strace
457 rm -f update_oldconfig.strace
459 fatal 1 "update_oldconfig failed: $RC. See log above."
463 # now notify if resulting .config is different than $CONFIG_FILE
464 local tmpfile=$(mktemp /tmp/XXXXXX)
465 diff -I '^#.*' -u "$CONFIG_FILE" .config >$tmpfile
466 if [ -s $tmpfile ]; then
468 To: lustre-qa-team@sun.com
469 Subject: kernel_config change
471 The result of a make oldconfig on file $CONFIG_FILE resulted in a
472 difference when compared to .config in the following way:
476 echo -e "\n\nPlease consider updating $CONFIG_FILE for version: $extra_version."
477 # not sure these are entirely useful. the above and "patch" are good
478 #echo -e "\nThe entire new .config file:\n"
480 # sadly, the build roots can't e-mail out, so we can only display this
481 # to stderr for an interested party to inspect
482 #} | sendmail -flustre-qa-team@sun.com -t
489 $MAKE "$MAKE_CC" include/asm
492 $MAKE "$MAKE_CC" symlinks
493 $MAKE "$MAKE_CC" dep || fatal 1 "Error running make dep"
496 $MAKE "$MAKE_CC" include/linux/version.h || fatal 1 "Error making include/linux/version.h"
501 (( $BUILD_KERNEL )) || return 0
503 echo "Building kernel in $PWD..."
505 $MAKE_J "$MAKE_CC" vmlinuz || fatal 1 "Error making vmlinux."
507 case "$TARGET_ARCH" in
508 i386 | i586 | i686 | athlon | x86_64)
509 $MAKE_J "$MAKE_CC" bzImage || fatal 1 "Error making bzImage."
512 $MAKE_J "$MAKE_CC" vmlinux || fatal 1 "Error making vmlinux."
515 $MAKE_J "$MAKE_CC" boot || fatal 1 "Error making boot."
519 $MAKE_J "$MAKE_CC" modules || fatal 1 "Error building modules."
526 (( $BUILD_KERNEL )) || return 0
527 # build kernel-ib{,-devel}
528 # some I/B drivers are architecture dependent and kernel-ib's configure
529 # does not figure it out for us ~sigh~
530 local configure_options=""
531 case "$TARGET_ARCH" in
533 configure_options="--with-ipath_inf-mod"
536 configure_options="--with-ipath_inf-mod --with-ehca-mod"
540 # ofed 1.3 had a bug in the rpm spec
541 if [ "$OFED_VERSION" = "1.3" ]; then
544 if ! $RPMBUILD --rebuild --define 'build_kernel_ib 1' --define 'build_kernel_ib_devel 1' \
545 --define "_topdir $(lbuild_topdir)" --target ${TARGET_ARCH} \
546 --define "KVERSION ${FULL_VERSION}" \
547 --define "$K_SRC ${PWD}/linux" \
548 --define "LIB_MOD_DIR /lib/modules/${FULL_VERSION}" \
549 --define "configure_options --without-quilt --with-core-mod --with-user_mad-mod --with-user_access-mod --with-addr_trans-mod --with-srp-target-mod --with-core-mod --with-mthca-mod --with-mlx4-mod --with-cxgb3-mod --with-nes-mod --with-ipoib-mod --with-sdp-mod --with-srp-mod --with-rds-mod --with-iser-mod --with-qlgc_vnic-mod --with-madeye-mod $configure_options" $(lbuild_topdir)/OFED/SRPMS/ofa_kernel-*.src.rpm 2>&1; then
550 fatal 1 "Error building kernel-ib"
553 pushd "$TOPDIR" >/dev/null
554 rm -rf kernel-ib-devel
555 mkdir kernel-ib-devel
557 local rpm=$(ls $(lbuild_topdir)/RPMS/*/kernel-ib-devel-*-${FULL_VERSION//-/_}.*.rpm)
558 rpm2cpio -itv < $rpm | cpio -id
559 CONFIGURE_FLAGS="--with-o2ib=$(pwd)/usr/src/ofa_kernel ${CONFIGURE_FLAGS}"
567 (( $BUILD_LUSTRE )) || return 0
568 pushd "$TOPDIR" >/dev/null
569 [ -f Makefile ] && make -s clean
570 [ -f configure ] || sh ./autogen.sh
571 ./configure --with-linux=$PWD/linux $CONFIGURE_FLAGS || \
572 fatal 1 "Error configuring Lustre."
578 (( $BUILD_LUSTRE )) || return 0
580 pushd "$TOPDIR" >/dev/null
582 -e s^@VERSION@^${LUSTRE_VERSION}^g \
583 -e s^@LINUXRELEASE@^${FULL_VERSION}^g \
584 -e s^@RELEASE@^${FULL_VERSION//-/_}^g \
587 # convert the $LUSTRE_TESTS boolean to an empty/not-empty boolean
588 # as silly as this seems, it makes the syntax of the rpmbuild command
589 # simpler and not need an eval to deal with the quotes in the quotes
590 # ditto for the lustre-tests boolean
591 local lustre_tests=""
592 if ! $LUSTRE_TESTS; then
596 $RPMBUILD --target ${TARGET_ARCH} -bb lustre.spec \
597 --define "configure_args --with-linux=${PWD}/linux ${CONFIGURE_FLAGS}" \
598 ${lustre_tests:+--define "build_lustre_tests 0"} \
599 --define "_tmppath $TMPDIR" \
600 --define "_topdir $(lbuild_topdir)" 2>&1 || \
601 fatal 1 "Error building Lustre rpms."
602 # $MAKE_J "$MAKE_CC" || fatal 1 "Error building Lustre."
608 (( $INSTALL_KERNEL )) || return 0
610 pushd "$TOPDIR/linux" >/dev/null
611 mkdir -p "$DESTDIR/boot"
613 install -m 644 System.map "$DESTDIR/boot/System.map-${FULL_VERSION}"
614 # install -m 644 module-info ...
615 install -m 644 "$CONFIG_FILE" "$DESTDIR/boot/config-${FULL_VERSION}"
617 mkdir -p "$DESTDIR/dev/shm"
618 mkdir -p "$DESTDIR/lib/modules/${FULL_VERSION}"
620 $MAKE "$MAKE_CC" INSTALL_MOD_PATH="$DESTDIR" KERNELRELEASE="$FULL_VERSION" \
621 -s modules_install || \
622 fatal 1 "Error installing modules."
625 cp vmlinuz "$DESTDIR/boot/vmlinuz-${FULL_VERSION}"
626 cp vmlinux "$DESTDIR/lib/modules/${FULL_VERSION}/vmlinux-${FULL_VERSION}"
627 ln -sf "../lib/modules/${FULL_VERSION}/vmlinux-${FULL_VERSION}" "$DESTDIR/boot/vmlinux-${FULL_VERSION}"
629 case "$TARGET_ARCH" in
630 i386 | i586 | i686 | athlon)
631 cp arch/i386/boot/bzImage "$DESTDIR/boot/vmlinuz-${FULL_VERSION}"
632 cp vmlinux "$DESTDIR/lib/modules/${FULL_VERSION}/"
633 ln -sf "../lib/modules/${FULL_VERSION}/vmlinux" "$DESTDIR/boot/vmlinux-${FULL_VERSION}"
636 cp arch/x86_64/boot/bzImage "$DESTDIR/boot/vmlinuz-${FULL_VERSION}"
637 cp vmlinux "$DESTDIR/lib/modules/${FULL_VERSION}/"
638 ln -sf "../lib/modules/${FULL_VERSION}/vmlinux" "$DESTDIR/boot/vmlinux-${FULL_VERSION}"
641 cp vmlinux "$DESTDIR/boot/vmlinux-${FULL_VERSION}"
642 ln -sf "$DESTDIR/boot/vmlinux-${FULL_VERSION}" "../lib/modules/${FULL_VERSION}/vmlinux"
645 gzip -cfv vmlinux > vmlinuz
646 mkdir -p "$DESTDIR/boot/efi/redhat"
647 install -m 755 vmlinux "$DESTDIR/lib/modules/${FULL_VERSION}/"
648 install -m 755 vmlinuz "$DESTDIR/boot/efi/redhat/vmlinuz-${FULL_VERSION}"
649 ln -sf "../../../lib/modules/${FULL_VERSION}/vmlinux" "$DESTDIR/boot/efi/redhat/vmlinux-${FULL_VERSION}"
650 ln -sf "efi/redhat/vmlinux-${FULL_VERSION}" "$DESTDIR/boot/vmlinux-${FULL_VERSION}"
651 ln -sf "efi/redhat/vmlinuz-${FULL_VERSION}" "$DESTDIR/boot/vmlinuz-${FULL_VERSION}"
654 cp vmlinuz "$DESTDIR/boot/vmlinuz-${FULL_VERSION}"
655 cp vmlinux "$DESTDIR/lib/modules/${FULL_VERSION}/vmlinux-${FULL_VERSION}"
656 ln -sf "../lib/modules/${FULL_VERSION}/vmlinux-${FULL_VERSION}" "$DESTDIR/boot/vmlinux-${FULL_VERSION}"
660 if [ -e init/kerntypes.o ] ; then
661 cp init/kerntypes.o "$DESTDIR/boot/Kerntypes-${FULL_VERSION}"
669 (( $INSTALL_LUSTRE )) || return 0
671 KVERREL="${VERSION}${EXTRA_VERSION_DELIMITER}${EXTRA_VERSION}"
672 i="$DESTDIR/lib/modules/${FULL_VERSION}"
677 if (( $LINUX26 )) ; then
678 ln -sf ../../../usr/src/linux-${KVERREL}-obj/${TARGET_ARCH}/${TARGET_CONFIG} $i/build
679 ln -sf ../../../usr/src/linux-${KVERREL} $i/source
681 ln -sf ../../../usr/src/linux-${KVERREL} $i/build
687 (( $INSTALL_LUSTRE )) || return 0
690 pushd "$TOPDIR" >/dev/null
691 $MAKE "$MAKE_CC" -s install "DESTDIR=$DESTDIR" KERNELRELEASE="$FULL_VERSION" || fatal 1 "Error installing Lustre."
697 (( $BUILD_KERNEL )) || return 0
698 (( $SUSEBUILD )) || return 0
700 mkdir -p "${TOPDIR}/modules-${FULL_VERSION}"
701 for dir in /usr/src/kernel-modules/* ; do
702 # we are replacing lustre-lite, so don't include it
703 if [ "${dir##*/}" != "lustre-lite" -a -e $dir/Makefile ]; then
704 build_dir="${TOPDIR}/modules-${FULL_VERSION}/${dir##*/}"
705 cp -a $dir $build_dir
706 # these modules are terrible, and don't all build
707 $MAKE_J "$MAKE_CC" -C $build_dir modules KERNEL_SOURCE="${TOPDIR}/linux"
714 local file=$1 name=${1%.ko}
716 | sed -ne 's,^0*\([0-9a-f]\{8\}\) A __crc_\(.*\),0x\1\t\2\t'"$name"',p'
721 (( $INSTALL_KERNEL )) || return 0
722 (( $LINUX26 )) || return 0
724 for build_dir in "${TOPDIR}/modules-${FULL_VERSION}/*" ; do
725 [ -d $build_dir ] || continue
726 # these modules are terrible, and don't all build
727 $MAKE "$MAKE_CC" -C $build_dir KERNEL_SOURCE="${TOPDIR}/linux" INSTALL_MOD_PATH="$DESTDIR"
729 local symvers_file="${DESTDIR}/boot/symvers-${VERSION}${EXTRA_VERSION_DELIMITER}${EXTRA_VERSION}-${TARGET_ARCH}"
730 if [ -n "$TARGET_CONFIG" ]; then
731 symvers_file="${symvers_file}${TARGET_DELIMITER}${TARGET_CONFIG}"
733 symvers_file="$symvers_file.gz"
735 moddir="${DESTDIR}/lib/modules/${FULL_VERSION}"
737 for module in $(find * -name '*.ko'); do
741 for module in $(find * -path 'kernel/*' -prune -o \
742 -name '*.ko' -print); do
745 ) | sort -u -k2 | gzip -c9 > $symvers_file
750 (( $SAVE_HEADERS )) || return 0
752 echo "Saving headers for ${TARGET_CONFIG:-up} ${TARGET_ARCH}..."
753 pushd linux >/dev/null
755 KVERREL="${VERSION}${EXTRA_VERSION_DELIMITER}${EXTRA_VERSION}"
756 # deal with the kernel headers that are version specific
758 saveddir="$RPM_BUILD_ROOT/usr/src/linux-${KVERREL}/savedheaders/${TARGET_ARCH}/${TARGET_CONFIG:-up}"
760 install -m 644 include/linux/autoconf.h "$saveddir/autoconf.h"
761 install -m 644 include/linux/version.h "$saveddir/version.h"
762 mv include/linux/modules "$saveddir/"
763 echo ${TARGET_ARCH} ${TARGET_CONFIG} ../../savedheaders/${TARGET_ARCH}/${TARGET_CONFIG:-up}/ \
764 >> "$RPM_BUILD_ROOT/usr/src/linux-${KVERREL}/savedheaders/list"
770 (( $SAVE_HEADERS )) || return 0
772 for arch in $BIGMEM_ARCHS ; do
773 save_headers bigmem $arch
776 for arch in $BOOT_ARCHS ; do
777 save_headers BOOT $arch
780 for arch in $JENSEN_ARCHS ; do
781 save_headers jensen $arch
784 for arch in $SMP_ARCHS ; do
785 save_headers smp $arch
788 for arch in $BIGSMP_ARCHS ; do
789 save_headers bigsmp $arch
791 for arch in $PSERIES64_ARCHS ; do
792 save_headers pseries64 $arch
794 for arch in $UP_ARCHS ; do
795 save_headers up $arch
799 longopts="build,build-lustre,build-kernel,depend-kernel,destdir:,extraversion:"
800 longopts="$longopts,help,install,install-lustre,install-kernel,kerneldir:"
801 longopts="$longopts,save-headers,target:,target-arch:,target-config:,unpack-kernel,xen"
803 options=$(getopt -o hj: -l "$longopts" -- "$@")
805 eval set -- "$options"
890 # there are actually some lustre configure flags that we need to
891 # handle ourselves (but we still give them to configure)
892 if [[ \ $@\ == *\ --disable-tests\ * ]]; then
899 usage 1 "Unrecognized option: $1"
906 EXTRA_VERSION_DELIMITER=${EXTRA_VERSION_DELIMITER:-"-"}
907 FULL_VERSION="${VERSION}${EXTRA_VERSION_DELIMITER}${EXTRA_VERSION}"
908 if [ -n "$TARGET_CONFIG" ]; then
909 FULL_VERSION="${FULL_VERSION}${TARGET_DELIMITER}${TARGET_CONFIG}"
919 if [ -n "$OFED_VERSION" ]; then
920 if [ "$OFED_VERSION" = "inkernel" ]; then
921 CONFIGURE_FLAGS="--with-o2ib=yes ${CONFIGURE_FLAGS}"