Skip to content
Snippets Groups Projects
Commit 581eef04 authored by jacob's avatar jacob
Browse files

Merge in external patches support

parent f74d12ae
No related branches found
No related tags found
No related merge requests found
...@@ -182,7 +182,11 @@ check_options() ...@@ -182,7 +182,11 @@ check_options()
get_lustre_version() get_lustre_version()
{ {
lustre_patch=$(grep lustre_version "$SERIES_FILE" 2>/dev/null) for series in $SERIES ; do
SERIES_FILE="$TOPDIR/lustre/kernel_patches/series/$series"
lustre_patch=$(grep lustre_version "$SERIES_FILE" 2>/dev/null)
[ "$lustre_patch" ] && break
done
[ "$lustre_patch" ] || \ [ "$lustre_patch" ] || \
fatal 1 "Could not determine Lustre version from $SERIES series." fatal 1 "Could not determine Lustre version from $SERIES series."
...@@ -208,10 +212,12 @@ load_target() ...@@ -208,10 +212,12 @@ load_target()
fatal 1 "Target $TARGET's kernel file $KERNEL not found in kernel directory $KERNELDIR." fatal 1 "Target $TARGET's kernel file $KERNEL not found in kernel directory $KERNELDIR."
fi fi
if [ "$SERIES" ]; then if [ "$SERIES" ] ; then
SERIES_FILE="$TOPDIR/lustre/kernel_patches/series/$SERIES" for series in $SERIES ; do
[ -r "$SERIES_FILE" ] || \ SERIES_FILE="$TOPDIR/lustre/kernel_patches/series/$series"
fatal 1 "Target $TARGET's series $SERIES missing from $TOPDIR/lustre/kernel_patches/series." [ -r "$SERIES_FILE" ] || \
fatal 1 "Target $TARGET's series $SERIES missing from $TOPDIR/lustre/kernel_patches/series."
done
fi fi
TARGET_ARCH=${TARGET_ARCH:-$BASE_ARCHS} TARGET_ARCH=${TARGET_ARCH:-$BASE_ARCHS}
...@@ -270,15 +276,18 @@ patch_kernel() ...@@ -270,15 +276,18 @@ patch_kernel()
(( $UNPACK_KERNEL )) || return 0 (( $UNPACK_KERNEL )) || return 0
[ "$SERIES" ] || return 0 [ "$SERIES" ] || return 0
pushd "$TOPDIR/linux" >/dev/null pushd "$TOPDIR/linux" >/dev/null
echo -n "Applying patch" for series in $SERIES ; do
for patch in $(<"$SERIES_FILE") ; do echo -n "Applying series $series:"
PATCH_FILE="$TOPDIR/lustre/kernel_patches/patches/$patch" SERIES_FILE="$TOPDIR/lustre/kernel_patches/series/$series"
[ -r "$PATCH_FILE" ] || \ for patch in $(<"$SERIES_FILE") ; do
fatal 1 "Patch file not found: $patch" PATCH_FILE="$TOPDIR/lustre/kernel_patches/patches/$patch"
echo -n " $patch" [ -r "$PATCH_FILE" ] || \
patch -s -p1 < "$PATCH_FILE" || fatal 1 "Error applying patch $patch." fatal 1 "Patch file not found: $patch"
echo -n " $patch"
patch -s -p1 < "$PATCH_FILE" || fatal 1 "Error applying patch $patch."
done
echo
done done
echo
popd >/dev/null popd >/dev/null
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment