summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xuefi.sh140
1 files changed, 70 insertions, 70 deletions
diff --git a/uefi.sh b/uefi.sh
index 225465e..498daf5 100755
--- a/uefi.sh
+++ b/uefi.sh
@@ -30,32 +30,32 @@ esac
pkg_source=edk2-${JOB_NAME}
if [ "${BUILD_NUMBER}" -eq 0 ]; then
- rm -rf ${repo}
+ rm -rf ${repo}
fi
#
# Check out linaro-edk2 sources
#
if [ ! -d ${repo} ]; then
- echo "Cloning ${repo}-${branch}"
- git clone --depth 1 ${pkg_repository} -b ${branch}
+ echo "Cloning ${repo}-${branch}"
+ git clone --depth 1 ${pkg_repository} -b ${branch}
else
- echo "${repo} already exists; cleaning..."
- pushd ${repo}
- git clean -dfx
- git fetch origin
- git branch -D ${branch} || true
- git checkout --track origin/${branch}
- popd
+ echo "${repo} already exists; cleaning..."
+ pushd ${repo}
+ git clean -dfx
+ git fetch origin
+ git branch -D ${branch} || true
+ git checkout --track origin/${branch}
+ popd
fi
if [ -f ${repo}/.gitmodules ]; then
- pushd ${repo}
- if [ ! -d .git/modules ]; then
- git submodule init
- fi
- git submodule update
- popd
+ pushd ${repo}
+ if [ ! -d .git/modules ]; then
+ git submodule init
+ fi
+ git submodule update
+ popd
fi
#
@@ -64,27 +64,27 @@ fi
atf_dir=arm-trusted-firmware
atf_repo=https://github.com/ARM-software/arm-trusted-firmware.git
if [ ! -d ${atf_dir} ]; then
- echo "Cloning ${atf_dir}"
- git clone ${atf_repo}
- pushd ${atf_dir}
- git checkout -b ${atf_version} ${atf_version}
- popd
+ echo "Cloning ${atf_dir}"
+ git clone ${atf_repo}
+ pushd ${atf_dir}
+ git checkout -b ${atf_version} ${atf_version}
+ popd
else
- echo "${atf_dir} already exists; cleaning..."
- pushd ${atf_dir}
- git clean -dfx
- git fetch origin
- git reset --hard HEAD
- git checkout master
- git branch -D ${atf_version} || true
- git checkout -b ${atf_version} ${atf_version}
- popd
+ echo "${atf_dir} already exists; cleaning..."
+ pushd ${atf_dir}
+ git clean -dfx
+ git fetch origin
+ git reset --hard HEAD
+ git checkout master
+ git branch -D ${atf_version} || true
+ git checkout -b ${atf_version} ${atf_version}
+ popd
fi
scm_commit=`cd ${repo} && git log -n1 --pretty=format:%h`
if [ -z "${scm_commit}" ]; then
- echo "Invalid git revision: ${scm_commit}" >&2
- exit 1
+ echo "Invalid git revision: ${scm_commit}" >&2
+ exit 1
fi
base_version=0.1
@@ -107,38 +107,38 @@ cd ${WORKSPACE}
# Get the UEFI tools
UEFI_TOOLS_DIR=${WORKSPACE}/uefi-tools
if [ ! -d ${UEFI_TOOLS_DIR} ]; then
- git clone git://git.linaro.org/uefi/uefi-tools.git
+ git clone git://git.linaro.org/uefi/uefi-tools.git
else
- git --git-dir=${UEFI_TOOLS_DIR}/.git pull
+ git --git-dir=${UEFI_TOOLS_DIR}/.git pull
fi
if [ "$AARCH32_TOOLCHAIN" == "" ]; then
- gcc_version=$(${CROSS_COMPILE}gcc -dumpversion)
- case $gcc_version in
- 4.6|4.7|4.8)
- AARCH32_TOOLCHAIN=GCC$(echo ${gcc_version} | sed s-\\.--g)
- echo "Set AARCH32_TOOLCHAIN to ${AARCH32_TOOLCHAIN}"
- ;;
- *)
- echo "Unknown toolchain version '$gcc_version'" >&2
- echo "Attempting to build using GCC48 profile." >&2
- AARCH32_TOOLCHAIN=GCC48
- ;;
- esac
+ gcc_version=$(${CROSS_COMPILE}gcc -dumpversion)
+ case $gcc_version in
+ 4.6|4.7|4.8)
+ AARCH32_TOOLCHAIN=GCC$(echo ${gcc_version} | sed s-\\.--g)
+ echo "Set AARCH32_TOOLCHAIN to ${AARCH32_TOOLCHAIN}"
+ ;;
+ *)
+ echo "Unknown toolchain version '$gcc_version'" >&2
+ echo "Attempting to build using GCC48 profile." >&2
+ AARCH32_TOOLCHAIN=GCC48
+ ;;
+ esac
fi
if [ "$AARCH64_TOOLCHAIN" == "" ]; then
- gcc_version=$(aarch64-linux-gnu-gcc -dumpversion)
- case $gcc_version in
- 4.6|4.7|4.8)
- AARCH64_TOOLCHAIN=GCC$(echo ${gcc_version} | sed s-\\.--g)
- echo "Set AARCH64_TOOLCHAIN to ${AARCH64_TOOLCHAIN}"
- ;;
- *)
- echo "Unknown AArch64 toolchain version '$gcc_version'" >&2
- echo "Attempting to build using GCC48 profile." >&2
- AARCH64_TOOLCHAIN=GCC48
- ;;
- esac
+ gcc_version=$(aarch64-linux-gnu-gcc -dumpversion)
+ case $gcc_version in
+ 4.6|4.7|4.8)
+ AARCH64_TOOLCHAIN=GCC$(echo ${gcc_version} | sed s-\\.--g)
+ echo "Set AARCH64_TOOLCHAIN to ${AARCH64_TOOLCHAIN}"
+ ;;
+ *)
+ echo "Unknown AArch64 toolchain version '$gcc_version'" >&2
+ echo "Attempting to build using GCC48 profile." >&2
+ AARCH64_TOOLCHAIN=GCC48
+ ;;
+ esac
fi
# disable exit on error
@@ -160,18 +160,18 @@ platforms="`${UEFI_TOOLS_DIR}/parse-platforms.py -c LinaroPkg/platforms.config l
${UEFI_TOOLS_DIR}/uefi-build.sh -c LinaroPkg/platforms.config -b RELEASE -b DEBUG -a ../$atf_dir -D FIRMWARE_VER=${RELEASE_STRING} $platforms
for platform in $platforms; do
- BUILD_ATF="`${UEFI_TOOLS_DIR}/parse-platforms.py -c LinaroPkg/platforms.config -p $platform -o BUILD_ATF get`"
- IMAGES="`${UEFI_TOOLS_DIR}/parse-platforms.py -c LinaroPkg/platforms.config -p $platform images`"
- IMAGE_DIR="`${UEFI_TOOLS_DIR}/parse-platforms.py -c LinaroPkg/platforms.config -p $platform -o UEFI_IMAGE_DIR get`"
- DEBUG_DIR="${builddir}/debug/${platform}/"
- RELEASE_DIR="${builddir}/release/${platform}/"
- mkdir -p "$DEBUG_DIR" "$RELEASE_DIR"
- echo "Copying images for platform '$platform':"
- for image in $IMAGES; do
- cp "$EDK2_DIR"/Build/"$IMAGE_DIR"/RELEASE_*/FV/"$image" "$RELEASE_DIR"
- cp "$EDK2_DIR"/Build/"$IMAGE_DIR"/DEBUG_*/FV/"$image" "$DEBUG_DIR"
- echo -e "\t`basename $image`"
- done
+ BUILD_ATF="`${UEFI_TOOLS_DIR}/parse-platforms.py -c LinaroPkg/platforms.config -p $platform -o BUILD_ATF get`"
+ IMAGES="`${UEFI_TOOLS_DIR}/parse-platforms.py -c LinaroPkg/platforms.config -p $platform images`"
+ IMAGE_DIR="`${UEFI_TOOLS_DIR}/parse-platforms.py -c LinaroPkg/platforms.config -p $platform -o UEFI_IMAGE_DIR get`"
+ DEBUG_DIR="${builddir}/debug/${platform}/"
+ RELEASE_DIR="${builddir}/release/${platform}/"
+ mkdir -p "$DEBUG_DIR" "$RELEASE_DIR"
+ echo "Copying images for platform '$platform':"
+ for image in $IMAGES; do
+ cp "$EDK2_DIR"/Build/"$IMAGE_DIR"/RELEASE_*/FV/"$image" "$RELEASE_DIR"
+ cp "$EDK2_DIR"/Build/"$IMAGE_DIR"/DEBUG_*/FV/"$image" "$DEBUG_DIR"
+ echo -e "\t`basename $image`"
+ done
done
SCT=${SCT:-0}