aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2017-04-19 19:31:29 +0300
committerFathi Boudra <fathi.boudra@linaro.org>2017-04-19 16:32:52 +0000
commit1851eb2e700da7a23cdb397ea3aada0ce53360ed (patch)
tree6c36d1d1d5fc8e66135f0168fa7d06dc4f9894c1
parent266c950361d5cb06a46c3f25978eb815f476050a (diff)
rpb-uefi-staging: add new job for staging builds
Change-Id: Ib19810c257e1d616fc9edd07b072686b92a4ccd5 Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
-rw-r--r--rpb-uefi-staging.yaml260
-rw-r--r--rpb-uefi.yaml4
2 files changed, 261 insertions, 3 deletions
diff --git a/rpb-uefi-staging.yaml b/rpb-uefi-staging.yaml
new file mode 100644
index 0000000000..7f79b84023
--- /dev/null
+++ b/rpb-uefi-staging.yaml
@@ -0,0 +1,260 @@
+- job:
+ name: 96boards-reference-uefi-staging
+ project-type: matrix
+ defaults: global
+ logrotate:
+ daysToKeep: 30
+ numToKeep: 30
+ properties:
+ - authorization:
+ anonymous:
+ - job-read
+ - job-extended-read
+ - job-workspace
+ linaro:
+ - job-read
+ - job-extended-read
+ - job-build
+ - job-cancel
+ parameters:
+ - string:
+ name: EDK2_VERSION
+ default: 'HEAD'
+ - string:
+ name: ATF_VERSION
+ default: 'v1.2'
+ - string:
+ name: OPTEE_VERSION
+ default: '2.3.0'
+ disabled: false
+ node: master
+ child-workspace: .
+ display-name: 'Reference Platform - UEFI (staging)'
+ axes:
+ - axis:
+ type: user-defined
+ name: MX_PLATFORM
+ values:
+ - hikey
+ - d02
+ - d03
+ - d05
+ - juno
+ - overdrive
+ - cello
+ - qemu64
+ - axis:
+ type: user-defined
+ name: MX_TYPE
+ values:
+ - RELEASE
+ - DEBUG
+ - axis:
+ type: slave
+ name: label
+ values:
+ - docker-jessie-rp
+ execution-strategy:
+ sequential: false
+ wrapper:
+ - timestamps
+ - build-name:
+ name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}'
+ - matrix-tie-parent:
+ node: master
+ builders:
+ - linaro-publish-token:
+ host: builds.96boards.org
+ - shell: |
+ #!/bin/bash
+
+ export JOB_NAME=96boards-reference-uefi
+ echo "JOB_URL: ${JOB_URL}"
+ echo "BUILD_URL: ${BUILD_URL}"
+ echo "WORKSPACE: ${WORKSPACE}"
+ echo "BUILD_NUMBER: ${BUILD_NUMBER}"
+
+ # Create lower case debug/release string for use in paths
+ BUILD_TYPE="${MX_TYPE,,}"
+
+ sudo apt-get update
+ sudo apt-get install -y nasm python-requests python-crypto python-wand zip
+
+ set -ex
+
+ trap cleanup_exit INT TERM EXIT
+
+ cleanup_exit()
+ {
+ cd ${WORKSPACE}
+ rm -rf arm-trusted-firmware
+ rm -rf uefi-tools
+ rm -rf l-loader
+ rm -rf OpenPlatformPkg
+ rm -rf optee_os
+ rm -rf out edk2/Build
+ }
+
+ # sbin isn't in the PATH by default and prevent to find sgdisk
+ export PATH="/usr/sbin:/sbin:$PATH"
+
+ # Use pre-installed linaro toolchain (GCC 5.3)
+ export PATH="${HOME}/srv/toolchain/arm-tc-16.02/bin:${HOME}/srv/toolchain/arm64-tc-16.02/bin:$PATH"
+
+ # Common git repositories to fetch
+ UEFI_TOOLS_GIT_URL=https://git.linaro.org/uefi/uefi-tools.git
+ EDK2_GIT_URL=https://github.com/tianocore/edk2.git
+ EDK2_GIT_VERSION=$EDK2_VERSION
+ ATF_GIT_URL=https://github.com/ARM-software/arm-trusted-firmware.git
+ ATF_GIT_VERSION=$ATF_VERSION
+ ## Temporarily switch to a dev tree/branch
+ OPEN_PLATFORM_PKG_GIT_URL=https://git.linaro.org/uefi/OpenPlatformPkg.git
+ OPEN_PLATFORM_PKG_GIT_BRANCH=master
+ OPTEE_OS_GIT_URL=https://github.com/OP-TEE/optee_os.git
+ OPTEE_GIT_VERSION=$OPTEE_VERSION
+
+ # So we can easily identify the build number via build path
+ mkdir ${BUILD_NUMBER}; cd ${BUILD_NUMBER}
+
+ # Clone the repos
+ git clone $UEFI_TOOLS_GIT_URL uefi-tools
+ cd uefi-tools; UEFI_TOOLS_GIT_VERSION=`git log --format="%H" -1`; cd ..
+
+ # Per board repositories overrides
+ if [ "${MX_PLATFORM}" == "hikey" ]; then
+ EDK2_GIT_URL=https://github.com/96boards-hikey/edk2.git
+ EDK2_GIT_VERSION="origin/hikey-aosp"
+ ATF_GIT_URL=https://github.com/96boards-hikey/arm-trusted-firmware.git
+ ATF_GIT_VERSION="origin/hikey"
+ OPEN_PLATFORM_PKG_GIT_URL=https://github.com/96boards-hikey/OpenPlatformPkg.git
+ OPEN_PLATFORM_PKG_GIT_BRANCH=hikey-aosp
+ fi
+
+ # Force cap GCC build profile to GCC49, still preferred by upstream
+ TOOLCHAIN=GCC49
+ export AARCH64_TOOLCHAIN=GCC49
+
+ git clone $EDK2_GIT_URL edk2
+ cd edk2; git checkout -b stable-baseline $EDK2_GIT_VERSION
+ EDK2_GIT_VERSION=$(git rev-parse $EDK2_GIT_VERSION)
+ cd ..
+
+ git clone -b $OPEN_PLATFORM_PKG_GIT_BRANCH $OPEN_PLATFORM_PKG_GIT_URL OpenPlatformPkg
+ cd edk2; rm -rf OpenPlatformPkg; ln -s ../OpenPlatformPkg; cd ..
+ cd OpenPlatformPkg; OPEN_PLATFORM_PKG_GIT_VERSION=`git log --format="%H" -1`; cd ..
+
+ git clone $ATF_GIT_URL arm-trusted-firmware
+ cd arm-trusted-firmware; git checkout -b stable-baseline $ATF_GIT_VERSION;
+ ATF_GIT_VERSION=$(git rev-parse $ATF_GIT_VERSION)
+ cd ..
+
+ git clone $OPTEE_OS_GIT_URL optee_os
+ cd optee_os; git checkout -b stable-baseline $OPTEE_GIT_VERSION;
+ OPTEE_OS_GIT_VERSION=`git log --format="%H" -1`; cd ..
+
+ # Build setup
+ export EDK2_DIR=${WORKSPACE}/${BUILD_NUMBER}/edk2
+ export OPP_DIR=${WORKSPACE}/${BUILD_NUMBER}/OpenPlatformPkg
+ export ATF_DIR=${WORKSPACE}/${BUILD_NUMBER}/arm-trusted-firmware
+ export OPTEE_OS_DIR=${WORKSPACE}/${BUILD_NUMBER}/optee_os
+ export UEFI_TOOLS_DIR=${WORKSPACE}/${BUILD_NUMBER}/uefi-tools
+ export JENKINS_WORKSPACE=${WORKSPACE}
+
+ # WORKSPACE is used by uefi-build.sh
+ unset WORKSPACE
+
+ # Build UEFI for the desired platform, with the specified build type
+ cd ${EDK2_DIR}
+ bash -x ${UEFI_TOOLS_DIR}/uefi-build.sh -T ${TOOLCHAIN} -b ${MX_TYPE} -a ${ATF_DIR} -s ${OPTEE_OS_DIR} ${MX_PLATFORM}
+
+ unset WORKSPACE
+ export WORKSPACE=${JENKINS_WORKSPACE}
+
+ # Find out the artifacts and image dir so we can publish the correct output files
+ IMAGES=`$UEFI_TOOLS_DIR/parse-platforms.py -c $UEFI_TOOLS_DIR/platforms.config -p ${MX_PLATFORM} images`
+ IMAGE_DIR=`$UEFI_TOOLS_DIR/parse-platforms.py -c $UEFI_TOOLS_DIR/platforms.config -p ${MX_PLATFORM} -o UEFI_IMAGE_DIR get`
+ BUILD_ATF=`$UEFI_TOOLS_DIR/parse-platforms.py -c $UEFI_TOOLS_DIR/platforms.config -p ${MX_PLATFORM} -o BUILD_ATF get`
+ BUILD_TOS=`$UEFI_TOOLS_DIR/parse-platforms.py -c $UEFI_TOOLS_DIR/platforms.config -p ${MX_PLATFORM} -o BUILD_TOS get`
+
+ cd ${WORKSPACE}
+ mkdir -p out/${BUILD_TYPE}
+ for image in ${IMAGES}; do
+ cp -a ${EDK2_DIR}/Build/${IMAGE_DIR}/${MX_TYPE}_*/FV/${image} out/${BUILD_TYPE}/
+ done
+
+ cat > out/${BUILD_TYPE}/BUILD-INFO.txt << EOF
+ Format-Version: 0.5
+
+ Files-Pattern: *
+ License-Type: open
+ EOF
+
+ if [ "${MX_PLATFORM}" == "hikey" ]; then
+ # Additional components for hikey, such as fastboot and l-loader
+ cp -a ${EDK2_DIR}/Build/${IMAGE_DIR}/${MX_TYPE}_*/AARCH64/AndroidFastbootApp.efi out/${BUILD_TYPE}
+ cd ${WORKSPACE}/${BUILD_NUMBER}
+ git clone --depth 1 https://github.com/96boards-hikey/l-loader.git
+ cd l-loader
+ ln -s ${WORKSPACE}/out/${BUILD_TYPE}/bl1.bin
+ make
+ cp -a l-loader.bin ptable*.img ${WORKSPACE}/out/${BUILD_TYPE}
+ wget https://raw.githubusercontent.com/96boards/burn-boot/master/hisi-idt.py -O ${WORKSPACE}/out/${BUILD_TYPE}/hisi-idt.py
+ # Ship nvme.img with UEFI binaries for convenience
+ dd if=/dev/zero of=${WORKSPACE}/out/${BUILD_TYPE}/nvme.img bs=128 count=1024
+
+ # Ship files needed to build OP-TEE test suite
+ tar -C ${OPTEE_OS_DIR}/out -acvf \
+ ${WORKSPACE}/out/${BUILD_TYPE}/optee-arm-plat-hikey.tar.xz \
+ arm-plat-hikey/export-ta_arm64 arm-plat-hikey/export-ta_arm32
+ fi
+ cd ${WORKSPACE}
+
+ # Create MD5SUMS file
+ (cd out/${BUILD_TYPE} && md5sum * > MD5SUMS.txt)
+
+ # Build information
+ cat > out/${BUILD_TYPE}/HEADER.textile << EOF
+
+ h4. Reference Platform - UEFI
+
+ Tianocore EDK2 UEFI build consumed by the Reference Platform Builds
+
+ Build Description:
+ * Build URL: "$BUILD_URL":$BUILD_URL
+ * UEFI Tools: "$UEFI_TOOLS_GIT_URL":$UEFI_TOOLS_GIT_URL
+ * UEFI Tools head: $UEFI_TOOLS_GIT_VERSION
+ * EDK2: "$EDK2_GIT_URL":$EDK2_GIT_URL
+ * EDK2 head: $EDK2_GIT_VERSION
+ * OpenPlatformPkg: "$OPEN_PLATFORM_PKG_GIT_URL":$OPEN_PLATFORM_PKG_GIT_URL
+ * OpenPlatformPkg branch: $OPEN_PLATFORM_PKG_GIT_BRANCH
+ * OpenPlatformPkg head: $OPEN_PLATFORM_PKG_GIT_VERSION
+ EOF
+
+ if [ "$BUILD_ATF" == "yes" ]; then
+ cat >> out/${BUILD_TYPE}/HEADER.textile << EOF
+ * ARM Trusted Firmware: "$ATF_GIT_URL":$ATF_GIT_URL
+ * ARM Trusted Firmware head: $ATF_GIT_VERSION
+ EOF
+ fi
+
+ if [ "$BUILD_TOS" == "yes" ]; then
+ cat >> out/${BUILD_TYPE}/HEADER.textile << EOF
+ * OP-TEE OS: "$OPTEE_OS_GIT_URL":$OPTEE_OS_GIT_URL
+ * OP-TEE OS head: $OPTEE_OS_GIT_VERSION
+ EOF
+ fi
+
+ # Publish
+ test -d ${HOME}/bin || mkdir ${HOME}/bin
+ wget https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
+ time python ${HOME}/bin/linaro-cp.py \
+ --server ${PUBLISH_SERVER} \
+ --build-info out/${BUILD_TYPE}/BUILD-INFO.txt \
+ out/${BUILD_TYPE} snapshots/reference-platform/components/uefi-staging/${BUILD_NUMBER}/${BUILD_TYPE}/${MX_PLATFORM}/
+ python ${HOME}/bin/linaro-cp.py \
+ --server ${PUBLISH_SERVER} \
+ --make-link snapshots/reference-platform/components/uefi-staging/${BUILD_NUMBER}
+ publishers:
+ - email-ext:
+ recipients: 'fathi.boudra@linaro.org, ricardo.salveti@linaro.org, qa-team@linaro.org'
+ always: true
diff --git a/rpb-uefi.yaml b/rpb-uefi.yaml
index e124507eb1..954a764bbf 100644
--- a/rpb-uefi.yaml
+++ b/rpb-uefi.yaml
@@ -255,8 +255,6 @@
--server ${PUBLISH_SERVER} \
--make-link snapshots/reference-platform/components/uefi/${BUILD_NUMBER}
publishers:
- - email:
- recipients: 'fathi.boudra@linaro.org ricardo.salveti@linaro.org'
- email-ext:
- recipients: 'ricardo.salveti@linaro.org, qa-team@linaro.org'
+ recipients: 'fathi.boudra@linaro.org, ricardo.salveti@linaro.org, qa-team@linaro.org'
always: true