From 85a965777fb7e16f047efc93d759d9ceddb2c079 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Mon, 23 Feb 2009 10:33:58 +0000 Subject: [PATCH] Branch b1_6 b=18289 i=yangsheng, wangyb Enable the rhel5 in-kernel OFED. --- build/lbuild | 19 ++++++++++++------- build/lmake | 4 ++++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/build/lbuild b/build/lbuild index 02a2b80..2d008a0 100755 --- a/build/lbuild +++ b/build/lbuild @@ -439,7 +439,7 @@ load_target() fi fi fi - if [ -n "$OFED_VERSION" ] && \ + if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ] && \ [ ! -r "$KERNELTREE/../OFED-${OFED_VERSION}.tgz" ] ; then if (( $DOWNLOAD )) ; then local location="http://downloads.lustre.org/public/OFED/" @@ -967,7 +967,7 @@ store_for_reuse() dstdir="${dstdir%.rpm}" [ -d "$dstdir" ] && rm -rf "$dstdir" mv "${builddir}" "$dstdir" || return 255 - if [ -n "$OFED_VERSION" ]; then + if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ]; then # move the OFED kernel-ib-devel tree as well mv "${builddir%/*}/kernel-ib-devel/usr/src/ofa_kernel" "${dstdir%/*}" || return 255 fi @@ -990,7 +990,7 @@ store_for_reuse() else [ -f "RPMS/${TARGET_ARCH}/${kernelrpmname}" ] && cp -f "RPMS/${TARGET_ARCH}/${kernelrpmname}" "${REUSEBUILD}/${TIMESTAMP}/" fi - if [ -n "$OFED_VERSION" ]; then + if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ]; then # store kernel-ib RPMs local rpmname for rpmname in "kernel-ib" "kernel-ib-devel"; do @@ -1359,7 +1359,7 @@ patchless_build_sequence() [ -d SOURCES ] || mkdir SOURCES # first build kernel-ib - if [ -n "$OFED_VERSION" ]; then + if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ]; then $rpmfound && build_kernel_ib fi ( $rpmfound ) && build_lustre && buildsuccess=true && find_linux_source_rpm @@ -1494,7 +1494,8 @@ build_sequence_reuse() local reusedkernelsourcerpm= local reusedkernelibrpm= [ -d "$curdir" ] || continue - [ -n "$OFED_VERSION" -a ! -d "${curdir%/*}/ofa_kernel" ] && continue + [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" -a + ! -d "${curdir%/*}/ofa_kernel" ] && continue local reusedkernelprefix="kernel-lustre-" ( $PATCHLESS ) && reusedkernelprefix= [ -f ${curdir}/../${reusedkernelprefix}${REUSEDKERNELMASK}.rpm ] && \ @@ -1502,7 +1503,7 @@ build_sequence_reuse() reusedkernelprefix="kernel-lustre-source-" [ -f ${curdir}/../${reusedkernelprefix}${REUSEDKERNELMASKnew}.rpm ] && \ reusedkernelsourcerpm=$(ls ${curdir}/../${reusedkernelprefix}${REUSEDKERNELMASKnew}.rpm | head -1 ) - if [ -n "$OFED_VERSION" ]; then + if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ]; then gen_lustre_version reusedkernelprefix="kernel-ib-" [ -f ${curdir}/../${reusedkernelprefix}${OFED_VERSION}-${LUSTRE_EXTRA_VERSION}.${TARGET_ARCH}.rpm ] && \ @@ -1516,10 +1517,14 @@ build_sequence_reuse() continue fi if [ -n "$OFED_VERSION" ]; then + if [ "$OFED_VERSION" != "inkernel" ]; then if ! ( $NORPM ) && [ ! -f "$reusedkernelibrpm" -o ! -f "$reusedkernelibdevelrpm"]; then #kernel-ib{,-devel} rpm not found. Build all continue fi CONFIGURE_FLAGS="--with-o2ib=${curdir%/*}/ofa_kernel ${CONFIGURE_FLAGS}" + else + CONFIGURE_FLAGS="--with-o2ib=yes ${CONFIGURE_FLAGS}" + fi fi LINUX="$curdir" build_lustre || continue @@ -1700,7 +1705,7 @@ unpack_lustre load_target EXTRA_VERSION_DELIMITER=${EXTRA_VERSION_DELIMITER:-"-"} -if [ -n "$OFED_VERSION" ]; then +if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ]; then unpack_ofed fi diff --git a/build/lmake b/build/lmake index b917687..c9b22ea 100755 --- a/build/lmake +++ b/build/lmake @@ -874,7 +874,11 @@ depend_kernel build_kernel if [ -n "$OFED_VERSION" ]; then + if [ "$OFED_VERSION" = "inkernel" ]; then + CONFIGURE_FLAGS="--with-o2ib=yes ${CONFIGURE_FLAGS}" + else build_kernel_ib + fi fi configure_lustre -- 1.8.3.1