:p
atchew
Login
Upgrade Yocto to a newer version. Use ext4 as image format for testing with QEMU on ARM and ARM64 as the default is WIC and it is not available for our xen-image-minimal target. Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> --- I am running one last test (that takes hours) I'll make sure it passes before I commit anything. --- automation/build/yocto/build-yocto.sh | 9 +++++++-- automation/build/yocto/yocto.inc | 4 ++-- automation/gitlab-ci/build.yaml | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/automation/build/yocto/build-yocto.sh b/automation/build/yocto/build-yocto.sh index XXXXXXX..XXXXXXX 100755 --- a/automation/build/yocto/build-yocto.sh +++ b/automation/build/yocto/build-yocto.sh @@ -XXX,XX +XXX,XX @@ TARGET_SUPPORTED="qemuarm qemuarm64 qemux86-64" VERBOSE="n" TARGETLIST="" BUILDJOBS="8" +EXT4="ext4" # actions to do do_clean="n" @@ -XXX,XX +XXX,XX @@ build_result=0 # layers to include in the project build_layerlist="poky/meta poky/meta-poky poky/meta-yocto-bsp \ meta-openembedded/meta-oe meta-openembedded/meta-python \ + meta-openembedded/meta-networking \ meta-openembedded/meta-filesystems \ - meta-openembedded/meta-networking meta-virtualization" + meta-virtualization" # yocto image to build build_image="xen-image-minimal" @@ -XXX,XX +XXX,XX @@ function run_task() { function project_create() { target="${1:?}" destdir="${BUILDDIR}/${target}" + if [ $target = "qemux86-64" ]; then + EXT4="" + fi ( # init yocto project @@ -XXX,XX +XXX,XX @@ function project_run() { /usr/bin/expect <<EOF set timeout 1000 -spawn bash -c "runqemu serialstdio nographic slirp" +spawn bash -c "runqemu serialstdio nographic slirp ${EXT4}" expect_after { -re "(.*)\r" { diff --git a/automation/build/yocto/yocto.inc b/automation/build/yocto/yocto.inc index XXXXXXX..XXXXXXX 100644 --- a/automation/build/yocto/yocto.inc +++ b/automation/build/yocto/yocto.inc @@ -XXX,XX +XXX,XX @@ # YOCTOVERSION-TARGET for x86_64 hosts # YOCTOVERSION-TARGET-arm64v8 for arm64 hosts # For example you can build an arm64 container with the following command: -# make yocto/kirkstone-qemuarm64-arm64v8 +# make yocto/scarthgap-qemuarm64-arm64v8 # Yocto versions we are currently using. -YOCTO_VERSION = kirkstone +YOCTO_VERSION = scarthgap # Yocto BSPs we want to build for. YOCTO_TARGETS = qemuarm64 qemuarm qemux86-64 diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index XXXXXXX..XXXXXXX 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -XXX,XX +XXX,XX @@ script: - ./automation/build/yocto/build-yocto.sh -v --log-dir=./logs --xen-dir=`pwd` ${YOCTO_BOARD} ${YOCTO_OUTPUT} variables: - YOCTO_VERSION: kirkstone + YOCTO_VERSION: scarthgap CONTAINER: yocto:${YOCTO_VERSION}-${YOCTO_BOARD}${YOCTO_HOST} artifacts: paths: -- 2.25.1
Upgrade Yocto to a newer version. Use ext4 as image format for testing with QEMU on ARM and ARM64 as the default is WIC and it is not available for our xen-image-minimal target. Also update the tar.bz2 filename for the rootfs. Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> --- all yocto tests pass: https://gitlab.com/xen-project/people/sstabellini/xen/-/pipelines/1390081173 Changes in v2: - s/EXT4/IMAGE_FMT/ - set IMAGE_FMT before the call to project_build - also update the filename xen-image-minimal-qemuarm.rootfs.tar.bz2 --- automation/build/yocto/build-yocto.sh | 15 ++++++++++++--- automation/build/yocto/yocto.inc | 4 ++-- automation/gitlab-ci/build.yaml | 2 +- automation/scripts/qemu-smoke-dom0-arm32.sh | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/automation/build/yocto/build-yocto.sh b/automation/build/yocto/build-yocto.sh index XXXXXXX..XXXXXXX 100755 --- a/automation/build/yocto/build-yocto.sh +++ b/automation/build/yocto/build-yocto.sh @@ -XXX,XX +XXX,XX @@ TARGET_SUPPORTED="qemuarm qemuarm64 qemux86-64" VERBOSE="n" TARGETLIST="" BUILDJOBS="8" +IMAGE_FMT="" # actions to do do_clean="n" @@ -XXX,XX +XXX,XX @@ build_result=0 # layers to include in the project build_layerlist="poky/meta poky/meta-poky poky/meta-yocto-bsp \ meta-openembedded/meta-oe meta-openembedded/meta-python \ + meta-openembedded/meta-networking \ meta-openembedded/meta-filesystems \ - meta-openembedded/meta-networking meta-virtualization" + meta-virtualization" # yocto image to build build_image="xen-image-minimal" @@ -XXX,XX +XXX,XX @@ function project_build() { 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 + cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-image-minimal-qemuarm.rootfs.tar.bz2 $OUTPUTDIR fi fi ) || return 1 @@ -XXX,XX +XXX,XX @@ function project_run() { /usr/bin/expect <<EOF set timeout 1000 -spawn bash -c "runqemu serialstdio nographic slirp" +spawn bash -c "runqemu serialstdio nographic slirp ${IMAGE_FMT}" expect_after { -re "(.*)\r" { @@ -XXX,XX +XXX,XX @@ for f in ${TARGETLIST}; do run_task project_create "${f}" fi if [ -f "${BUILDDIR}/${f}/conf/local.conf" ]; then + # Set the right image target + if [ "$f" = "qemux86-64" ]; then + IMAGE_FMT="" + else + IMAGE_FMT="ext4" + fi + if [ "${do_build}" = "y" ]; then run_task project_build "${f}" fi diff --git a/automation/build/yocto/yocto.inc b/automation/build/yocto/yocto.inc index XXXXXXX..XXXXXXX 100644 --- a/automation/build/yocto/yocto.inc +++ b/automation/build/yocto/yocto.inc @@ -XXX,XX +XXX,XX @@ # YOCTOVERSION-TARGET for x86_64 hosts # YOCTOVERSION-TARGET-arm64v8 for arm64 hosts # For example you can build an arm64 container with the following command: -# make yocto/kirkstone-qemuarm64-arm64v8 +# make yocto/scarthgap-qemuarm64-arm64v8 # Yocto versions we are currently using. -YOCTO_VERSION = kirkstone +YOCTO_VERSION = scarthgap # Yocto BSPs we want to build for. YOCTO_TARGETS = qemuarm64 qemuarm qemux86-64 diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index XXXXXXX..XXXXXXX 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -XXX,XX +XXX,XX @@ script: - ./automation/build/yocto/build-yocto.sh -v --log-dir=./logs --xen-dir=`pwd` ${YOCTO_BOARD} ${YOCTO_OUTPUT} variables: - YOCTO_VERSION: kirkstone + YOCTO_VERSION: scarthgap CONTAINER: yocto:${YOCTO_VERSION}-${YOCTO_BOARD}${YOCTO_HOST} artifacts: paths: diff --git a/automation/scripts/qemu-smoke-dom0-arm32.sh b/automation/scripts/qemu-smoke-dom0-arm32.sh index XXXXXXX..XXXXXXX 100755 --- a/automation/scripts/qemu-smoke-dom0-arm32.sh +++ b/automation/scripts/qemu-smoke-dom0-arm32.sh @@ -XXX,XX +XXX,XX @@ cd binaries mkdir rootfs cd rootfs -tar xvf ../xen-image-minimal-qemuarm.tar.bz2 +tar xvf ../xen-image-minimal-qemuarm.rootfs.tar.bz2 mkdir -p ./root echo "name=\"test\" memory=400 -- 2.25.1