--ofed-version
Version of external OFED to build with lustre
- --mlnx-version
- Version of external Mellanox OFED to build with lustre
-
--ofed-src
Tarball for either OFED. Tarball must follow below format
OFED-<ofed-version>.tgz regardless of vendors
}
+# The download site is no longer existed! We have to drop the tgz in builders
+# under workspace/kerneltree
+declare -A opa_supported_map=(
+["10.9.1.0.15"]="https://downloadmirror.intel.com/28565/eng/"
+["10.9.2.0.9"]="https://downloadmirror.intel.com/28721/eng/"
+["10.9.3.1.1"]="https://downloadmirror.intel.com/28866/eng/"
+["10.10.0.0.445"]="https://downloadmirror.intel.com/29107/eng/"
+["10.10.1.0.36"]="https://downloadmirror.intel.com/29278/eng/"
+["10.10.2.0.44"]="https://downloadmirror.intel.com/29496/eng/"
+["10.10.3.1.1"]="https://downloadmirror.intel.com/"
+)
+
+#currently used by DDN only
+build_opa() {
+ local linux="$1"
+ local ofed_version="$OPA_VERSION"
+ local linuxrelease=$(find_linux_release)
+
+ rhel_major=$(grep "RHEL_MAJOR =" $linux/Makefile | awk -F '= ' '{print $2}')
+ rhel_minor=$(grep "RHEL_MINOR =" $linux/Makefile | awk -F '= ' '{print $2}')
+ location=${opa_supported_map["$ofed_version"]}
+ # the download location is no longer existed but we keep it a bit longer
+ # and in this case we'll require external src
+ file="IntelOPA-IFS.RHEL$rhel_major$rhel_minor-${TARGET_ARCH}.${ofed_version}"
+ if [ -n "${location}" ]; then
+ download_file "$location/$file.tgz" "$KERNELTREE" "false"
+ fi
+ if [ ! -e $KERNELTREE/${file}.tgz ] && [ -n "${OPA_SRC}" ]; then
+ # try again
+ download_file "${OPA_SRC}" "$KERNELTREE/${file}.tgz" "false"
+ fi
+ if ! untar "$KERNELTREE/${file}.tgz"; then
+ # we'll try the external source before giving up
+ fatal 1 "failed to untar $KERNELTREE/${file}.tgz"
+ fi
+
+ file="IntelOPA-IFS.*.${ofed_version}"
+ rpm --define "_topdir ${TOPDIR}" -ivh \
+ ${TOPDIR}/$file/IntelOPA-*.*/SRPMS/ifs-kernel-updates-*.src.rpm ||
+ fatal 1 "could not install ifs-kernel-updates.*.src.rpm."
+
+ #-e "s#\$kbuild/%kbuild#g" this looks like a bug of spec files..
+ cp ${TOPDIR}/SPECS/ifs-kernel-updates.spec ${TOPDIR}/SPECS/ifs-kernel-updates.spec.orig
+ sed -i -e '/%define kver/d' -e '/%define kdir/d' \
+ -e "s#KDIR=\%{kernel_source \$flavor}#KDIR=${linux}#g" \
+ -e "s#\$kbuild#%kbuild#g" \
+ ${TOPDIR}/SPECS/ifs-kernel-updates.spec
+
+ $RPMBUILD -bs --define "kver ${linuxrelease}" \
+ ${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \
+ --define "kdir ${linux}" \
+ --define "kbuild ${linux}" --define "_topdir ${TOPDIR}" \
+ ${TOPDIR}/SPECS/ifs-kernel-updates.spec ||
+ fatal 1 "could not build ifs-kernel*.src.rpm"
+
+ $RPMBUILD --rebuild --define "kver ${linuxrelease}" \
+ ${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \
+ --define "kdir ${linux}" \
+ --define "kbuild ${linux}" \
+ --define "_topdir ${TOPDIR}" ${TOPDIR}/SRPMS/ifs-kernel-updates*.src.rpm ||
+ fatal 1 "could not rebuild ifs-kernel*.rpm"
+}
+
# build OFED
# globals used:
# TOPDIR
options=$(getopt -o D:h -l kerneltree:,distro:,kernelrpm:,reusebuild:,\
patchless,patchless-server,enable-kernel-debug,ccache,norpm,external-patches:,timestamp:,\
extraversion:,kerneldir:,linux:,lustre:,nodownload,nosrc,noiokit,ofed-type:,\
-ofed-version:,mlnx-version:,ofed-src:,publish,disable-zfs,release,set-value:,\
-src,stage:,target:,with-linux:,xen -- "$@")
+ofed-version:,opa-version:,ofed-src:,opa-src:,publish,disable-zfs,release,\
+set-value:,src,stage:,target:,with-linux:,xen -- "$@")
if [ $? != 0 ]; then
usage 1
OFED_VERSION="$2"
shift 2
;;
+ --opa-version)
+ OPA_VERSION="$2"
+ shift 2
+ ;;
+ --opa-src)
+ OPA_SRC="$2"
+ shift 2
+ ;;
--ofed-type)
OFED_TYPE="$2"
shift 2