From deb876341478582ff51a5290e22794a99d0c4749 Mon Sep 17 00:00:00 2001 From: Marc Mattmueller Date: Mon, 6 Sep 2021 19:24:56 +0200 Subject: [PATCH] mmcImages: mask out the bootloader artifacts using the machine type Signed-off-by: Marc Mattmueller --- Jenkinsfile_mmcImages | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile_mmcImages b/Jenkinsfile_mmcImages index a4416ad..80649b1 100644 --- a/Jenkinsfile_mmcImages +++ b/Jenkinsfile_mmcImages @@ -86,7 +86,7 @@ pipeline { // the bootloader is also built with the dev image, hence we combine it def isBootLoaderOnly = (params.IMAGE_TYPE == 'bootloader').toBoolean() if(isBootLoaderOnly || (params.IMAGE_TYPE == 'dev')) { - createBslPackage(env.IMG_OUTPUT_DIR) + createBslPackage(env.IMG_OUTPUT_DIR, params.MACHINE) archivePackage(yoctocommon, env.IMG_OUTPUT_DIR, 'bootloader', !isBootLoaderOnly) } @@ -152,13 +152,20 @@ def build(imgType) { } //----------------------------------------------------------------------------- -def createBslPackage(outputDir) { +def createBslPackage(outputDir, machine) { dir(outputDir) { + String machineStr = machine + String[] machineArr = machineStr.split('-') + println "get bootloader artifacts for package..." - sh "cp ${env.YOCTO_DEPLOYS}/*u-boot-${params.MACHINE}*.img . || true" - sh "cp ${env.YOCTO_DEPLOYS}/*u-boot-${params.MACHINE}*.xmodem.bin . || true" - sh "cp ${env.YOCTO_DEPLOYS}/imx-boot . || true" - sh "cp ${env.YOCTO_DEPLOYS}/imx-boot.sd . || true" + if(machineArr[0] == 'imx8') { + sh "cp ${env.YOCTO_DEPLOYS}/imx-boot ." + sh "cp ${env.YOCTO_DEPLOYS}/imx-boot.sd ." + } + else { + sh "cp ${env.YOCTO_DEPLOYS}/*u-boot-${params.MACHINE}*.img ." + sh "cp ${env.YOCTO_DEPLOYS}/*u-boot-${params.MACHINE}*.xmodem.bin ." + } } }