* We need to build Mellanox KMP to avoid error
in symbol dependency when installing lustre
* Remove all Mellanox config parameters and use
default
* We won't build with rhel6
Test-Parameters: trivial
Change-Id: I4676d01bd5f788581e1be6df98d2d787a5419c07
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/32833
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/32913
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
# build kernel-ib{,-devel}/compat-rdma{,-devel}
local K_SRC="K_SRC"
# build kernel-ib{,-devel}/compat-rdma{,-devel}
local K_SRC="K_SRC"
+ local KMP=${MOFED_KMP:-"1"}
local OFED_CORE="--with-core-mod --with-ipoib-mod --with-user_mad-mod \
local OFED_CORE="--with-core-mod --with-ipoib-mod --with-user_mad-mod \
- --with-user_access-mod --with-addr_trans-mod --with-madeye-mod"
- local OFED_HARDWARE="--with-mthca-mod --with-mlx4-mod \
- --with-mlx4_en-mod --with-cxgb3-mod --with-mlx4_en-mod \
- --with-cxgb3-mod --with-nes-mod --with-mlx5-mod --with-cxgb4-mod \
- --with-qib-mod"
-
- # Removing the check for older version support
- #if compare_version $OFED_VERSION 3.0; then
- #OFED_CORE="$OFED_CORE --with-madeye-mod --with-rds-mod"
- #else
- #OFED_HARDWARE="$OFED_HARDWARE --with-mlx5-mod --with-cxgb4-mod --with-ocrdma-mod --with-qib-mod"
- #fi
+ --with-user_access-mod --with-addr_trans-mod --with-innova-flex "
+ local OFED_HARDWARE="--with-mlx4-mod --with-mlx4_en-mod \
+ --with-srp-mod --with-iser-mod --with-isert-mod --with-mlx5-mod \
+ --with-mlxfw-mod "
# some I/B drivers are architecture dependent and kernel-ib's configure
# does not figure it out for us ~sigh~
# some I/B drivers are architecture dependent and kernel-ib's configure
# does not figure it out for us ~sigh~
OFED_HARDWARE="$OFED_HARDWARE --with-ehca-mod"
;;
esac
OFED_HARDWARE="$OFED_HARDWARE --with-ehca-mod"
;;
esac
- # we're no longer shipping the OFED iSCSI target
- #OFED_ISCSI="--with-srp-mod --with-srp-target-mod"
- OFED_ISCSI="--with-srp-mod"
- ## ISER module has no backport support as of OFED 1.5 (i.e. only builds on
- ##kernels >= 2.6.30)
- #if [[ $OFED_VERSION = 1.[0-4]* ]]; then
- # OFED_ISCSI="$OFED_ISCSI --with-iser-mod"
- #fi
# assume we are just rebuilding the SRPM
local BUILD_TYPE=${BUILD_TYPE:-"--rebuild"}
# assume we are just rebuilding the SRPM
local BUILD_TYPE=${BUILD_TYPE:-"--rebuild"}
${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \
--define "_topdir ${TOPDIR}" --target ${TARGET_ARCH} \
--define "KVERSION ${linuxrelease}" \
${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \
--define "_topdir ${TOPDIR}" --target ${TARGET_ARCH} \
--define "KVERSION ${linuxrelease}" \
+ --define "KMP ${KMP}" \
--define "$K_SRC ${linux}" \
${OFA_KERNEL_RELEASE:+--define "_release $OFA_KERNEL_RELEASE"} \
--define "$K_SRC ${linux}" \
${OFA_KERNEL_RELEASE:+--define "_release $OFA_KERNEL_RELEASE"} \
- --define "configure_options --without-quilt $OFED_CORE $OFED_HARDWARE $OFED_ISCSI" \
${SOURCE} 2>&1; then
fatal 1 "Error building ${kib_rpm}"
fi
# now that we have the kernel rpms, we need to lib rpms too
# we don't have to rebuild since MOFED include the binaries
${SOURCE} 2>&1; then
fatal 1 "Error building ${kib_rpm}"
fi
# now that we have the kernel rpms, we need to lib rpms too
# we don't have to rebuild since MOFED include the binaries
- cp -f OFED_RPMS/{libibmad-*,libibverbs-*,libibumad-*,librdmacm*,ibutils-*,opensm-libs*}.${TARGET_ARCH}.rpm \
+ cp -f OFED_RPMS/{libibmad-*,libibverbs-*,libibumad-*,librdmacm*,ibutils-*,opensm-*}.${TARGET_ARCH}.rpm \
${TOPDIR}/RPMS/${TARGET_ARCH} || \
fatal 1 "Failed to copy MOFED rpms"
;;
${TOPDIR}/RPMS/${TARGET_ARCH} || \
fatal 1 "Failed to copy MOFED rpms"
;;
SPEC_NAME="kernel.spec"
DEVEL_PATH_ARCH_DELIMETER="."
USE_KABI=true
SPEC_NAME="kernel.spec"
DEVEL_PATH_ARCH_DELIMETER="."
USE_KABI=true
patch_spec() {
local buildid="$1"
patch_spec() {
local buildid="$1"
SPEC_NAME="kernel.spec"
DEVEL_PATH_ARCH_DELIMETER="."
USE_KABI=false
SPEC_NAME="kernel.spec"
DEVEL_PATH_ARCH_DELIMETER="."
USE_KABI=false
# force local definition of %dist into ~/.rpmmacros
# to avoid verbose extended strings like ".el7.centos"
# force local definition of %dist into ~/.rpmmacros
# to avoid verbose extended strings like ".el7.centos"
cp $RHEL_KMODTOOL $LBUILD_KMODTOOL
pushd ${LBUILD_DIR}/rhel7
patch -p1 < kmodtool.patch
cp $RHEL_KMODTOOL $LBUILD_KMODTOOL
pushd ${LBUILD_DIR}/rhel7
patch -p1 < kmodtool.patch
+# Replace the hardcoded /usr/src/kernels with our build path
+tmp="${TOPDIR}/reused/usr/src/kernels"
+tmp="${tmp//\//\\/}"
+sed -i "s/\/usr\/src\/kernels/${tmp}/g" ${LBUILD_DIR}/rhel7/kmodtool
chmod 755 kmodtool
popd
# Next we replace %kernel_module_package with one that is nearly
# identical, but calls lbuild's modified kmodtool script.
# We need to cleanout the previous entry
sed -i "/^%kernel_module_package/,/^)}$/d" $RMAC
chmod 755 kmodtool
popd
# Next we replace %kernel_module_package with one that is nearly
# identical, but calls lbuild's modified kmodtool script.
# We need to cleanout the previous entry
sed -i "/^%kernel_module_package/,/^)}$/d" $RMAC
-sed -e "s|REPLACE_ME|$LBUILD_KMODTOOL|" \
+sed -e "s|REPLACE_ME|$LBUILD_KMODTOOL|" -e "s/\/usr\/src\/kernels/${tmp}/g" \
${LBUILD_DIR}/rhel7/rpmmacros.template > ${LBUILD_DIR}/rhel7/rpmmacros
cat ${LBUILD_DIR}/rhel7/rpmmacros >> $RMAC
${LBUILD_DIR}/rhel7/rpmmacros.template > ${LBUILD_DIR}/rhel7/rpmmacros
cat ${LBUILD_DIR}/rhel7/rpmmacros >> $RMAC
# This distro does not support zfs, so define WITH_ZFS
# use words that make the bash log readable.
WITH_ZFS="Zfs Not Supported"
# This distro does not support zfs, so define WITH_ZFS
# use words that make the bash log readable.
WITH_ZFS="Zfs Not Supported"
source ${LBUILD_DIR}/lbuild-sles
source ${LBUILD_DIR}/lbuild-sles