diff options
Diffstat (limited to 'platforms-ci.sh')
-rwxr-xr-x | platforms-ci.sh | 136 |
1 files changed, 84 insertions, 52 deletions
diff --git a/platforms-ci.sh b/platforms-ci.sh index 61899eb..0f94198 100755 --- a/platforms-ci.sh +++ b/platforms-ci.sh @@ -4,7 +4,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source ${SCRIPT_DIR}/platforms-common.sh -VALID_PLATFORM_LIST_ACK=("fvp" "fvp32" "juno" "juno32") +VALID_PLATFORM_LIST_ACK=("fvp" "fvp32") VALID_PLATFORM_LIST_LATEST=("fvp" "fvp32" "juno" "juno32") VALID_PLATFORM_LIST_UEFI=("fvp" "juno") VALID_PLATFORM_LIST_SGI=("sgi575") @@ -27,7 +27,7 @@ if [ "$JENKINS_WORKSPACE" == "" ]; then JENKINS_WORKSPACE=`pwd` echo "Using $JENKINS_WORKSPACE as JENKINS_WORKSPACE" fi - + unset WORKSPACE case "$1" in @@ -179,6 +179,7 @@ function install_toolchain ls -al popd } + function create_release_zip { local variant=$1 # variant (eg. juno, fvp, ...) @@ -203,7 +204,13 @@ function create_release_zip cp -R $workspace/recovery/* $to cp -R $from/* $to/SOFTWARE if [[ "$variant" == "juno" ]]; then - cp $workspace/uefi/edk2/Build/ArmJuno/DEBUG_GCC${gcc_major}/FV/BL33_AP_UEFI.fd $to/SOFTWARE/bl33-uefi.bin + if [ -f $workspace/uefi/edk2/Build/ArmJuno/DEBUG_GCC${gcc_major}/FV/BL33_AP_UEFI.fd ]; then + echo "Copying $workspace/uefi/edk2/Build/ArmJuno/DEBUG_GCC${gcc_major}/FV/BL33_AP_UEFI.fd to $to/SOFTWARE/bl33-uefi.bin" + cp $workspace/uefi/edk2/Build/ArmJuno/DEBUG_GCC${gcc_major}/FV/BL33_AP_UEFI.fd $to/SOFTWARE/bl33-uefi.bin + else + echo "Copying $workspace/uefi/edk2/Build/ArmJuno/DEBUG_GCC5/FV/BL33_AP_UEFI.fd to $to/SOFTWARE/bl33-uefi.bin" + cp $workspace/uefi/edk2/Build/ArmJuno/DEBUG_GCC5/FV/BL33_AP_UEFI.fd $to/SOFTWARE/bl33-uefi.bin + fi fi if [ "$manifest" != "uefi" ] && [ "$manifest" != "pinned-uefi" ]; then cp $workspace/output/${variant}/components/juno/uboot.bin $to/SOFTWARE/bl33-uboot.bin @@ -213,7 +220,21 @@ function create_release_zip cp $workspace/model-scripts/fvp/run_model.sh $to cp -R $from/* $to if [[ "$variant" == "fvp" ]]; then - cp $workspace/uefi/edk2/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC${gcc_major}/FV/FVP_AARCH64_EFI.fd $to/bl33-uefi.bin + if [ -f $workspace/uefi/edk2/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC${gcc_major}/FV/FVP_AARCH64_EFI.fd ]; then + echo "Copying $workspace/uefi/edk2/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC${gcc_major}/FV/FVP_AARCH64_EFI.fd to $to/bl33-uefi.bin" + cp $workspace/uefi/edk2/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC${gcc_major}/FV/FVP_AARCH64_EFI.fd $to/bl33-uefi.bin + else + echo "Copying $workspace/uefi/edk2/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC5/FV/FVP_AARCH64_EFI.fd to $to/bl33-uefi.bin" + cp $workspace/uefi/edk2/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC5/FV/FVP_AARCH64_EFI.fd $to/bl33-uefi.bin + fi + if [ "$os" == "android" ]; then + echo "Downloading http://releases.linaro.org/android/reference-lcr/fvp/latest/fvp.img.bz2" + wget http://releases.linaro.org/android/reference-lcr/fvp/latest/fvp.img.bz2 + echo "Extracting fvp.img.bz2" + bunzip2 -vf fvp.img.bz2 + echo "Copying fvp.img to $to" + cp fvp.img $to + fi fi if [ "$manifest" != "uefi" ] && [ "$manifest" != "pinned-uefi" ]; then cp $workspace/output/${variant}/components/fvp/uboot.bin $to/bl33-uboot.bin @@ -224,13 +245,16 @@ function create_release_zip cp -R $from/* $to/SOFTWARE ;; sgm775 ) - cp $workspace/model-scripts/sgi/platforms/sgm775/run_model.sh $to + cp $workspace/model-scripts/sgm775/run_model.sh $to + cp $workspace/model-scripts/sgm775/settings_generator.sh $to sed -i 's#ROOTDIR="../../output/sgm775"#ROOTDIR="."#' $to/run_model.sh - cp -aR $from/* $to + cp -R $from/* $to ;; sgi575 ) cp $workspace/model-scripts/sgi/platforms/sgi575/run_model.sh $to - sed -i 's#ROOTDIR="../../output/sgi575"#ROOTDIR="."#' $to/run_model.sh + sed -i 's#ROOTDIR="../../../../output/sgi575"#ROOTDIR="."#' $to/run_model.sh + cp $workspace/model-scripts/sgi/sgi_common_util.sh $to + sed -i 's#source ../../sgi_common_util.sh#source sgi_common_util.sh#' $to/run_model.sh cp -aR $from/* $to ;; * ) @@ -281,6 +305,7 @@ function create_release_zip zip --symlinks -r ../${job_output_dir}/${to}.zip * popd } + function dobuilds { manifest=$1 # pinned-ack, ack, pinned-latest or latest @@ -312,7 +337,7 @@ function dobuilds retries=10 while [ $retries != 0 ]; do - ${repo} sync -j${PARALLELISM} + ${repo} sync -j${PARALLELISM} --fetch-submodules --force-sync if [ $? == 0 ]; then break else @@ -334,14 +359,14 @@ function dobuilds ls -al check_workspace debug -: ' + mkdir -p prebuilts/android/fvp - wget http://releases.linaro.org/android/reference-lcr/fvp/7.0-16.10/ramdisk.img -O prebuilts/android/fvp/ramdisk.img + wget http://releases.linaro.org/android/reference-lcr/fvp/latest/ramdisk.img -O prebuilts/android/fvp/ramdisk.img mkdir -p prebuilts/android/juno - wget http://releases.linaro.org/members/arm/android/juno/18.04/ramdisk.img -O prebuilts/android/juno/ramdisk.img + wget http://releases.linaro.org/members/arm/android/juno/19.01/ramdisk.img -O prebuilts/android/juno/ramdisk.img mkdir -p prebuilts/android/tc2 wget http://releases.linaro.org/android/reference-lcr/vexpress/6.0-15.11/ramdisk.img -O prebuilts/android/tc2/ramdisk.img -' + if [ "$manifest" == "uefi" ] || [ "$manifest" == "pinned-uefi" ]; then echo "Doing a UEFI only build" for platform in "${VALID_PLATFORM_LIST_UEFI[@]}" @@ -355,11 +380,11 @@ function dobuilds ./build-scripts/build-all.sh -p ${platform} -f busybox all ./build-scripts/build-all.sh -p ${platform} -f oe all done - elif [ "$manifest" == "sgi575" ]; then + elif [ "$manifest" == "sgi575" ] || [ "$manifest" == "pinned-sgi575" ]; then echo "Doing build only for SGI Busybox Filesystem" for platform in "${VALID_PLATFORM_LIST_SGI[@]}" do - ./build-scripts/build-all.sh -p ${platform} -f busybox all + ./build-scripts/sgi/build-test-busybox.sh -p ${platform} all done elif [ "$manifest" == "sgm775" ]; then echo "Doing build only for SGM Busybox Filesystem" @@ -367,11 +392,21 @@ function dobuilds do ./build-scripts/build-all.sh -p ${platform} -f busybox all done - else - for platform in "${VALID_PLATFORM_LIST_ACK[@]}" + elif [ "$manifest" == "sgm775-android" ]; then + echo "Doing build only for SGM Android Filesystem" + for platform in "${VALID_PLATFORM_LIST_SGM[@]}" do - ./build-scripts/build-all.sh -p ${platform} all + ./build-scripts/build-all.sh -p ${platform} -f android all done + elif [ "$manifest" == "pinned-juno" ]; then + echo "Doing build only for juno Android and juno32 busybox Filesystem" + ./build-scripts/build-all.sh -p juno -f android all + ./build-scripts/build-all.sh -p juno32 -f busybox all + elif [ "$manifest" == "pinned-ack" ]; then + echo "Doing build only for fvp Android and fvp & fvp32 busybox Filesystem" + ./build-scripts/build-all.sh -p fvp -f android all + ./build-scripts/build-all.sh -p fvp -f busybox all + ./build-scripts/build-all.sh -p fvp32 -f busybox all fi popd } @@ -382,46 +417,43 @@ which arm-linux-gnueabihf-gcc && arm-linux-gnueabihf-gcc -v echo "aarch64 cross compiler:" which aarch64-linux-gnu-gcc && aarch64-linux-gnu-gcc -v -# TODO: Remove below line and multiline comment hack -dobuilds sgi575 $YYMM -: ' -# build the two kernel variants -dobuilds ${PINNED}ack $YYMM -dobuilds ${PINNED}latest $YYMM -dobuilds ${PINNED}uefi $YYMM -dobuilds sgi575 $YYMM -dobuilds sgm775 $YYMM -' - # Create the directory where we'll place all the stuff we expect to appear on snapshots.linaro.org mkdir ${job_output_dir} -# TODO: Remove below line and multiline comment hack -create_release_zip sgi575 sgi575 busybox uefi sgi575-latest-busybox-uefi -: ' -# Create the recovery directories for each variant -create_release_zip juno ${PINNED}latest busybox uboot juno-latest-busybox-uboot -create_release_zip juno ${PINNED}latest oe uboot juno-latest-oe-uboot -create_release_zip juno ${PINNED}ack android uboot juno-ack-android-uboot -create_release_zip juno ${PINNED}uefi uefi uefi juno-uefi -create_release_zip fvp ${PINNED}latest busybox uboot fvp-latest-busybox-uboot -create_release_zip fvp ${PINNED}ack busybox uboot fvp-ack-busybox-uboot -create_release_zip fvp ${PINNED}latest oe uboot fvp-latest-oe-uboot -create_release_zip fvp ${PINNED}ack android uboot fvp-ack-android-uboot -create_release_zip fvp ${PINNED}uefi uefi uefi fvp-uefi -create_release_zip fvp32 ${PINNED}latest busybox uboot fvp32-latest-busybox-uboot -create_release_zip fvp32 ${PINNED}ack busybox uboot fvp32-ack-busybox-uboot -create_release_zip fvp32 ${PINNED}latest oe uboot fvp32-latest-oe-uboot -#create_release_zip fvp32 ${PINNED}lsk android uboot fvp32-lsk-android-uboot -#create_release_zip fvp32 ${PINNED}uefi uefi uefi fvp32-uefi +# Build the variants and Create the release bundle for each variant +dobuilds ${PINNED}ack $YYMM +create_release_zip fvp ${PINNED}ack android uboot fvp-ack-android-uboot +create_release_zip fvp ${PINNED}ack busybox uboot fvp-ack-busybox-uboot +create_release_zip fvp32 ${PINNED}ack busybox uboot fvp32-ack-busybox-uboot + +dobuilds ${PINNED}latest $YYMM +create_release_zip fvp ${PINNED}latest busybox uboot fvp-latest-busybox-uboot +create_release_zip fvp ${PINNED}latest oe uboot fvp-latest-oe-uboot +create_release_zip fvp32 ${PINNED}latest busybox uboot fvp32-latest-busybox-uboot +create_release_zip fvp32 ${PINNED}latest oe uboot fvp32-latest-oe-uboot +create_release_zip juno ${PINNED}latest busybox uboot juno-latest-busybox-uboot +create_release_zip juno ${PINNED}latest oe uboot juno-latest-oe-uboot create_release_zip juno32 ${PINNED}latest busybox uboot juno32-latest-busybox-uboot -create_release_zip juno32 ${PINNED}ack busybox uboot juno32-ack-busybox-uboot create_release_zip juno32 ${PINNED}latest oe uboot juno32-latest-oe-uboot -#create_release_zip juno32 ${PINNED}lsk android uboot juno32-lsk-android-uboot -#create_release_zip juno32 ${PINNED}uefi uefi uefi juno32-uefi -create_release_zip sgm775 sgm775 busybox uboot sgm775-ack-busybox-uboot -create_release_zip sgi575 sgi575 busybox uefi sgi575-latest-busybox-uefi -' + +dobuilds ${PINNED}uefi $YYMM +create_release_zip fvp ${PINNED}uefi uefi uefi fvp-uefi +create_release_zip juno ${PINNED}uefi uefi uefi juno-uefi +#create_release_zip fvp32 ${PINNED}uefi uefi uefi fvp32-uefi +#create_release_zip juno32 ${PINNED}uefi uefi uefi juno32-uefi + +dobuilds ${PINNED}juno $YYMM +create_release_zip juno ${PINNED}juno android uboot juno-ack-android-uboot +create_release_zip juno32 ${PINNED}juno busybox uboot juno32-ack-busybox-uboot + +dobuilds ${PINNED}sgi575 $YYMM +create_release_zip sgi575 ${PINNED}sgi575 busybox uefi sgi575-latest-busybox-uefi + +dobuilds sgm775 $YYMM +create_release_zip sgm775 sgm775 busybox uboot sgm775-ack-busybox-uboot + +dobuilds sgm775-android $YYMM +create_release_zip sgm775 sgm775-android android uboot sgm775-ack-android-uboot echo PWD: $PWD echo "ls -al" |