diff options
author | Jiang, Yunhong <yunhong.jiang@intel.com> | 2017-02-22 22:19:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-02-22 22:19:02 +0000 |
commit | d0deb639c35881c25f2b5ca77d64de0d4c649841 (patch) | |
tree | 2b6a4715ffc6551332ffe31f51d7c2c94dd3e763 /ci/build_rpm/kernel_rpm_build.sh | |
parent | f156e825018f6cdd996406aede3f821fc1f9fcb1 (diff) | |
parent | 843dfef73c86a8ad71afe36e2db9e711dddc199a (diff) |
Merge "Combine the common code for kernel building on deb/rpm"
Diffstat (limited to 'ci/build_rpm/kernel_rpm_build.sh')
-rwxr-xr-x | ci/build_rpm/kernel_rpm_build.sh | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/ci/build_rpm/kernel_rpm_build.sh b/ci/build_rpm/kernel_rpm_build.sh deleted file mode 100755 index fa6383eb8..000000000 --- a/ci/build_rpm/kernel_rpm_build.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -kernel_src_dir=kernel -rpmbuild_dir=/tmp/kvmfornfv_rpmbuild.$$ -artifact_dir=${rpmbuild_dir}/RPMS/x86_64 -mkdir -p $artifact_dir -config_file="${kernel_src_dir}/arch/x86/configs/opnfv.config" -output_dir="$1" - -usage () { - echo "usage: ${0} output_dir" - exit 1 -} - -if [[ -z "$@" ]]; then - usage -fi - -if [ ! -d ${output_dir} -o ! -w ${output_dir} ] ; then - echo "${0}: Output directory '${output_dir}' does not exist or cannot \ - be written" - exit 1 -fi - -if [ ! -d ${kernel_src_dir} ] ; then - echo "${0}: Directory '${kernel_src_dir}' does not exist, run this script \ - from the root of kvmfornfv source tree" - exit 1 -fi - -if [ ! -f ${config_file} ] ; then - echo "${0}: ${config_file} does not exist" - exit 1 -fi - -echo -echo "Build" -echo - -cp -f ${config_file} "${kernel_src_dir}/.config" - -# Make timestamp part of version string for automated kernel boot verification -date "+-%y%m%d%H%M" > "${kernel_src_dir}/localversion-zzz" - -(cd ${kernel_src_dir}; make RPMOPTS="--define '_topdir ${rpmbuild_dir}'" rpm-pkg) -if [ ${?} -ne 0 ] ; then - echo "${0}: Kernel build failed" - rm -rf ${rpmbuild_dir} - exit 1 -fi - -cp -f ${artifact_dir}/* ${output_dir} - -rm -rf ${rpmbuild_dir} |