From 8061834dbe8a14d4fedf2203605e07eff562f7fe Mon Sep 17 00:00:00 2001 From: Minh Diep Date: Mon, 7 Jul 2014 09:10:43 -0700 Subject: [PATCH] LU-5022 build: enable building redhat 7 lustre client Create series, target file, and lbuild-rhel7 Signed-off-by: Minh Diep Change-Id: Ifb04bc0b5b64d1b533cab8f0bd23a02f754352fa Reviewed-on: http://review.whamcloud.com/10708 Reviewed-by: Bob Glossman Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- contrib/lbuild/funcs.sh | 1 + contrib/lbuild/lbuild | 3 +++ contrib/lbuild/lbuild-rhel7 | 16 +++++++++++++ lustre/autoconf/lustre-core.m4 | 1 + lustre/kernel_patches/series/3.10-rhel7.series | 4 ++++ lustre/kernel_patches/targets/3.10-rhel7.target.in | 26 ++++++++++++++++++++++ 6 files changed, 51 insertions(+) create mode 100644 contrib/lbuild/lbuild-rhel7 create mode 100644 lustre/kernel_patches/series/3.10-rhel7.series create mode 100644 lustre/kernel_patches/targets/3.10-rhel7.target.in diff --git a/contrib/lbuild/funcs.sh b/contrib/lbuild/funcs.sh index 7627dc2..1f6726c 100644 --- a/contrib/lbuild/funcs.sh +++ b/contrib/lbuild/funcs.sh @@ -179,6 +179,7 @@ autodetect_target() { oel5) target="2.6-oel5";; rhel5) target="2.6-rhel5";; rhel6) target="2.6-rhel6";; + rhel7) target="3.10-rhel7";; sles10) target="2.6-sles10";; sles11) target="$(uname -r | cut -d . -f 1,2)-sles11" local PLEV=$(sed -n -e 's/^PATCHLEVEL = //p' /etc/SuSE-release) diff --git a/contrib/lbuild/lbuild b/contrib/lbuild/lbuild index 8c24402..8a18607 100755 --- a/contrib/lbuild/lbuild +++ b/contrib/lbuild/lbuild @@ -282,6 +282,9 @@ check_options() { fi case $TARGET in + 3.10-rhel7) + CANONICAL_TARGET="rhel7" + ;; 2.6-rhel6) CANONICAL_TARGET="rhel6" ;; diff --git a/contrib/lbuild/lbuild-rhel7 b/contrib/lbuild/lbuild-rhel7 new file mode 100644 index 0000000..e0e951a --- /dev/null +++ b/contrib/lbuild/lbuild-rhel7 @@ -0,0 +1,16 @@ +# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4: + +source ${LBUILD_DIR}/lbuild-rhel + +# increment this if you have made a change that should force a new kernel +# to build built +BUILD_GEN+=".0" + +find_linux_rpm-rhel7() { + local prefix="$1" + local wanted_kernel="$2" + local pathtorpms=${3:-"${KERNELRPMSBASE}/${lnxmaj}/${DISTRO}/${TARGET_ARCH}"} + + find_linux_rpm-rhel "$prefix" "$wanted_kernel" "$pathtorpms" + +} diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index b8be8cf..8e12090 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1926,6 +1926,7 @@ lustre/include/lustre_ver.h lustre/include/linux/Makefile lustre/include/darwin/Makefile lustre/include/lustre/Makefile +lustre/kernel_patches/targets/3.10-rhel7.target lustre/kernel_patches/targets/2.6-rhel6.target lustre/kernel_patches/targets/2.6-rhel5.target lustre/kernel_patches/targets/2.6-sles11.target diff --git a/lustre/kernel_patches/series/3.10-rhel7.series b/lustre/kernel_patches/series/3.10-rhel7.series new file mode 100644 index 0000000..387a2dd --- /dev/null +++ b/lustre/kernel_patches/series/3.10-rhel7.series @@ -0,0 +1,4 @@ +raid5-mmp-unplug-dev-3.7.patch +dev_read_only-3.7.patch +blkdev_tunables-3.7.patch +bh_lru_size_config.patch diff --git a/lustre/kernel_patches/targets/3.10-rhel7.target.in b/lustre/kernel_patches/targets/3.10-rhel7.target.in new file mode 100644 index 0000000..bd022b0 --- /dev/null +++ b/lustre/kernel_patches/targets/3.10-rhel7.target.in @@ -0,0 +1,26 @@ +lnxmaj="3.10.0" +lnxrel="123.4.2.el7" + +KERNEL_SRPM=kernel-${lnxmaj}-${lnxrel}.src.rpm +SERIES=3.10-rhel7.series +EXTRA_VERSION=${lnxrel}_lustre.@VERSION@ +LUSTRE_VERSION=@VERSION@ + +DEVEL_PATH_ARCH_DELIMETER="." +OFED_VERSION=inkernel + +BASE_ARCHS="i686 x86_64 ia64 ppc64" +BIGMEM_ARCHS="" +BOOT_ARCHS="" +JENSEN_ARCHS="" +#SMP_ARCHS="i686 x86_64 ia64 ppc64" +# RHEL5 doesn't use smp specific kernels +SMP_ARCHS="" +UP_ARCHS="" + +for cc in gcc ; do + if which $cc >/dev/null 2>/dev/null ; then + export CC=$cc + break + fi +done -- 1.8.3.1