Xen-Devel Archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] automation: add arm32 xl domU creation test
@ 2023-02-15 22:09 Stefano Stabellini
  2023-02-15 22:09 ` [PATCH v2 1/3] automation: move yocto jobs to build stage Stefano Stabellini
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stefano Stabellini @ 2023-02-15 22:09 UTC (permalink / raw
  To: xen-devel; +Cc: sstabellini, cardoe, michal.orzel

Hi all,

This patch series add a domU creation test based on xl for arm32. To do
that, it reuses the existing arm32 dom0 test, and also reuses the Yocto
qemuarm build output.

Pipeline (with reduced amount of jobs):
https://gitlab.com/xen-project/people/sstabellini/xen/-/pipelines/779022452

Cheers,

Stefano

Stefano Stabellini (3):
      automation: move yocto jobs to build stage
      automation: add binaries/ to artifacts for Yocto arm32 job
      automation: expand arm32 dom0 test adding xl domain creation

 automation/build/yocto/build-yocto.sh       |  9 +++++
 automation/gitlab-ci/build.yaml             | 52 +++++++++++++++++++++++++++++
 automation/gitlab-ci/test.yaml              | 47 ++------------------------
 automation/scripts/qemu-smoke-dom0-arm32.sh | 50 ++++++++++++++++++++-------
 4 files changed, 101 insertions(+), 57 deletions(-)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/3] automation: move yocto jobs to build stage
  2023-02-15 22:09 [PATCH v2 0/3] automation: add arm32 xl domU creation test Stefano Stabellini
@ 2023-02-15 22:09 ` Stefano Stabellini
  2023-02-17 14:38   ` Michal Orzel
  2023-02-15 22:09 ` [PATCH v2 2/3] automation: add binaries/ to artifacts for Yocto arm32 job Stefano Stabellini
  2023-02-15 22:09 ` [PATCH v2 3/3] automation: expand arm32 dom0 test adding xl domain creation Stefano Stabellini
  2 siblings, 1 reply; 7+ messages in thread
From: Stefano Stabellini @ 2023-02-15 22:09 UTC (permalink / raw
  To: xen-devel; +Cc: sstabellini, cardoe, michal.orzel, Stefano Stabellini

From: Stefano Stabellini <stefano.stabellini@amd.com>

We are going to use artifacts produced by the Yocto builds in test jobs.

Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
---
 automation/gitlab-ci/build.yaml | 51 +++++++++++++++++++++++++++++++++
 automation/gitlab-ci/test.yaml  | 45 -----------------------------
 2 files changed, 51 insertions(+), 45 deletions(-)

diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index a053c5c732..f62cf21f45 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -199,6 +199,41 @@
   variables:
     <<: *gcc
 
+.yocto-test:
+  stage: build
+  image: registry.gitlab.com/xen-project/xen/${CONTAINER}
+  except:
+    - master
+    - smoke
+    - /^coverity-tested\/.*/
+    - /^stable-.*/
+  script:
+    - ./automation/build/yocto/build-yocto.sh -v --log-dir=./logs --xen-dir=`pwd` ${YOCTO_BOARD}
+  variables:
+    YOCTO_VERSION: kirkstone
+    CONTAINER: yocto:${YOCTO_VERSION}-${YOCTO_BOARD}-${YOCTO_HOST}
+  artifacts:
+    paths:
+      - 'logs/*'
+    when: always
+  needs: []
+
+.yocto-test-arm64:
+  extends: .yocto-test
+  variables:
+    YOCTO_HOST: arm64v8
+  tags:
+    - arm64
+
+# This is not used by any test job as we only run Yocto on arm based machines.
+# Keep it here so that someone having x86 hardware can easily add jobs.
+.yocto-test-x86-64:
+  extends: .yocto-test
+  variables:
+    YOCTO_HOST: amd64
+  tags:
+    - x86_64
+
 # Jobs below this line
 
 archlinux-gcc:
@@ -679,6 +714,22 @@ archlinux-current-gcc-riscv64-debug-randconfig:
     EXTRA_FIXED_RANDCONFIG:
       CONFIG_COVERAGE=n
 
+# Yocto test jobs
+yocto-qemuarm64:
+  extends: .yocto-test-arm64
+  variables:
+    YOCTO_BOARD: qemuarm64
+
+yocto-qemuarm:
+  extends: .yocto-test-arm64
+  variables:
+    YOCTO_BOARD: qemuarm
+
+yocto-qemux86-64:
+  extends: .yocto-test-arm64
+  variables:
+    YOCTO_BOARD: qemux86-64
+
 ## Test artifacts common
 
 .test-jobs-artifact-common:
diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
index ce543ef5c0..9570085a60 100644
--- a/automation/gitlab-ci/test.yaml
+++ b/automation/gitlab-ci/test.yaml
@@ -67,35 +67,6 @@
   tags:
     - x86_64
 
-.yocto-test:
-  extends: .test-jobs-common
-  script:
-    - ./automation/build/yocto/build-yocto.sh -v --log-dir=./logs --xen-dir=`pwd` ${YOCTO_BOARD}
-  variables:
-    YOCTO_VERSION: kirkstone
-    CONTAINER: yocto:${YOCTO_VERSION}-${YOCTO_BOARD}-${YOCTO_HOST}
-  artifacts:
-    paths:
-      - 'logs/*'
-    when: always
-  needs: []
-
-.yocto-test-arm64:
-  extends: .yocto-test
-  variables:
-    YOCTO_HOST: arm64v8
-  tags:
-    - arm64
-
-# This is not used by any test job as we only run Yocto on arm based machines.
-# Keep it here so that someone having x86 hardware can easily add jobs.
-.yocto-test-x86-64:
-  extends: .yocto-test
-  variables:
-    YOCTO_HOST: amd64
-  tags:
-    - x86_64
-
 # Test jobs
 build-each-commit-gcc:
   extends: .test-jobs-common
@@ -253,19 +224,3 @@ qemu-smoke-riscv64-gcc:
     - ./automation/scripts/qemu-smoke-riscv64.sh 2>&1 | tee ${LOGFILE}
   needs:
     - archlinux-current-gcc-riscv64-debug
-
-# Yocto test jobs
-yocto-qemuarm64:
-  extends: .yocto-test-arm64
-  variables:
-    YOCTO_BOARD: qemuarm64
-
-yocto-qemuarm:
-  extends: .yocto-test-arm64
-  variables:
-    YOCTO_BOARD: qemuarm
-
-yocto-qemux86-64:
-  extends: .yocto-test-arm64
-  variables:
-    YOCTO_BOARD: qemux86-64
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/3] automation: add binaries/ to artifacts for Yocto arm32 job
  2023-02-15 22:09 [PATCH v2 0/3] automation: add arm32 xl domU creation test Stefano Stabellini
  2023-02-15 22:09 ` [PATCH v2 1/3] automation: move yocto jobs to build stage Stefano Stabellini
@ 2023-02-15 22:09 ` Stefano Stabellini
  2023-02-17 14:46   ` Michal Orzel
  2023-02-15 22:09 ` [PATCH v2 3/3] automation: expand arm32 dom0 test adding xl domain creation Stefano Stabellini
  2 siblings, 1 reply; 7+ messages in thread
From: Stefano Stabellini @ 2023-02-15 22:09 UTC (permalink / raw
  To: xen-devel; +Cc: sstabellini, cardoe, michal.orzel, Stefano Stabellini

From: Stefano Stabellini <stefano.stabellini@amd.com>

Copy the build output of Yocto builds to binaries/ for the arm32 target,
and export binaries/ among the jobs artifacts so that they can be reused
by other jobs.

Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
---
Changes in v2:
- only copy binaries for the arm32 target
---
 automation/build/yocto/build-yocto.sh | 9 +++++++++
 automation/gitlab-ci/build.yaml       | 1 +
 2 files changed, 10 insertions(+)

diff --git a/automation/build/yocto/build-yocto.sh b/automation/build/yocto/build-yocto.sh
index 3601cebc3c..dd7065e5b2 100755
--- a/automation/build/yocto/build-yocto.sh
+++ b/automation/build/yocto/build-yocto.sh
@@ -166,6 +166,13 @@ function project_build() {
         source "${YOCTODIR}/poky/oe-init-build-env" "${destdir}"
 
         bitbake "${build_image}" || exit 1
+        if [ $target = "qemuarm" ]
+        then
+            mkdir -p $OUTPUT
+            cp $BUILDDIR/tmp/deploy/images/qemuarm/zImage $OUTPUT
+            cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-qemuarm $OUTPUT
+            cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-image-minimal-qemuarm.tar.bz2 $OUTPUT
+        fi
     ) || return 1
 }
 
@@ -238,6 +245,8 @@ Options:
 EOF
 }
 
+OUTPUT=`pwd`/binaries
+
 for OPTION in "$@"
 do
     case ${OPTION} in
diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index f62cf21f45..d4a2aa9a5b 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -215,6 +215,7 @@
   artifacts:
     paths:
       - 'logs/*'
+      - binaries/
     when: always
   needs: []
 
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 3/3] automation: expand arm32 dom0 test adding xl domain creation
  2023-02-15 22:09 [PATCH v2 0/3] automation: add arm32 xl domU creation test Stefano Stabellini
  2023-02-15 22:09 ` [PATCH v2 1/3] automation: move yocto jobs to build stage Stefano Stabellini
  2023-02-15 22:09 ` [PATCH v2 2/3] automation: add binaries/ to artifacts for Yocto arm32 job Stefano Stabellini
@ 2023-02-15 22:09 ` Stefano Stabellini
  2023-02-17 15:07   ` Michal Orzel
  2 siblings, 1 reply; 7+ messages in thread
From: Stefano Stabellini @ 2023-02-15 22:09 UTC (permalink / raw
  To: xen-devel; +Cc: sstabellini, cardoe, michal.orzel, Stefano Stabellini

From: Stefano Stabellini <stefano.stabellini@amd.com>

As part of the arm32 dom0 test, also create a simple domU using xl. To
do that, we need the toolstack installed in the dom0 rootfs. We switch
to using the kernel and rootfs built by the Yocto arm32 job.

Remove the PCI node from the host device tree: it is unused but causes a
Linux hang at boot.

Use xen-watchdog to trigger the domU creation for convience
(/etc/local.d is not handled by rootfs.)

Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
---
Changes in v2:
- add yocto-qemuarm also to qemu-smoke-dom0-arm32-gcc-debug
---
 automation/gitlab-ci/test.yaml              |  2 +
 automation/scripts/qemu-smoke-dom0-arm32.sh | 50 ++++++++++++++++-----
 2 files changed, 40 insertions(+), 12 deletions(-)

diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
index 9570085a60..77bb1c362d 100644
--- a/automation/gitlab-ci/test.yaml
+++ b/automation/gitlab-ci/test.yaml
@@ -172,6 +172,7 @@ qemu-smoke-dom0-arm32-gcc:
   needs:
     - *arm32-test-needs
     - debian-unstable-gcc-arm32
+    - yocto-qemuarm
 
 qemu-smoke-dom0-arm32-gcc-debug:
   extends: .qemu-arm32
@@ -180,6 +181,7 @@ qemu-smoke-dom0-arm32-gcc-debug:
   needs:
     - *arm32-test-needs
     - debian-unstable-gcc-arm32-debug
+    - yocto-qemuarm
 
 qemu-alpine-x86_64-gcc:
   extends: .qemu-x86-64
diff --git a/automation/scripts/qemu-smoke-dom0-arm32.sh b/automation/scripts/qemu-smoke-dom0-arm32.sh
index 98e4d481f6..7a748bdf23 100755
--- a/automation/scripts/qemu-smoke-dom0-arm32.sh
+++ b/automation/scripts/qemu-smoke-dom0-arm32.sh
@@ -3,14 +3,37 @@
 set -ex
 
 cd binaries
-# Use the kernel from Debian
-curl --fail --silent --show-error --location --output vmlinuz http://http.us.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/netboot/vmlinuz
-# Use a tiny initrd based on busybox from Alpine Linux
-curl --fail --silent --show-error --location --output initrd.tar.gz https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/armhf/alpine-minirootfs-3.15.1-armhf.tar.gz
 
+mkdir rootfs
+cd rootfs
+tar xvf ../xen-image-minimal-qemuarm.tar.bz2
+mkdir -p ./root
+echo "name=\"test\"
+memory=400
+vcpus=1
+kernel=\"/root/zImage\"
+ramdisk=\"/root/initrd.cpio.gz\"
+extra=\"console=hvc0 root=/dev/ram0 rdinit=/bin/sh\"
+" > root/test.cfg
+echo "#!/bin/bash
+
+xl list
+
+xl create -c /root/test.cfg
+
+" > ./root/xen.start
+echo "bash /root/xen.start" >> ./etc/init.d/xen-watchdog
+
+curl --fail --silent --show-error --location --output initrd.tar.gz https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/armhf/alpine-minirootfs-3.15.1-armhf.tar.gz
 mkdir rootfs
 cd rootfs
 tar xvzf ../initrd.tar.gz
+find . | cpio -H newc -o | gzip > ../root/initrd.cpio.gz
+cd ..
+rm -rf rootfs
+rm initrd.tar.gz
+
+cp ../zImage ./root
 find . | cpio -H newc -o | gzip > ../initrd.gz
 cd ..
 
@@ -20,22 +43,25 @@ curl -fsSLO https://github.com/qemu/qemu/raw/v5.2.0/pc-bios/efi-virtio.rom
    -machine virt \
    -machine virtualization=true \
    -smp 4 \
-   -m 1024 \
+   -m 2048 \
    -serial stdio \
    -monitor none \
    -display none \
    -machine dumpdtb=virt.dtb
 
+# XXX disable pci to avoid Linux hang
+fdtput virt.dtb -p -t s /pcie@10000000 status disabled
+
 # ImageBuilder
 echo 'MEMORY_START="0x40000000"
-MEMORY_END="0x80000000"
+MEMORY_END="0xC0000000"
 
 DEVICE_TREE="virt.dtb"
-XEN="xen"
-DOM0_KERNEL="vmlinuz"
+XEN="xen-qemuarm"
+DOM0_KERNEL="zImage"
 DOM0_RAMDISK="initrd.gz"
-DOM0_CMD="console=hvc0 earlyprintk clk_ignore_unused root=/dev/ram0 rdinit=/bin/sh"
-XEN_CMD="console=dtuart dom0_mem=512M bootscrub=0"
+DOM0_CMD="console=hvc0 earlyprintk clk_ignore_unused root=/dev/ram0 rdinit=/sbin/init"
+XEN_CMD="console=dtuart dom0_mem=1024M bootscrub=0"
 
 NUM_DOMUS=0
 
@@ -51,12 +77,12 @@ bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c config
 rm -f smoke.serial
 set +e
 echo "  virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0x40000000"| \
-timeout -k 1 240 \
+timeout -k 1 720 \
 ./qemu-system-arm \
    -machine virt \
    -machine virtualization=true \
    -smp 4 \
-   -m 1024 \
+   -m 2048 \
    -serial stdio \
    -monitor none \
    -display none \
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/3] automation: move yocto jobs to build stage
  2023-02-15 22:09 ` [PATCH v2 1/3] automation: move yocto jobs to build stage Stefano Stabellini
@ 2023-02-17 14:38   ` Michal Orzel
  0 siblings, 0 replies; 7+ messages in thread
From: Michal Orzel @ 2023-02-17 14:38 UTC (permalink / raw
  To: Stefano Stabellini, xen-devel; +Cc: cardoe, Stefano Stabellini

Hi Stefano,

On 15/02/2023 23:09, Stefano Stabellini wrote:
> 
> 
> From: Stefano Stabellini <stefano.stabellini@amd.com>
> 
> We are going to use artifacts produced by the Yocto builds in test jobs.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
> ---
>  automation/gitlab-ci/build.yaml | 51 +++++++++++++++++++++++++++++++++
>  automation/gitlab-ci/test.yaml  | 45 -----------------------------
>  2 files changed, 51 insertions(+), 45 deletions(-)
> 
> diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
> index a053c5c732..f62cf21f45 100644
> --- a/automation/gitlab-ci/build.yaml
> +++ b/automation/gitlab-ci/build.yaml
> @@ -199,6 +199,41 @@
>    variables:
>      <<: *gcc
> 
> +.yocto-test:
> +  stage: build
> +  image: registry.gitlab.com/xen-project/xen/${CONTAINER}
> +  except:
> +    - master
> +    - smoke
> +    - /^coverity-tested\/.*/
> +    - /^stable-.*/
stage, image and except are the same as in &build template.
You could just use <<: *build to reuse them. Specifying script here would overwrite the build script
and we do not care about artifacts paths (i.e. if it is not produced by a job, there will be just a warning
which is already the case for some jobs). Anyway, this is just a suggestion to save some lines, so with or without:

Reviewed-by: Michal Orzel <michal.orzel@amd.com>

~Michal


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/3] automation: add binaries/ to artifacts for Yocto arm32 job
  2023-02-15 22:09 ` [PATCH v2 2/3] automation: add binaries/ to artifacts for Yocto arm32 job Stefano Stabellini
@ 2023-02-17 14:46   ` Michal Orzel
  0 siblings, 0 replies; 7+ messages in thread
From: Michal Orzel @ 2023-02-17 14:46 UTC (permalink / raw
  To: Stefano Stabellini, xen-devel; +Cc: cardoe, Stefano Stabellini

Hi Stefano,

On 15/02/2023 23:09, Stefano Stabellini wrote:
> 
> 
> From: Stefano Stabellini <stefano.stabellini@amd.com>
> 
> Copy the build output of Yocto builds to binaries/ for the arm32 target,
> and export binaries/ among the jobs artifacts so that they can be reused
> by other jobs.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
> ---
> Changes in v2:
> - only copy binaries for the arm32 target
> ---
>  automation/build/yocto/build-yocto.sh | 9 +++++++++
>  automation/gitlab-ci/build.yaml       | 1 +
>  2 files changed, 10 insertions(+)
> 
> diff --git a/automation/build/yocto/build-yocto.sh b/automation/build/yocto/build-yocto.sh
> index 3601cebc3c..dd7065e5b2 100755
> --- a/automation/build/yocto/build-yocto.sh
> +++ b/automation/build/yocto/build-yocto.sh
> @@ -166,6 +166,13 @@ function project_build() {
>          source "${YOCTODIR}/poky/oe-init-build-env" "${destdir}"
> 
>          bitbake "${build_image}" || exit 1
> +        if [ $target = "qemuarm" ]
> +        then
> +            mkdir -p $OUTPUT
> +            cp $BUILDDIR/tmp/deploy/images/qemuarm/zImage $OUTPUT
> +            cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-qemuarm $OUTPUT
> +            cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-image-minimal-qemuarm.tar.bz2 $OUTPUT
> +        fi
I think it would be cleaner and more helpful especially for those using the yocto jobs locally to add
a new parameter to build-yocto.sh (set by default to n) to copy the build output to a directory (e.g. binaries)
instead of hardcoding it only for qemuarm.

>      ) || return 1
>  }
> 
> @@ -238,6 +245,8 @@ Options:
>  EOF
>  }
> 
> +OUTPUT=`pwd`/binaries
NIT: seems like all the variables in this script storing a directory path have a "DIR" suffix,
so it should be OUTPUTDIR. Also, why not to define it at the top of the file?

~Michal


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 3/3] automation: expand arm32 dom0 test adding xl domain creation
  2023-02-15 22:09 ` [PATCH v2 3/3] automation: expand arm32 dom0 test adding xl domain creation Stefano Stabellini
@ 2023-02-17 15:07   ` Michal Orzel
  0 siblings, 0 replies; 7+ messages in thread
From: Michal Orzel @ 2023-02-17 15:07 UTC (permalink / raw
  To: Stefano Stabellini, xen-devel; +Cc: cardoe, Stefano Stabellini

Hi Stefano,

On 15/02/2023 23:09, Stefano Stabellini wrote:
> 
> 
> From: Stefano Stabellini <stefano.stabellini@amd.com>
> 
> As part of the arm32 dom0 test, also create a simple domU using xl. To
> do that, we need the toolstack installed in the dom0 rootfs. We switch
> to using the kernel and rootfs built by the Yocto arm32 job.
FWICS, you also use xen produced by the yocto build. This is why...

> 
> Remove the PCI node from the host device tree: it is unused but causes a
> Linux hang at boot.
> 
> Use xen-watchdog to trigger the domU creation for convience
> (/etc/local.d is not handled by rootfs.)
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
> ---
> Changes in v2:
> - add yocto-qemuarm also to qemu-smoke-dom0-arm32-gcc-debug
> ---
>  automation/gitlab-ci/test.yaml              |  2 +
>  automation/scripts/qemu-smoke-dom0-arm32.sh | 50 ++++++++++++++++-----
>  2 files changed, 40 insertions(+), 12 deletions(-)
> 
> diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
> index 9570085a60..77bb1c362d 100644
> --- a/automation/gitlab-ci/test.yaml
> +++ b/automation/gitlab-ci/test.yaml
> @@ -172,6 +172,7 @@ qemu-smoke-dom0-arm32-gcc:
>    needs:
>      - *arm32-test-needs
>      - debian-unstable-gcc-arm32
> +    - yocto-qemuarm
> 
>  qemu-smoke-dom0-arm32-gcc-debug:
>    extends: .qemu-arm32
> @@ -180,6 +181,7 @@ qemu-smoke-dom0-arm32-gcc-debug:
>    needs:
>      - *arm32-test-needs
>      - debian-unstable-gcc-arm32-debug
> +    - yocto-qemuarm
... I think there is no need for debian-unstable-gcc-arm32 which was here to provide just a xen binary.
Also, with your change, it does not make sense to keep debug and non-debug versions of this job
as it does not apply to Yocto builds.

> 
>  qemu-alpine-x86_64-gcc:
>    extends: .qemu-x86-64
> diff --git a/automation/scripts/qemu-smoke-dom0-arm32.sh b/automation/scripts/qemu-smoke-dom0-arm32.sh
> index 98e4d481f6..7a748bdf23 100755
> --- a/automation/scripts/qemu-smoke-dom0-arm32.sh
> +++ b/automation/scripts/qemu-smoke-dom0-arm32.sh
> @@ -3,14 +3,37 @@
>  set -ex
> 
>  cd binaries
> -# Use the kernel from Debian
> -curl --fail --silent --show-error --location --output vmlinuz http://http.us.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/netboot/vmlinuz
> -# Use a tiny initrd based on busybox from Alpine Linux
> -curl --fail --silent --show-error --location --output initrd.tar.gz https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/armhf/alpine-minirootfs-3.15.1-armhf.tar.gz
> 
> +mkdir rootfs
> +cd rootfs
> +tar xvf ../xen-image-minimal-qemuarm.tar.bz2
> +mkdir -p ./root
> +echo "name=\"test\"
> +memory=400
> +vcpus=1
> +kernel=\"/root/zImage\"
> +ramdisk=\"/root/initrd.cpio.gz\"
> +extra=\"console=hvc0 root=/dev/ram0 rdinit=/bin/sh\"
> +" > root/test.cfg
> +echo "#!/bin/bash
> +
> +xl list
> +
> +xl create -c /root/test.cfg
> +
> +" > ./root/xen.start
> +echo "bash /root/xen.start" >> ./etc/init.d/xen-watchdog
> +
> +curl --fail --silent --show-error --location --output initrd.tar.gz https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/armhf/alpine-minirootfs-3.15.1-armhf.tar.gz
>  mkdir rootfs
>  cd rootfs
>  tar xvzf ../initrd.tar.gz
> +find . | cpio -H newc -o | gzip > ../root/initrd.cpio.gz
> +cd ..
> +rm -rf rootfs
> +rm initrd.tar.gz
> +
> +cp ../zImage ./root
>  find . | cpio -H newc -o | gzip > ../initrd.gz
>  cd ..
> 
> @@ -20,22 +43,25 @@ curl -fsSLO https://github.com/qemu/qemu/raw/v5.2.0/pc-bios/efi-virtio.rom
>     -machine virt \
>     -machine virtualization=true \
>     -smp 4 \
> -   -m 1024 \
> +   -m 2048 \
>     -serial stdio \
>     -monitor none \
>     -display none \
>     -machine dumpdtb=virt.dtb
> 
> +# XXX disable pci to avoid Linux hang
> +fdtput virt.dtb -p -t s /pcie@10000000 status disabled
> +
>  # ImageBuilder
>  echo 'MEMORY_START="0x40000000"
> -MEMORY_END="0x80000000"
> +MEMORY_END="0xC0000000"
> 
>  DEVICE_TREE="virt.dtb"
> -XEN="xen"
> -DOM0_KERNEL="vmlinuz"
> +XEN="xen-qemuarm"
> +DOM0_KERNEL="zImage"
>  DOM0_RAMDISK="initrd.gz"
> -DOM0_CMD="console=hvc0 earlyprintk clk_ignore_unused root=/dev/ram0 rdinit=/bin/sh"
> -XEN_CMD="console=dtuart dom0_mem=512M bootscrub=0"
> +DOM0_CMD="console=hvc0 earlyprintk clk_ignore_unused root=/dev/ram0 rdinit=/sbin/init"
> +XEN_CMD="console=dtuart dom0_mem=1024M bootscrub=0"
> 
With the introduction of dom0, I think it makes sense to grep for both dom0 prompt and domU prompt
just like we do for arm64.

~Michal



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-02-17 15:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-15 22:09 [PATCH v2 0/3] automation: add arm32 xl domU creation test Stefano Stabellini
2023-02-15 22:09 ` [PATCH v2 1/3] automation: move yocto jobs to build stage Stefano Stabellini
2023-02-17 14:38   ` Michal Orzel
2023-02-15 22:09 ` [PATCH v2 2/3] automation: add binaries/ to artifacts for Yocto arm32 job Stefano Stabellini
2023-02-17 14:46   ` Michal Orzel
2023-02-15 22:09 ` [PATCH v2 3/3] automation: expand arm32 dom0 test adding xl domain creation Stefano Stabellini
2023-02-17 15:07   ` Michal Orzel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).