diff --git a/boards/.a62.yml b/boards/.a62.yml index f351a084c8d5aea5be4ce3e178255f6ffabcfc5b..89cb69eda1a4a0e24a6ad8e69f744655dcb310ad 100644 --- a/boards/.a62.yml +++ b/boards/.a62.yml @@ -12,6 +12,8 @@ build-edgehog-a62: DEFCONFIG_FILE: seco_sbc_a62_edgehog RECIPE_NAME: seco-image-edgehog IMAGE_NAME: edgehog-things-image + UBOOT_FILE: u-boot.imx + KERNEL_FILE: zImage deploy-edgehog-a62: extends: .deploy @@ -20,8 +22,6 @@ deploy-edgehog-a62: artifacts: true variables: &deploy-edgehog-a62 <<: *build-edgehog-a62 - UBOOT_FILE: u-boot.imx - KERNEL_FILE: zImage AZURE_PATH: imx6/a62 ############################# diff --git a/boards/.c12.yml b/boards/.c12.yml index ee5d1be299ba60cc55f264d06d204d804ac4d81a..210771295b30a3e51cc4de34bec8a0f31d3d10d7 100644 --- a/boards/.c12.yml +++ b/boards/.c12.yml @@ -12,6 +12,8 @@ build-edgehog-c12: DEFCONFIG_FILE: seco_smarc_c12_edgehog RECIPE_NAME: seco-image-edgehog IMAGE_NAME: edgehog-things-image + UBOOT_FILE: imx-boot + KERNEL_FILE: Image deploy-edgehog-c12: extends: .deploy @@ -20,8 +22,6 @@ deploy-edgehog-c12: artifacts: true variables: &deploy-edgehog-c12 <<: *build-edgehog-c12 - UBOOT_FILE: imx-boot - KERNEL_FILE: Image AZURE_PATH: imx8/c12 ############################# diff --git a/boards/.c20.yml b/boards/.c20.yml index 36904bb187f42faacb65c8bf3b7df1aaa6408ea2..abe85d60566f5062f1ed8d6643c1a6a100d27c0d 100644 --- a/boards/.c20.yml +++ b/boards/.c20.yml @@ -12,6 +12,8 @@ build-edgehog-c20: DEFCONFIG_FILE: seco_sbc_c20_edgehog RECIPE_NAME: seco-image-edgehog IMAGE_NAME: edgehog-things-image + UBOOT_FILE: imx-boot + KERNEL_FILE: Image deploy-edgehog-c20: extends: .deploy @@ -20,8 +22,6 @@ deploy-edgehog-c20: artifacts: true variables: &deploy-edgehog-c20 <<: *build-edgehog-c20 - UBOOT_FILE: imx-boot - KERNEL_FILE: Image AZURE_PATH: imx8/c20 ############################# diff --git a/boards/.c26.yml b/boards/.c26.yml index 8f3b4cdbe5e76f75ba4b728d6ec515426a32aa51..f7e37715403a4d0dc2c12bd6d0e13f41ea346ab7 100644 --- a/boards/.c26.yml +++ b/boards/.c26.yml @@ -12,6 +12,8 @@ build-edgehog-c26: DEFCONFIG_FILE: seco_q7_c26_edgehog RECIPE_NAME: seco-image-edgehog IMAGE_NAME: edgehog-things-image + UBOOT_FILE: imx-boot + KERNEL_FILE: Image deploy-edgehog-c26: extends: .deploy @@ -20,8 +22,6 @@ deploy-edgehog-c26: artifacts: true variables: &deploy-edgehog-c26 <<: *build-edgehog-c26 - UBOOT_FILE: imx-boot - KERNEL_FILE: Image AZURE_PATH: imx8/c26 ############################# diff --git a/boards/.c31.yml b/boards/.c31.yml index 7186f79ad8d8aaef370cceea05a4170e0028f197..523c1ac9b76f8cf8d99c7e59cb9adae5b52c31a6 100644 --- a/boards/.c31.yml +++ b/boards/.c31.yml @@ -13,6 +13,8 @@ build-edgehog-c31: RECIPE_NAME: seco-image-edgehog IMAGE_NAME: edgehog-things-image KERNEL: 4-19-111 + UBOOT_FILE: uboot.img trust.img idblock.img + KERNEL_FILE: Image deploy-edgehog-c31: extends: .deploy @@ -21,8 +23,6 @@ deploy-edgehog-c31: artifacts: true variables: &deploy-edgehog-c31 <<: *build-edgehog-c31 - UBOOT_FILE: uboot.img trust.img idblock.img - KERNEL_FILE: Image AZURE_PATH: rockchip/c31 ############################# diff --git a/boards/.c43.yml b/boards/.c43.yml index a99e462df0dddda06c5f14c0fd85a72d1f4bc7cd..515b65ff2133f0da29cf1aea9e4e000566a3e7d3 100644 --- a/boards/.c43.yml +++ b/boards/.c43.yml @@ -12,6 +12,8 @@ build-edgehog-c43: DEFCONFIG_FILE: seco_sbc_c43_edgehog RECIPE_NAME: seco-image-edgehog IMAGE_NAME: edgehog-things-image + UBOOT_FILE: imx-boot + KERNEL_FILE: Image deploy-edgehog-c43: extends: .deploy @@ -20,8 +22,6 @@ deploy-edgehog-c43: artifacts: true variables: &deploy-edgehog-c43 <<: *build-edgehog-c43 - UBOOT_FILE: imx-boot - KERNEL_FILE: Image AZURE_PATH: imx8/c43 ############################# diff --git a/boards/.intel_apl.yml b/boards/.intel_apl.yml index 661f6d29b61f3a75790520d8fed8e7aa7402cdee..844f4a44616b0021b428b1dbf081e0f60ee75b93 100644 --- a/boards/.intel_apl.yml +++ b/boards/.intel_apl.yml @@ -12,6 +12,8 @@ build-edgehog-intel-apl: DEFCONFIG_FILE: seco_intel_apl_edgehog RECIPE_NAME: seco-image-edgehog IMAGE_NAME: edgehog-things-image + UBOOT_FILE: none + KERNEL_FILE: none deploy-edgehog-intel-apl: extends: .deploy @@ -20,6 +22,4 @@ deploy-edgehog-intel-apl: artifacts: true variables: &deploy-edgehog-intel-apl <<: *build-edgehog-intel-apl - UBOOT_FILE: none - KERNEL_FILE: none AZURE_PATH: apollolake/Yocto diff --git a/boards/.tanaro.yml b/boards/.tanaro.yml index 4cfb54ef784998c093d91d125af2eac358b99779..81e46a365b0178063ac59cf856853b4d04d73f6e 100644 --- a/boards/.tanaro.yml +++ b/boards/.tanaro.yml @@ -12,6 +12,8 @@ build-edgehog-tanaro: DEFCONFIG_FILE: seco_sbc_tanaro_edgehog RECIPE_NAME: seco-image-edgehog IMAGE_NAME: edgehog-things-image + UBOOT_FILE: imx-boot + KERNEL_FILE: Image deploy-edgehog-tanaro: extends: .deploy @@ -20,8 +22,6 @@ deploy-edgehog-tanaro: artifacts: true variables: &deploy-edgehog-tanaro <<: *build-edgehog-tanaro - UBOOT_FILE: imx-boot - KERNEL_FILE: Image AZURE_PATH: imx8/tanaro ############################# diff --git a/manifest-pipeline-yocto.yml b/manifest-pipeline-yocto.yml index 0b8c72a9bfae72176f9481c71a816fc1474f1139..27e587b0c17fc821a351844867d4a8c0deb4014f 100644 --- a/manifest-pipeline-yocto.yml +++ b/manifest-pipeline-yocto.yml @@ -211,10 +211,11 @@ retrigger: sh .gitlab-ci/scripts/build_setup.sh $GITBOT_TOKEN $CI_REPOSITORY_URL $BUILD_BRANCH $DEFCONFIG_FILE $RECIPE_NAME . ./seco-setup.sh -d ${DEFCONFIG_FILE}; . ./seco-setup.sh -c; - sh ../.gitlab-ci/scripts/yocto_cache_setup.sh $PROCESSOR $CUSTOM + sh ../.gitlab-ci/scripts/yocto_cache_setup.sh $PROCESSOR $CUSTOM; time bitbake ${RECIPE_NAME}; if [[ "$CI_JOB_NAME" != *"embedded"* ]]; then time bitbake seco-bundle-edgehog; fi; " + - . ../.gitlab-ci/scripts/check_build_artifacts.sh - echo "$BUILD_DIRECTORY/$IMAGES_PATH/$MACHINE" > $BASEDIR/pathname.txt after_script: diff --git a/scripts/check_build_artifacts.sh b/scripts/check_build_artifacts.sh new file mode 100755 index 0000000000000000000000000000000000000000..0e6386bb647939f5d037208f489a617ca04ab33f --- /dev/null +++ b/scripts/check_build_artifacts.sh @@ -0,0 +1,75 @@ +#!/bin/bash + +ARTIFACTS_DIR="$IMAGES_PATH/$MACHINE" + +count_uboot_files=0 +count_image=`ls -1 $ARTIFACTS_DIR/$KERNEL_FILE 2>/dev/null | wc -l` +count_dtb=`ls -1 $ARTIFACTS_DIR/*.dtb 2>/dev/null | wc -l` +count_dtbo=`ls -1 $ARTIFACTS_DIR/*.dtbo 2>/dev/null | wc -l` +count_fs=`ls -1 $ARTIFACTS_DIR/*.$FS_EXTENSION 2>/dev/null | wc -l` +count_wic=`ls -1 $ARTIFACTS_DIR/*.$IMAGE_EXTENSION 2>/dev/null | wc -l` +count_bundle=`ls -1 $ARTIFACTS_DIR/*.raucb 2>/dev/null | wc -l` + +if [[ $UBOOT_FILE != *"none"* ]]; then + count_el=0 + for i in $UBOOT_FILE; do + count_tmp=0 + count_tmp=`ls -1 $ARTIFACTS_DIR/$i 2>/dev/null | wc -l` + count_uboot_files=$(($count_uboot_files+$count_tmp)) + count_el=$((count_el+1)) + done + if [ $count_uboot_files -eq 0 ]; then + echo "No uboot artifacts were compiled, exiting with error 1 .." + exit 1 + elif [ $count_uboot_files -gt 0 ] && [ $count_uboot_files -lt "$count_el" ]; then + echo "uboot artifacts lower than expected found, warning!" + else + echo "All uboot artifacts were found!" + fi +fi + +if [[ $KERNEL_FILE != *"none"* ]]; then + if [ $count_image -eq 0 ]; then + echo "No kernel image artifacts were compiled, exiting with error 1 .." + exit 1 + else + echo "Kernel image artifacts were found!" + fi + + if [ $count_dtb -eq 0 ]; then + echo "No dtb artifacts were compiled, exiting with error 1 .." + exit 1 + else + echo "dtb artifacts were found!" + fi + + if [ $count_dtbo -eq 0 ]; then + echo "No dtb artifacts were compiled, exiting with error 1 .." + exit 1 + else + echo "dtb artifacts were found!" + fi +fi + +if [ $count_fs -eq 0 ]; then + echo "No filesystem artifacts were compiled, exiting with error 1 .." + exit 1 +else + echo "Filesystem artifacts were found!" +fi + +if [ $count_wic -eq 0 ]; then + echo "No image artifacts were compiled, exiting with error 1 .." + exit 1 +else + echo "Image artifacts were found!" +fi + +if [[ "$CI_JOB_NAME" != *"embedded"* ]]; then + if [ $count_bundle -eq 0 ]; then + echo "No bundle artifacts were compiled, exiting with error 1 .." + exit 1 + else + echo "Bundle artifacts were found!" + fi +fi \ No newline at end of file