@@ -18,6 +18,7 @@ CACHEDIR="$HOME/yocto-cache"
LOGDIR="$HOME/logs"
XENDIR="$HOME/xen"
BUILDDIR="$HOME/build"
+OUTPUTDIR=`pwd`/binaries
# what yocto bsp we support
TARGET_SUPPORTED="qemuarm qemuarm64 qemux86-64"
@@ -31,6 +32,7 @@ do_build="y"
do_run="y"
do_localsrc="n"
do_dump="n"
+do_copy="n"
build_result=0
# layers to include in the project
@@ -166,6 +168,16 @@ function project_build() {
source "${YOCTODIR}/poky/oe-init-build-env" "${destdir}"
bitbake "${build_image}" || exit 1
+ if [ $do_copy = "y" ]
+ then
+ if [ $target = "qemuarm" ]
+ then
+ mkdir -p $OUTPUTDIR
+ cp $BUILDDIR/tmp/deploy/images/qemuarm/zImage $OUTPUTDIR
+ cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-qemuarm $OUTPUTDIR
+ cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-image-minimal-qemuarm.tar.bz2 $OUTPUTDIR
+ fi
+ fi
) || return 1
}
@@ -235,6 +247,7 @@ Options:
Default: ${CACHEDIR}
--layer-dir=DIR directory containing the checkout of yocto layers
Default: ${YOCTODIR}
+ --copy-output Copy output binaries to binaries/
EOF
}
@@ -290,6 +303,9 @@ do
--layer-dir=*)
YOCTODIR="${OPTION#*=}"
;;
+ --copy-output)
+ do_copy="y"
+ ;;
--*)
echo "Invalid option ${OPTION}"
help
@@ -208,13 +208,14 @@
- /^coverity-tested\/.*/
- /^stable-.*/
script:
- - ./automation/build/yocto/build-yocto.sh -v --log-dir=./logs --xen-dir=`pwd` ${YOCTO_BOARD}
+ - ./automation/build/yocto/build-yocto.sh -v --log-dir=./logs --xen-dir=`pwd` ${YOCTO_BOARD} ${YOCTO_OUTPUT}
variables:
YOCTO_VERSION: kirkstone
CONTAINER: yocto:${YOCTO_VERSION}-${YOCTO_BOARD}-${YOCTO_HOST}
artifacts:
paths:
- 'logs/*'
+ - binaries/
when: always
needs: []
@@ -744,6 +745,7 @@ yocto-qemuarm:
extends: .yocto-test-arm64
variables:
YOCTO_BOARD: qemuarm
+ YOCTO_OUTPUT: --copy-output
yocto-qemux86-64:
extends: .yocto-test-arm64