Whamcloud - gitweb
Lustre support needed to be able to build a 2.6 patchless kernel. This
[fs/lustre-release.git] / build / lbuild
index 598cb68..450236d 100755 (executable)
@@ -215,7 +215,8 @@ check_options()
             | suse-2.4.21-2 \
             | rh-2.4 \
             | rhel-2.4 \
-            | sles-2.4)
+            | sles-2.4 \
+            | 2.6-patchless)
                 CANONICAL_TARGET="$TARGET"
                 ;;
     esac
@@ -570,8 +571,7 @@ build_lustre()
     ./configure "--with-linux=${LINUX}" ${CONFIGURE_FLAGS}
 
     $RPMBUILD $targets -bb build/lustre.spec \
-        --define "_topdir $TOPDIR" \
-        --define "configure_flags --with-linux=${LINUX}" || \
+        --define "_topdir $TOPDIR" || \
         fatal 1 "Error building rpms for $BUILD_ARCHS."
 
     popd >/dev/null
@@ -697,40 +697,17 @@ unpack_lustre
 # prep_build needs the .spec.in from the lustre source
 if [ -z "$LINUX" ] ; then
     load_target
-
-    if [ "$SERIES" ] ; then
-        if (( $DO_SRC )) ; then
-            unpack_linux
-            patch_linux
-            pack_linux
-            clean_linux
-        fi
-
-        prep_kernel_build
-        clean_lustre
-
-        build_kernel
-    else
-        # can't build a kernel if we have no series for it (i.e. patchless)
-        # but we still need the headers
+    if (( $DO_SRC )) ; then
         unpack_linux
-        LINUX=$(pwd)/linux
-        pushd $LINUX && {
-            # need a .config -- like a user would do
-            BOOTCONFIG="/boot/config-${lnxmaj}-${lnxrel}smp"
-            if [ -f $BOOTCONFIG ]; then
-                cp $BOOTCONFIG .config
-            else
-                fatal 1 "$BOOTCONFIG doesn't exist!  Help!"                
-            fi
-            make oldconfig
-            make include/asm
-            make include/linux/version.h
-            make SUBDIRS=scripts
-        }
-        popd
-        build_lustre
+        patch_linux
+        pack_linux
+        clean_linux
     fi
+
+    prep_kernel_build
+    clean_lustre
+
+    build_kernel
 else
     build_lustre
 fi