All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/7] gitlab Qemu runtime testing
@ 2019-04-29 16:32 Jugurtha BELKALEM
  2019-04-29 16:32 ` [Buildroot] [PATCH 1/7] support/docker/Dockerfile: new package expect Jugurtha BELKALEM
                   ` (6 more replies)
  0 siblings, 7 replies; 21+ messages in thread
From: Jugurtha BELKALEM @ 2019-04-29 16:32 UTC (permalink / raw)
  To: buildroot

The tests that have been performed resulted in:
- 23 architectures passing the test.
- 12 architectures that failed the test.
More investigations need to be made for
architectures that did not pass the test.

special notes for :
- m64k_q800 has been blacklisted (as there is
no qemu support for it).
- sparc64 does not find a qemu shell.
- x86 and x86_64 do not boot properly (timeout).
- qemu ork1 and xtensa do not even compile.

Jugurtha BELKALEM (7):
  support/docker/Dockerfile: new package expect
  package/qemu: enable nios2 support for host-qemu
  package/qemu: enable sparc64 support for host-qemu
  package/qemu: remove comment about sh64
  configs/qemu-*: add host-qemu-system
  support/scripts/qemu-boot: gitlab tests for Qemu
  gitlab.yml.in: enable Qemu gitlab testing

 .gitlab-ci.yml                                |  3 +++
 .gitlab-ci.yml.in                             |  3 +++
 configs/qemu_aarch64_virt_defconfig           |  4 +++
 configs/qemu_arm_versatile_defconfig          |  4 +++
 configs/qemu_arm_versatile_nommu_defconfig    |  4 +++
 configs/qemu_arm_vexpress_defconfig           |  4 +++
 configs/qemu_m68k_mcf5208_defconfig           |  4 +++
 configs/qemu_m68k_q800_defconfig              |  4 +++
 configs/qemu_microblazebe_mmu_defconfig       |  4 +++
 configs/qemu_microblazeel_mmu_defconfig       |  4 +++
 configs/qemu_mips32r2_malta_defconfig         |  4 +++
 configs/qemu_mips32r2el_malta_defconfig       |  4 +++
 configs/qemu_mips32r6_malta_defconfig         |  4 +++
 configs/qemu_mips32r6el_malta_defconfig       |  4 +++
 configs/qemu_mips64_malta_defconfig           |  4 +++
 configs/qemu_mips64el_malta_defconfig         |  4 +++
 configs/qemu_mips64r6_malta_defconfig         |  4 +++
 configs/qemu_mips64r6el_malta_defconfig       |  4 +++
 configs/qemu_nios2_10m50_defconfig            |  4 +++
 configs/qemu_or1k_defconfig                   |  4 +++
 configs/qemu_ppc64_e5500_defconfig            |  4 +++
 configs/qemu_ppc64_pseries_defconfig          |  4 +++
 configs/qemu_ppc64le_pseries_defconfig        |  4 +++
 configs/qemu_ppc_g3beige_defconfig            |  4 +++
 configs/qemu_ppc_mpc8544ds_defconfig          |  4 +++
 configs/qemu_ppc_virtex_ml507_defconfig       |  4 +++
 configs/qemu_riscv32_virt_defconfig           |  4 +++
 configs/qemu_riscv64_virt_defconfig           |  4 +++
 configs/qemu_sh4_r2d_defconfig                |  4 +++
 configs/qemu_sh4eb_r2d_defconfig              |  4 +++
 configs/qemu_sparc64_sun4u_defconfig          |  4 +++
 configs/qemu_sparc_ss10_defconfig             |  4 +++
 configs/qemu_x86_64_defconfig                 |  4 +++
 configs/qemu_x86_defconfig                    |  4 +++
 configs/qemu_xtensa_lx60_defconfig            |  4 +++
 configs/qemu_xtensa_lx60_nommu_defconfig      |  4 +++
 package/qemu/Config.in.host                   |  2 ++
 package/qemu/qemu.mk                          |  3 ++-
 support/docker/Dockerfile                     |  1 +
 support/scripts/expect.sh                     | 22 +++++++++++++++++
 support/scripts/qemu-boot-checker.sh          | 35 +++++++++++++++++++++++++++
 support/scripts/qemu-boot-defconfig_config.sh | 11 +++++++++
 42 files changed, 215 insertions(+), 1 deletion(-)
 create mode 100755 support/scripts/expect.sh
 create mode 100755 support/scripts/qemu-boot-checker.sh
 create mode 100755 support/scripts/qemu-boot-defconfig_config.sh

-- 
2.7.4

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

* [Buildroot] [PATCH 1/7] support/docker/Dockerfile: new package expect
  2019-04-29 16:32 [Buildroot] [PATCH 0/7] gitlab Qemu runtime testing Jugurtha BELKALEM
@ 2019-04-29 16:32 ` Jugurtha BELKALEM
  2019-04-29 20:49   ` Arnout Vandecappelle
  2019-04-29 16:32 ` [Buildroot] [PATCH 2/7] package/qemu: enable nios2 support for host-qemu Jugurtha BELKALEM
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 21+ messages in thread
From: Jugurtha BELKALEM @ 2019-04-29 16:32 UTC (permalink / raw)
  To: buildroot

expect package is required for various automation tests.
One use case is to integrate the script from toolchain builder :
https://github.com/bootlin/toolchains-builder/blob/master/build.sh
to check Qemu build states.
expect can be used to launch a qemu machine for a given
architecture (x86, x86_64, mips, arm, sparc, nios2, ..., etc),
send root password,  wait for login and then perform shutdown.

Special note concerning python-pexpect package which can be
used for the same task: After testing the package, We
have noticed that it does not show the automation process
correcly (you may not even see the message welcome to buildroot)
and it is not verbose when errors are encountered.

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
v2: reorder alphabetically
    Remove m68k kernel issue, since we use kernel 4.19 with qemu
    m68k defconfig. The patch fixing the issue was merged in
    kernel 4.17.
---
 support/docker/Dockerfile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile
index 36cd3b2..8dcd3ef 100644
--- a/support/docker/Dockerfile
+++ b/support/docker/Dockerfile
@@ -29,6 +29,7 @@ RUN apt-get install -y --no-install-recommends \
         cmake \
         cpio \
         cvs \
+        expect \
         file \
         g++-multilib \
         git \
-- 
2.7.4

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

* [Buildroot] [PATCH 2/7] package/qemu: enable nios2 support for host-qemu
  2019-04-29 16:32 [Buildroot] [PATCH 0/7] gitlab Qemu runtime testing Jugurtha BELKALEM
  2019-04-29 16:32 ` [Buildroot] [PATCH 1/7] support/docker/Dockerfile: new package expect Jugurtha BELKALEM
@ 2019-04-29 16:32 ` Jugurtha BELKALEM
  2019-04-29 16:32 ` [Buildroot] [PATCH 3/7] package/qemu: enable sparc64 " Jugurtha BELKALEM
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 21+ messages in thread
From: Jugurtha BELKALEM @ 2019-04-29 16:32 UTC (permalink / raw)
  To: buildroot

This config enable host eqmu support for nios2 which
allows to test this architecture in gitlab.

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
 package/qemu/Config.in.host | 1 +
 package/qemu/qemu.mk        | 1 +
 2 files changed, 2 insertions(+)

diff --git a/package/qemu/Config.in.host b/package/qemu/Config.in.host
index 8a0df38..160725d 100644
--- a/package/qemu/Config.in.host
+++ b/package/qemu/Config.in.host
@@ -9,6 +9,7 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
 	default y if BR2_microblazebe
 	default y if BR2_mips
 	default y if BR2_mipsel
+	default y if BR2_nios2
 	default y if BR2_powerpc
 	default y if BR2_powerpc64
 	default y if BR2_powerpc64le
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 19bcafa..e82d372 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -172,6 +172,7 @@ HOST_QEMU_DEPENDENCIES = host-pkgconf host-zlib host-libglib2 host-pixman
 #       mipsel          mipsel
 #       mips64          mips64
 #       mips64el        mips64el
+#       nios2           nios2
 #       powerpc         ppc
 #       powerpc64       ppc64
 #       powerpc64le     ppc64 (system) / ppc64le (usermode)
-- 
2.7.4

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

* [Buildroot] [PATCH 3/7] package/qemu: enable sparc64 support for host-qemu
  2019-04-29 16:32 [Buildroot] [PATCH 0/7] gitlab Qemu runtime testing Jugurtha BELKALEM
  2019-04-29 16:32 ` [Buildroot] [PATCH 1/7] support/docker/Dockerfile: new package expect Jugurtha BELKALEM
  2019-04-29 16:32 ` [Buildroot] [PATCH 2/7] package/qemu: enable nios2 support for host-qemu Jugurtha BELKALEM
@ 2019-04-29 16:32 ` Jugurtha BELKALEM
  2019-04-29 16:32 ` [Buildroot] [PATCH 4/7] package/qemu: remove comment about sh64 Jugurtha BELKALEM
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 21+ messages in thread
From: Jugurtha BELKALEM @ 2019-04-29 16:32 UTC (permalink / raw)
  To: buildroot

This config enable host eqmu support for sparc64 which
allows to test this architecture in gitlab.

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
 package/qemu/Config.in.host | 1 +
 package/qemu/qemu.mk        | 1 +
 2 files changed, 2 insertions(+)

diff --git a/package/qemu/Config.in.host b/package/qemu/Config.in.host
index 160725d..ea80d6f 100644
--- a/package/qemu/Config.in.host
+++ b/package/qemu/Config.in.host
@@ -16,6 +16,7 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
 	default y if BR2_riscv
 	default y if BR2_sh
 	default y if BR2_sparc
+	default y if BR2_sparc64
 	default y if BR2_x86_64
 	depends on !BR2_powerpc_620 && !BR2_powerpc_630 && !BR2_powerpc_970
 
diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index e82d372..b509472 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -183,6 +183,7 @@ HOST_QEMU_DEPENDENCIES = host-pkgconf host-zlib host-libglib2 host-pixman
 #       sh4aeb          sh4eb
 #       sh64            not supported
 #       sparc           sparc
+#       sparc64         sparc64
 
 HOST_QEMU_ARCH = $(ARCH)
 ifeq ($(HOST_QEMU_ARCH),i486)
-- 
2.7.4

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

* [Buildroot] [PATCH 4/7] package/qemu: remove comment about sh64
  2019-04-29 16:32 [Buildroot] [PATCH 0/7] gitlab Qemu runtime testing Jugurtha BELKALEM
                   ` (2 preceding siblings ...)
  2019-04-29 16:32 ` [Buildroot] [PATCH 3/7] package/qemu: enable sparc64 " Jugurtha BELKALEM
@ 2019-04-29 16:32 ` Jugurtha BELKALEM
  2019-04-29 16:32 ` [Buildroot] [PATCH 5/7] configs/qemu-*: add host-qemu-system Jugurtha BELKALEM
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 21+ messages in thread
From: Jugurtha BELKALEM @ 2019-04-29 16:32 UTC (permalink / raw)
  To: buildroot

sh64 has been removed since commit [1]:

[1] 4338a319b72570e433fd7484f8a95e1e0e978941

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
 package/qemu/qemu.mk | 1 -
 1 file changed, 1 deletion(-)

diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index b509472..0dfb928 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -181,7 +181,6 @@ HOST_QEMU_DEPENDENCIES = host-pkgconf host-zlib host-libglib2 host-pixman
 #       sh4eb           sh4eb
 #       sh4a            sh4
 #       sh4aeb          sh4eb
-#       sh64            not supported
 #       sparc           sparc
 #       sparc64         sparc64
 
-- 
2.7.4

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

* [Buildroot] [PATCH 5/7] configs/qemu-*: add host-qemu-system
  2019-04-29 16:32 [Buildroot] [PATCH 0/7] gitlab Qemu runtime testing Jugurtha BELKALEM
                   ` (3 preceding siblings ...)
  2019-04-29 16:32 ` [Buildroot] [PATCH 4/7] package/qemu: remove comment about sh64 Jugurtha BELKALEM
@ 2019-04-29 16:32 ` Jugurtha BELKALEM
  2019-04-29 16:32 ` [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu Jugurtha BELKALEM
  2019-04-29 16:32 ` [Buildroot] [PATCH 7/7] gitlab.yml.in: enable Qemu gitlab testing Jugurtha BELKALEM
  6 siblings, 0 replies; 21+ messages in thread
From: Jugurtha BELKALEM @ 2019-04-29 16:32 UTC (permalink / raw)
  To: buildroot

Such config allows to setup gitlab tests for various
qemu architectures (x86, mips, nios2, microblaze, ..., etc)
using the same Qemu version.

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
 configs/qemu_aarch64_virt_defconfig        | 4 ++++
 configs/qemu_arm_versatile_defconfig       | 4 ++++
 configs/qemu_arm_versatile_nommu_defconfig | 4 ++++
 configs/qemu_arm_vexpress_defconfig        | 4 ++++
 configs/qemu_m68k_mcf5208_defconfig        | 4 ++++
 configs/qemu_m68k_q800_defconfig           | 4 ++++
 configs/qemu_microblazebe_mmu_defconfig    | 4 ++++
 configs/qemu_microblazeel_mmu_defconfig    | 4 ++++
 configs/qemu_mips32r2_malta_defconfig      | 4 ++++
 configs/qemu_mips32r2el_malta_defconfig    | 4 ++++
 configs/qemu_mips32r6_malta_defconfig      | 4 ++++
 configs/qemu_mips32r6el_malta_defconfig    | 4 ++++
 configs/qemu_mips64_malta_defconfig        | 4 ++++
 configs/qemu_mips64el_malta_defconfig      | 4 ++++
 configs/qemu_mips64r6_malta_defconfig      | 4 ++++
 configs/qemu_mips64r6el_malta_defconfig    | 4 ++++
 configs/qemu_nios2_10m50_defconfig         | 4 ++++
 configs/qemu_or1k_defconfig                | 4 ++++
 configs/qemu_ppc64_e5500_defconfig         | 4 ++++
 configs/qemu_ppc64_pseries_defconfig       | 4 ++++
 configs/qemu_ppc64le_pseries_defconfig     | 4 ++++
 configs/qemu_ppc_g3beige_defconfig         | 4 ++++
 configs/qemu_ppc_mpc8544ds_defconfig       | 4 ++++
 configs/qemu_ppc_virtex_ml507_defconfig    | 4 ++++
 configs/qemu_riscv32_virt_defconfig        | 4 ++++
 configs/qemu_riscv64_virt_defconfig        | 4 ++++
 configs/qemu_sh4_r2d_defconfig             | 4 ++++
 configs/qemu_sh4eb_r2d_defconfig           | 4 ++++
 configs/qemu_sparc64_sun4u_defconfig       | 4 ++++
 configs/qemu_sparc_ss10_defconfig          | 4 ++++
 configs/qemu_x86_64_defconfig              | 4 ++++
 configs/qemu_x86_defconfig                 | 4 ++++
 configs/qemu_xtensa_lx60_defconfig         | 4 ++++
 configs/qemu_xtensa_lx60_nommu_defconfig   | 4 ++++
 34 files changed, 136 insertions(+)

diff --git a/configs/qemu_aarch64_virt_defconfig b/configs/qemu_aarch64_virt_defconfig
index 638e18b..212d779 100644
--- a/configs/qemu_aarch64_virt_defconfig
+++ b/configs/qemu_aarch64_virt_defconfig
@@ -21,3 +21,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
 BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_arm_versatile_defconfig b/configs/qemu_arm_versatile_defconfig
index ce7cb5e..1194644 100644
--- a/configs/qemu_arm_versatile_defconfig
+++ b/configs/qemu_arm_versatile_defconfig
@@ -21,3 +21,7 @@ BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux.config"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="versatile-pb"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_arm_versatile_nommu_defconfig b/configs/qemu_arm_versatile_nommu_defconfig
index 81fb5b6..ae4353d 100644
--- a/configs/qemu_arm_versatile_nommu_defconfig
+++ b/configs/qemu_arm_versatile_nommu_defconfig
@@ -32,3 +32,7 @@ BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile/linux-nommu.config"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="versatile-pb"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_arm_vexpress_defconfig b/configs/qemu_arm_vexpress_defconfig
index 66f198a..e52a140 100644
--- a/configs/qemu_arm_vexpress_defconfig
+++ b/configs/qemu_arm_vexpress_defconfig
@@ -23,3 +23,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="vexpress"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca9"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_m68k_mcf5208_defconfig b/configs/qemu_m68k_mcf5208_defconfig
index 44fd918..4dde10b 100644
--- a/configs/qemu_m68k_mcf5208_defconfig
+++ b/configs/qemu_m68k_mcf5208_defconfig
@@ -26,3 +26,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 
 # use minimal busybox with hush and networking tools
 BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_m68k_q800_defconfig b/configs/qemu_m68k_q800_defconfig
index 0dd90a9..ce26443 100644
--- a/configs/qemu_m68k_q800_defconfig
+++ b/configs/qemu_m68k_q800_defconfig
@@ -23,3 +23,7 @@ BR2_LINUX_KERNEL_VMLINUX=y
 # Serial port config
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_microblazebe_mmu_defconfig b/configs/qemu_microblazebe_mmu_defconfig
index 95fdfed..022d2b7 100644
--- a/configs/qemu_microblazebe_mmu_defconfig
+++ b/configs/qemu_microblazebe_mmu_defconfig
@@ -21,3 +21,7 @@ BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/microblazebe-mmu/linux.config"
 BR2_LINUX_KERNEL_LINUX_BIN=y
 BR2_LINUX_KERNEL_PATCH="board/qemu/microblazebe-mmu/xilinx-xemaclite.patch"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_microblazeel_mmu_defconfig b/configs/qemu_microblazeel_mmu_defconfig
index 7400daf..fbe02ca 100644
--- a/configs/qemu_microblazeel_mmu_defconfig
+++ b/configs/qemu_microblazeel_mmu_defconfig
@@ -21,3 +21,7 @@ BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/microblazeel-mmu/linux.config"
 BR2_LINUX_KERNEL_LINUX_BIN=y
 BR2_LINUX_KERNEL_PATCH="board/qemu/microblazeel-mmu/xilinx-xemaclite.patch"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_mips32r2_malta_defconfig b/configs/qemu_mips32r2_malta_defconfig
index 0ee7a58..838a3d6 100644
--- a/configs/qemu_mips32r2_malta_defconfig
+++ b/configs/qemu_mips32r2_malta_defconfig
@@ -23,3 +23,7 @@ BR2_LINUX_KERNEL_VMLINUX=y
 # Serial port config
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_mips32r2el_malta_defconfig b/configs/qemu_mips32r2el_malta_defconfig
index 075088d..aaf3821 100644
--- a/configs/qemu_mips32r2el_malta_defconfig
+++ b/configs/qemu_mips32r2el_malta_defconfig
@@ -23,3 +23,7 @@ BR2_LINUX_KERNEL_VMLINUX=y
 # Serial port config
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_mips32r6_malta_defconfig b/configs/qemu_mips32r6_malta_defconfig
index b0bf94c..c480b69 100644
--- a/configs/qemu_mips32r6_malta_defconfig
+++ b/configs/qemu_mips32r6_malta_defconfig
@@ -27,3 +27,7 @@ BR2_GCC_VERSION_6_X=y
 # Serial port config
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_mips32r6el_malta_defconfig b/configs/qemu_mips32r6el_malta_defconfig
index 077d836..06f638e 100644
--- a/configs/qemu_mips32r6el_malta_defconfig
+++ b/configs/qemu_mips32r6el_malta_defconfig
@@ -27,3 +27,7 @@ BR2_GCC_VERSION_6_X=y
 # Serial port config
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_mips64_malta_defconfig b/configs/qemu_mips64_malta_defconfig
index 12502ea..20e368a 100644
--- a/configs/qemu_mips64_malta_defconfig
+++ b/configs/qemu_mips64_malta_defconfig
@@ -23,3 +23,7 @@ BR2_LINUX_KERNEL_VMLINUX=y
 # Serial port config
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_mips64el_malta_defconfig b/configs/qemu_mips64el_malta_defconfig
index 5ddb759..2ec2843 100644
--- a/configs/qemu_mips64el_malta_defconfig
+++ b/configs/qemu_mips64el_malta_defconfig
@@ -23,3 +23,7 @@ BR2_LINUX_KERNEL_VMLINUX=y
 # Serial port config
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_mips64r6_malta_defconfig b/configs/qemu_mips64r6_malta_defconfig
index bfa32f6..a614b4c 100644
--- a/configs/qemu_mips64r6_malta_defconfig
+++ b/configs/qemu_mips64r6_malta_defconfig
@@ -28,3 +28,7 @@ BR2_GCC_VERSION_6_X=y
 # Serial port config
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_mips64r6el_malta_defconfig b/configs/qemu_mips64r6el_malta_defconfig
index 2fd855d..d2b9e50 100644
--- a/configs/qemu_mips64r6el_malta_defconfig
+++ b/configs/qemu_mips64r6el_malta_defconfig
@@ -28,3 +28,7 @@ BR2_GCC_VERSION_6_X=y
 # Serial port config
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_nios2_10m50_defconfig b/configs/qemu_nios2_10m50_defconfig
index c07abc3..24573fc 100644
--- a/configs/qemu_nios2_10m50_defconfig
+++ b/configs/qemu_nios2_10m50_defconfig
@@ -11,3 +11,7 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
 
 # Kernel needs mkimage
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_or1k_defconfig b/configs/qemu_or1k_defconfig
index 3fc53f4..3d3fd53 100644
--- a/configs/qemu_or1k_defconfig
+++ b/configs/qemu_or1k_defconfig
@@ -14,3 +14,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/or1k/linux.config"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_ppc64_e5500_defconfig b/configs/qemu_ppc64_e5500_defconfig
index 59b8636..d5d6647 100644
--- a/configs/qemu_ppc64_e5500_defconfig
+++ b/configs/qemu_ppc64_e5500_defconfig
@@ -19,3 +19,7 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
 # Filesystem
 BR2_TARGET_ROOTFS_EXT2=y
 # BR2_TARGET_ROOTFS_TAR is not set
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_ppc64_pseries_defconfig b/configs/qemu_ppc64_pseries_defconfig
index 5f55b24..200c50d 100644
--- a/configs/qemu_ppc64_pseries_defconfig
+++ b/configs/qemu_ppc64_pseries_defconfig
@@ -19,3 +19,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="pseries"
 BR2_LINUX_KERNEL_VMLINUX=y
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_ppc64le_pseries_defconfig b/configs/qemu_ppc64le_pseries_defconfig
index 8356e4e..0eb3f11 100644
--- a/configs/qemu_ppc64le_pseries_defconfig
+++ b/configs/qemu_ppc64le_pseries_defconfig
@@ -19,3 +19,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="pseries_le"
 BR2_LINUX_KERNEL_VMLINUX=y
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_ppc_g3beige_defconfig b/configs/qemu_ppc_g3beige_defconfig
index 4b2f3ed..8034abc 100644
--- a/configs/qemu_ppc_g3beige_defconfig
+++ b/configs/qemu_ppc_g3beige_defconfig
@@ -23,3 +23,7 @@ BR2_LINUX_KERNEL_VMLINUX=y
 # Serial port config
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_ppc_mpc8544ds_defconfig b/configs/qemu_ppc_mpc8544ds_defconfig
index 98985b7..9a529ae 100644
--- a/configs/qemu_ppc_mpc8544ds_defconfig
+++ b/configs/qemu_ppc_mpc8544ds_defconfig
@@ -26,3 +26,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 
 # Kernel needs mkimage
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_ppc_virtex_ml507_defconfig b/configs/qemu_ppc_virtex_ml507_defconfig
index eddaf35..4b60675 100644
--- a/configs/qemu_ppc_virtex_ml507_defconfig
+++ b/configs/qemu_ppc_virtex_ml507_defconfig
@@ -24,3 +24,7 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="virtex440-ml507"
 
 # Kernel needs mkimage
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_riscv32_virt_defconfig b/configs/qemu_riscv32_virt_defconfig
index 84f7b6a..5a8e105 100644
--- a/configs/qemu_riscv32_virt_defconfig
+++ b/configs/qemu_riscv32_virt_defconfig
@@ -25,3 +25,7 @@ BR2_LINUX_KERNEL_IMAGE=y
 BR2_TARGET_OPENSBI=y
 BR2_TARGET_OPENSBI_USE_PLAT=y
 BR2_TARGET_OPENSBI_PLAT="qemu/virt"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_riscv64_virt_defconfig b/configs/qemu_riscv64_virt_defconfig
index 12afac4..9590c61 100644
--- a/configs/qemu_riscv64_virt_defconfig
+++ b/configs/qemu_riscv64_virt_defconfig
@@ -24,3 +24,7 @@ BR2_LINUX_KERNEL_IMAGE=y
 BR2_TARGET_OPENSBI=y
 BR2_TARGET_OPENSBI_USE_PLAT=y
 BR2_TARGET_OPENSBI_PLAT="qemu/virt"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_sh4_r2d_defconfig b/configs/qemu_sh4_r2d_defconfig
index e194d7e..ca7b25e 100644
--- a/configs/qemu_sh4_r2d_defconfig
+++ b/configs/qemu_sh4_r2d_defconfig
@@ -21,3 +21,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sh4-r2d/linux.config"
 BR2_LINUX_KERNEL_ZIMAGE=y
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_sh4eb_r2d_defconfig b/configs/qemu_sh4eb_r2d_defconfig
index f1aad8b..0664a08 100644
--- a/configs/qemu_sh4eb_r2d_defconfig
+++ b/configs/qemu_sh4eb_r2d_defconfig
@@ -20,3 +20,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sh4eb-r2d/linux.config"
 BR2_LINUX_KERNEL_ZIMAGE=y
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_sparc64_sun4u_defconfig b/configs/qemu_sparc64_sun4u_defconfig
index f4da2bc..70b4f13 100644
--- a/configs/qemu_sparc64_sun4u_defconfig
+++ b/configs/qemu_sparc64_sun4u_defconfig
@@ -18,3 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sparc64-sun4u/linux.config"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_sparc_ss10_defconfig b/configs/qemu_sparc_ss10_defconfig
index e027b73..23733d8 100644
--- a/configs/qemu_sparc_ss10_defconfig
+++ b/configs/qemu_sparc_ss10_defconfig
@@ -18,3 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/sparc-ss10/linux.config"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_x86_64_defconfig b/configs/qemu_x86_64_defconfig
index afa2396..c3c0991 100644
--- a/configs/qemu_x86_64_defconfig
+++ b/configs/qemu_x86_64_defconfig
@@ -18,3 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux.config"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_x86_defconfig b/configs/qemu_x86_defconfig
index 3441ad5..6d68b7d 100644
--- a/configs/qemu_x86_defconfig
+++ b/configs/qemu_x86_defconfig
@@ -19,3 +19,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86/linux.config"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_xtensa_lx60_defconfig b/configs/qemu_xtensa_lx60_defconfig
index 6bf48a2..f36b4fb 100644
--- a/configs/qemu_xtensa_lx60_defconfig
+++ b/configs/qemu_xtensa_lx60_defconfig
@@ -23,3 +23,7 @@ BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/xtensa-lx60/linux.config"
 BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
 BR2_LINUX_KERNEL_IMAGE_NAME="Image.elf"
 BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
diff --git a/configs/qemu_xtensa_lx60_nommu_defconfig b/configs/qemu_xtensa_lx60_nommu_defconfig
index 5ff9646..48746a9 100644
--- a/configs/qemu_xtensa_lx60_nommu_defconfig
+++ b/configs/qemu_xtensa_lx60_nommu_defconfig
@@ -27,3 +27,7 @@ BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/xtensa-lx60/linux-nommu.config"
 BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
 BR2_LINUX_KERNEL_IMAGE_NAME="Image.elf"
 BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
+
+# host-qemu for gitlab testing
+BR2_PACKAGE_HOST_QEMU=y
+BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
-- 
2.7.4

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

* [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu
  2019-04-29 16:32 [Buildroot] [PATCH 0/7] gitlab Qemu runtime testing Jugurtha BELKALEM
                   ` (4 preceding siblings ...)
  2019-04-29 16:32 ` [Buildroot] [PATCH 5/7] configs/qemu-*: add host-qemu-system Jugurtha BELKALEM
@ 2019-04-29 16:32 ` Jugurtha BELKALEM
  2019-04-29 22:31   ` Arnout Vandecappelle
  2019-04-29 16:32 ` [Buildroot] [PATCH 7/7] gitlab.yml.in: enable Qemu gitlab testing Jugurtha BELKALEM
  6 siblings, 1 reply; 21+ messages in thread
From: Jugurtha BELKALEM @ 2019-04-29 16:32 UTC (permalink / raw)
  To: buildroot

Enables to check various qemu architectures build states.
These scripts were inspired from toolchain builder :
https://github.com/bootlin/toolchains-builder/blob/master/build.sh
to test qemu's build process.
This allows to troubleshoot different issues that may be
associated with defective qemu builds by lanching a qemu machine,
sending root password, waiting for login shell and then perform
a shutdown.

The script expect.sh relies on expect package to automate
the tests.
We should mention that python-pexpect can be tweeked for the same
job but seems like it does hide the automation process as well
as any errors that may be encountered.

The script qemu-boot-defconfig_config.sh is required for
architectures that need special configuration before
starting compilation (like setting the correct tty).

On the other side, qemu-boot-checker.sh is used to read
the qemu command used to launch a qemu machine (by reading
board/qemu/qemu_architecture/readme.txt) as well as setting
the path to the qemu host and calling expect.sh.

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
 support/scripts/expect.sh                     | 22 +++++++++++++++++
 support/scripts/qemu-boot-checker.sh          | 35 +++++++++++++++++++++++++++
 support/scripts/qemu-boot-defconfig_config.sh | 11 +++++++++
 3 files changed, 68 insertions(+)
 create mode 100755 support/scripts/expect.sh
 create mode 100755 support/scripts/qemu-boot-checker.sh
 create mode 100755 support/scripts/qemu-boot-defconfig_config.sh

diff --git a/support/scripts/expect.sh b/support/scripts/expect.sh
new file mode 100755
index 0000000..6d65752
--- /dev/null
+++ b/support/scripts/expect.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/expect
+#
+
+set timeout 400
+
+log_file /tmp/expect_session.log
+
+eval spawn $env(QEMU_COMMAND)
+
+expect {
+    eof {puts "Connection problem, exiting."; exit 1}
+    timeout {puts "System did not boot in time, exiting."; exit 1}
+    "buildroot login:"
+}
+send "root\r"
+expect {
+    eof {puts "Connection problem, exiting."; exit 1}
+    timeout {puts "No shell, exiting."; exit 1}
+    "# "
+}
+send "poweroff\r"
+expect "System halted"
diff --git a/support/scripts/qemu-boot-checker.sh b/support/scripts/qemu-boot-checker.sh
new file mode 100755
index 0000000..f036516
--- /dev/null
+++ b/support/scripts/qemu-boot-checker.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+if [[ $1 = qemu* ]]; then
+  device_name=$(echo $1  | sed -e 's#^qemu_##; s#_defconfig$##;' | sed -r 's/[_]/-/g')
+  if [ $device_name == "x86-64" ]; then
+    device_name="x86_64"
+  elif [ $device_name == "xtensa-lx60" ] || [ $device_name == "xtensa-lx60-nommu" ]; then
+    echo "xtensa cannot be tested"
+    exit 0
+  elif [ $device_name == "m68k-q800" ] || [ $device_name == "ork1k" ]; then
+    archQemuNoSupport
+  fi
+
+  test_qemu_cmd="$(grep qemu-system $2/board/qemu/${device_name}/readme.txt)"
+  qemu_command="$(echo "${test_qemu_cmd}"|tr -d '\n')"
+
+  export QEMU_COMMAND="${qemu_command}"
+
+  export PATH="$2/output/host/bin:$PATH"
+  echo $PATH
+
+  function archQemuNoSupport {
+    echo "cannot boot under qemu, support out of tree!"
+    exit 0
+  }
+
+  function boot_test {
+    if ! expect expect.sh ; then
+      echo "  booting test system ... FAILED"
+      return 1
+    fi
+    echo "  booting test system ... SUCCESS"
+  }
+  boot_test
+fi
diff --git a/support/scripts/qemu-boot-defconfig_config.sh b/support/scripts/qemu-boot-defconfig_config.sh
new file mode 100755
index 0000000..526eee1
--- /dev/null
+++ b/support/scripts/qemu-boot-defconfig_config.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+if [[ $1 = qemu* ]]; then
+  device_name=$(echo $1  | sed -e 's#^qemu_##; s#_defconfig$##;' | sed -r 's/[_]/-/g') 
+  if [ $device_name == "x86-64" ]; then
+    device_name="x86_64"
+    sed -i "s/tty1/ttyS0/" $2/configs/$1
+  elif [ $device_name == "x86" ]; then
+    sed -i "s/tty1/ttyS0/" $2/configs/$1
+  fi
+fi
-- 
2.7.4

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

* [Buildroot] [PATCH 7/7] gitlab.yml.in: enable Qemu gitlab testing
  2019-04-29 16:32 [Buildroot] [PATCH 0/7] gitlab Qemu runtime testing Jugurtha BELKALEM
                   ` (5 preceding siblings ...)
  2019-04-29 16:32 ` [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu Jugurtha BELKALEM
@ 2019-04-29 16:32 ` Jugurtha BELKALEM
  2019-04-29 22:34   ` Arnout Vandecappelle
  6 siblings, 1 reply; 21+ messages in thread
From: Jugurtha BELKALEM @ 2019-04-29 16:32 UTC (permalink / raw)
  To: buildroot

Used to launch qemu tests for various qemu
architectures.
Neverthless to say that this file skips any other job
different from qemu (only qemu configurations are
runtime tested).

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
 .gitlab-ci.yml    | 3 +++
 .gitlab-ci.yml.in | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e9869be..5884716 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -37,6 +37,8 @@ check-package:
 .defconfig_script:
     script:
         - echo 'Configure Buildroot'
+        - main_dir=$(pwd)
+        - ./support/scripts/qemu-boot-defconfig_config.sh "${CI_JOB_NAME}" "${main_dir}"
         - make ${CI_JOB_NAME}
         - echo 'Build buildroot'
         - |
@@ -45,6 +47,7 @@ check-package:
                 tail -200 build.log
                 exit 1
             }
+        - ./support/scripts/qemu-boot-checker.sh "${CI_JOB_NAME}" "${main_dir}"
 
 .defconfig:
     extends: .defconfig_script
diff --git a/.gitlab-ci.yml.in b/.gitlab-ci.yml.in
index ad61643..ac5ba57 100644
--- a/.gitlab-ci.yml.in
+++ b/.gitlab-ci.yml.in
@@ -37,6 +37,8 @@ check-package:
 .defconfig_script:
     script:
         - echo 'Configure Buildroot'
+        - main_dir=$(pwd)
+        - ./support/scripts/qemu-boot-defconfig_config.sh "${CI_JOB_NAME}" "${main_dir}"
         - make ${CI_JOB_NAME}
         - echo 'Build buildroot'
         - |
@@ -45,6 +47,7 @@ check-package:
                 tail -200 build.log
                 exit 1
             }
+        - ./support/scripts/qemu-boot-checker.sh "${CI_JOB_NAME}" "${main_dir}"
 
 .defconfig:
     extends: .defconfig_script
-- 
2.7.4

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

* [Buildroot] [PATCH 1/7] support/docker/Dockerfile: new package expect
  2019-04-29 16:32 ` [Buildroot] [PATCH 1/7] support/docker/Dockerfile: new package expect Jugurtha BELKALEM
@ 2019-04-29 20:49   ` Arnout Vandecappelle
  0 siblings, 0 replies; 21+ messages in thread
From: Arnout Vandecappelle @ 2019-04-29 20:49 UTC (permalink / raw)
  To: buildroot



On 29/04/2019 18:32, Jugurtha BELKALEM wrote:
> Special note concerning python-pexpect package which can be
> used for the same task: After testing the package, We
> have noticed that it does not show the automation process
> correcly (you may not even see the message welcome to buildroot)
> and it is not verbose when errors are encountered.

 Could you expand on this a little? We've been using pexpect (both fdpexpect and
pxssh) very successfully for our testing project. Admittedly, we only use
Python3 so maybe that's where the problem is.

 Clearly, for this simple use case it should be acceptable to use tk-expect
(even though I expect hardly anyone under the age of 40 to still know about it
:-). But if we're going to reuse the same approach for other tests as well, we
might benefit from a more powerful and python-integrated package.

 Regards,
 Arnout

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

* [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu
  2019-04-29 16:32 ` [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu Jugurtha BELKALEM
@ 2019-04-29 22:31   ` Arnout Vandecappelle
  2019-04-29 23:38     ` Max Filippov
  0 siblings, 1 reply; 21+ messages in thread
From: Arnout Vandecappelle @ 2019-04-29 22:31 UTC (permalink / raw)
  To: buildroot

 Hi Jugurtha,

 Thank you for this. It is certainly useful! I have a few comments though.

On 29/04/2019 18:32, Jugurtha BELKALEM wrote:
> Enables to check various qemu architectures build states.
> These scripts were inspired from toolchain builder :
> https://github.com/bootlin/toolchains-builder/blob/master/build.sh
> to test qemu's build process.
> This allows to troubleshoot different issues that may be
> associated with defective qemu builds by lanching a qemu machine,
> sending root password, waiting for login shell and then perform
> a shutdown.
> 
> The script expect.sh relies on expect package to automate
> the tests.
> We should mention that python-pexpect can be tweeked for the same
> job but seems like it does hide the automation process as well
> as any errors that may be encountered.
> 
> The script qemu-boot-defconfig_config.sh is required for
> architectures that need special configuration before
> starting compilation (like setting the correct tty).
> 
> On the other side, qemu-boot-checker.sh is used to read
> the qemu command used to launch a qemu machine (by reading
> board/qemu/qemu_architecture/readme.txt) as well as setting
> the path to the qemu host and calling expect.sh.
> 
> Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
> ---
>  support/scripts/expect.sh                     | 22 +++++++++++++++++
>  support/scripts/qemu-boot-checker.sh          | 35 +++++++++++++++++++++++++++
>  support/scripts/qemu-boot-defconfig_config.sh | 11 +++++++++
>  3 files changed, 68 insertions(+)
>  create mode 100755 support/scripts/expect.sh
>  create mode 100755 support/scripts/qemu-boot-checker.sh
>  create mode 100755 support/scripts/qemu-boot-defconfig_config.sh
> 
> diff --git a/support/scripts/expect.sh b/support/scripts/expect.sh
> new file mode 100755
> index 0000000..6d65752
> --- /dev/null
> +++ b/support/scripts/expect.sh
> @@ -0,0 +1,22 @@
> +#!/usr/bin/expect
> +#
> +
> +set timeout 400
> +
> +log_file /tmp/expect_session.log
> +
> +eval spawn $env(QEMU_COMMAND)
> +
> +expect {
> +    eof {puts "Connection problem, exiting."; exit 1}
> +    timeout {puts "System did not boot in time, exiting."; exit 1}
> +    "buildroot login:"
> +}
> +send "root\r"
> +expect {
> +    eof {puts "Connection problem, exiting."; exit 1}
> +    timeout {puts "No shell, exiting."; exit 1}

 Here, the timeout should be *much* smaller than 400. Like, 2-3 seconds is more
appropriate.

> +    "# "
> +}
> +send "poweroff\r"
> +expect "System halted"

 Can we also have an expectation that the spawned command exits here?

> diff --git a/support/scripts/qemu-boot-checker.sh b/support/scripts/qemu-boot-checker.sh
> new file mode 100755
> index 0000000..f036516
> --- /dev/null
> +++ b/support/scripts/qemu-boot-checker.sh
> @@ -0,0 +1,35 @@
> +#!/bin/bash
> +
> +if [[ $1 = qemu* ]]; then
> +  device_name=$(echo $1  | sed -e 's#^qemu_##; s#_defconfig$##;' | sed -r 's/[_]/-/g')

 We don't really have consistent indentation in shell scripts, but it's either 4
spaces or one tab. I prefer one tab myself.

> +  if [ $device_name == "x86-64" ]; then
> +    device_name="x86_64"

 We should find a better way of handling this. E.g., renaming the directory to
x86-64 :-)

> +  elif [ $device_name == "xtensa-lx60" ] || [ $device_name == "xtensa-lx60-nommu" ]; then
> +    echo "xtensa cannot be tested"

 If that is the case, why do we even have these qemu defconfigs? Max?


> +    exit 0
> +  elif [ $device_name == "m68k-q800" ] || [ $device_name == "ork1k" ]; then
                                                                ^^^^^or1k
> +    archQemuNoSupport
 In that case, no qemu can be built, so I think it's better to just check for
the presence of the qemu binary.

> +  fi
> +
> +  test_qemu_cmd="$(grep qemu-system $2/board/qemu/${device_name}/readme.txt)"
> +  qemu_command="$(echo "${test_qemu_cmd}"|tr -d '\n')"

 Instead of screenscraping this from the readme, I'd much prefer to rewrite it
so it can be called directly. E.g. for each defconfig have a launch command.

 It might even make sense to have the launch command in
package/qemu/Config.in.host so it is part of the defconfig, and then have some
way (e.g. utils/launch-qemu.sh) to launch it.

 But for now, I'd already be happy with board/qemu/*/launch.sh.


> +
> +  export QEMU_COMMAND="${qemu_command}"
> +
> +  export PATH="$2/output/host/bin:$PATH"
> +  echo $PATH
> +
> +  function archQemuNoSupport {

 These functions should be declared before the main functionality of the script.

> +    echo "cannot boot under qemu, support out of tree!"
> +    exit 0
> +  }
> +
> +  function boot_test {
> +    if ! expect expect.sh ; then
> +      echo "  booting test system ... FAILED"
> +      return 1
> +    fi
> +    echo "  booting test system ... SUCCESS"
> +  }
> +  boot_test

 IMO it doesn't make much sense to define a function and then immediately call
it. So you could just do:

	printf "  booting test system ... "
	if ! expect expect.sh ; then
		echo "FAILED"
		exit 1
	fi
	echo "SUCCESS"


 Also, the output of the spawned qemu should be logged somewhere, and that log
file should be a gitlab-ci artifact.

> +fi
> diff --git a/support/scripts/qemu-boot-defconfig_config.sh b/support/scripts/qemu-boot-defconfig_config.sh
> new file mode 100755
> index 0000000..526eee1
> --- /dev/null
> +++ b/support/scripts/qemu-boot-defconfig_config.sh
> @@ -0,0 +1,11 @@
> +#!/bin/bash
> +
> +if [[ $1 = qemu* ]]; then
> +  device_name=$(echo $1  | sed -e 's#^qemu_##; s#_defconfig$##;' | sed -r 's/[_]/-/g') 
> +  if [ $device_name == "x86-64" ]; then
> +    device_name="x86_64"
> +    sed -i "s/tty1/ttyS0/" $2/configs/$1
> +  elif [ $device_name == "x86" ]; then
> +    sed -i "s/tty1/ttyS0/" $2/configs/$1

 This sucks. I think we can just remove BR2_TARGET_GENERIC_GETTY_PORT from these
defconfigs and rely on the console (and make sure the console is set correctly
in the append argument of qemu).

 Regards,
 Arnout


> +  fi
> +fi
> 

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

* [Buildroot] [PATCH 7/7] gitlab.yml.in: enable Qemu gitlab testing
  2019-04-29 16:32 ` [Buildroot] [PATCH 7/7] gitlab.yml.in: enable Qemu gitlab testing Jugurtha BELKALEM
@ 2019-04-29 22:34   ` Arnout Vandecappelle
  0 siblings, 0 replies; 21+ messages in thread
From: Arnout Vandecappelle @ 2019-04-29 22:34 UTC (permalink / raw)
  To: buildroot



On 29/04/2019 18:32, Jugurtha BELKALEM wrote:
> Used to launch qemu tests for various qemu
> architectures.
> Neverthless to say that this file skips any other job
> different from qemu (only qemu configurations are
> runtime tested).
> 
> Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
> ---
>  .gitlab-ci.yml    | 3 +++
>  .gitlab-ci.yml.in | 3 +++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index e9869be..5884716 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -37,6 +37,8 @@ check-package:
>  .defconfig_script:
>      script:
>          - echo 'Configure Buildroot'
> +        - main_dir=$(pwd)
> +        - ./support/scripts/qemu-boot-defconfig_config.sh "${CI_JOB_NAME}" "${main_dir}"

 ${main_dir} is still the current directory when the script is called, so it's
not needed to pass it as an argument.

>          - make ${CI_JOB_NAME}
>          - echo 'Build buildroot'
>          - |
> @@ -45,6 +47,7 @@ check-package:
>                  tail -200 build.log
>                  exit 1
>              }
> +        - ./support/scripts/qemu-boot-checker.sh "${CI_JOB_NAME}" "${main_dir}"

 Instead of calling this unconditionally for each defconfig, I'd prefer this to
be in a pipeline, i.e. the qemu run is done in a separate job and only if the
corresponding build was successful. But it will take some getting familiar with
gitlab-ci to get that correct, so this idea may be a little too ambitious.


 Regards,
 Arnout

>  
>  .defconfig:
>      extends: .defconfig_script
> diff --git a/.gitlab-ci.yml.in b/.gitlab-ci.yml.in
> index ad61643..ac5ba57 100644
> --- a/.gitlab-ci.yml.in
> +++ b/.gitlab-ci.yml.in
> @@ -37,6 +37,8 @@ check-package:
>  .defconfig_script:
>      script:
>          - echo 'Configure Buildroot'
> +        - main_dir=$(pwd)
> +        - ./support/scripts/qemu-boot-defconfig_config.sh "${CI_JOB_NAME}" "${main_dir}"
>          - make ${CI_JOB_NAME}
>          - echo 'Build buildroot'
>          - |
> @@ -45,6 +47,7 @@ check-package:
>                  tail -200 build.log
>                  exit 1
>              }
> +        - ./support/scripts/qemu-boot-checker.sh "${CI_JOB_NAME}" "${main_dir}"
>  
>  .defconfig:
>      extends: .defconfig_script
> 

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

* [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu
  2019-04-29 22:31   ` Arnout Vandecappelle
@ 2019-04-29 23:38     ` Max Filippov
  2019-04-30  8:54       ` Jugurtha BELKALEM
  0 siblings, 1 reply; 21+ messages in thread
From: Max Filippov @ 2019-04-29 23:38 UTC (permalink / raw)
  To: buildroot

On Mon, Apr 29, 2019 at 3:32 PM Arnout Vandecappelle <arnout@mind.be> wrote:
> > +  elif [ $device_name == "xtensa-lx60" ] || [ $device_name == "xtensa-lx60-nommu" ]; then
> > +    echo "xtensa cannot be tested"
>
>  If that is the case, why do we even have these qemu defconfigs? Max?

Tested both configurations just now, with the current buildroot tip
(2019.02-959-gd54b0e22aef3) and QEMU-4.0. Both build and boot for me
with QEMU command line from the readme.
Curious as well.

-- 
Thanks.
-- Max

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

* [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu
  2019-04-29 23:38     ` Max Filippov
@ 2019-04-30  8:54       ` Jugurtha BELKALEM
  2019-04-30 11:20         ` Arnout Vandecappelle
  0 siblings, 1 reply; 21+ messages in thread
From: Jugurtha BELKALEM @ 2019-04-30  8:54 UTC (permalink / raw)
  To: buildroot

Thank you for you comments Arnout, I have corrected the indentation,
timeout and  function declaration issues.

However; I think that duplicating the content of readme.txt of each qemu
architecture would be difficult to maintain (even if it is more convenient
to use), this is why a project like toolchain builder :
https://github.com/bootlin/toolchains-builder/blob/master/build.sh is
reading directly from readme.txt.
Concerning the naming of x86_64 folder in board/qemu, it is the only one
that uses underscore instead of hyphen. Changing the directory name may
cause issues with other works as maybe other scripts as relying on this
name (especially that it exists since a long time ago).

I want to thank you also Max for your answer (We need to investigate more).

Regards.

On Tue, Apr 30, 2019 at 1:38 AM Max Filippov <jcmvbkbc@gmail.com> wrote:

> On Mon, Apr 29, 2019 at 3:32 PM Arnout Vandecappelle <arnout@mind.be>
> wrote:
> > > +  elif [ $device_name == "xtensa-lx60" ] || [ $device_name ==
> "xtensa-lx60-nommu" ]; then
> > > +    echo "xtensa cannot be tested"
> >
> >  If that is the case, why do we even have these qemu defconfigs? Max?
>
> Tested both configurations just now, with the current buildroot tip
> (2019.02-959-gd54b0e22aef3) and QEMU-4.0. Both build and boot for me
> with QEMU command line from the readme.
> Curious as well.
>
> --
> Thanks.
> -- Max
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190430/cf1acc4c/attachment.html>

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

* [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu
  2019-04-30  8:54       ` Jugurtha BELKALEM
@ 2019-04-30 11:20         ` Arnout Vandecappelle
  2019-04-30 15:40           ` Max Filippov
  2019-04-30 19:40           ` Yann E. MORIN
  0 siblings, 2 replies; 21+ messages in thread
From: Arnout Vandecappelle @ 2019-04-30 11:20 UTC (permalink / raw)
  To: buildroot

 Hi Jugurtha,

 [Please don't top-post, but reply inline like I do below.]

On 30/04/2019 10:54, Jugurtha BELKALEM wrote:
> Thank you for you comments Arnout, I have corrected the indentation, timeout
> and? function declaration issues.
> 
> However; I think that duplicating the content of readme.txt of each qemu
> architecture would be difficult to maintain (even if it is more convenient to
> use), this is why a project like toolchain builder :
> https://github.com/bootlin/toolchains-builder/blob/master/build.sh is reading
> directly from readme.txt.

 The idea would not be to duplicate it, but to move it. I.e., readme.txt just
says "launch with board/qemu/x86_64/launch.sh", and the actual command is in
that shell script.

 But maybe we should see what other Buildroot maintainers have to say about it.
Thomas, Peter, Yann, Romain?

> Concerning the naming of x86_64 folder in board/qemu, it is the only one that
> uses underscore instead of hyphen. Changing the directory name may cause issues
> with other works as maybe other scripts as relying on this name (especially that
> it exists since a long time ago).

 OK, true. Let's keep that like you have it then.


> I want to thank you also Max for your answer (We need to investigate more).

 If it doesn't work on gitlab-ci, I would just not enable the build of host-qemu
for those (and put some intelligence in the script that it only runs if
host-qemu has been built).


> On Tue, Apr 30, 2019 at 1:38 AM Max Filippov <jcmvbkbc@gmail.com
> <mailto:jcmvbkbc@gmail.com>> wrote:
> 
>     On Mon, Apr 29, 2019 at 3:32 PM Arnout Vandecappelle <arnout@mind.be
>     <mailto:arnout@mind.be>> wrote:
>     > > +? elif [ $device_name == "xtensa-lx60" ] || [ $device_name ==
>     "xtensa-lx60-nommu" ]; then
>     > > +? ? echo "xtensa cannot be tested"
>     >
>     >? If that is the case, why do we even have these qemu defconfigs? Max?
> 
>     Tested both configurations just now, with the current buildroot tip
>     (2019.02-959-gd54b0e22aef3) and QEMU-4.0. Both build and boot for me
>     with QEMU command line from the readme.

 Is this with the system-intalled qemu? I guess so, because Buildroot still has
3.1.0... That might be the issue :-)

 Regards,
 Arnout

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

* [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu
  2019-04-30 11:20         ` Arnout Vandecappelle
@ 2019-04-30 15:40           ` Max Filippov
  2019-04-30 19:40           ` Yann E. MORIN
  1 sibling, 0 replies; 21+ messages in thread
From: Max Filippov @ 2019-04-30 15:40 UTC (permalink / raw)
  To: buildroot

On Tue, Apr 30, 2019 at 4:20 AM Arnout Vandecappelle <arnout@mind.be> wrote:
> >     >  If that is the case, why do we even have these qemu defconfigs? Max?
> >
> >     Tested both configurations just now, with the current buildroot tip
> >     (2019.02-959-gd54b0e22aef3) and QEMU-4.0. Both build and boot for me
> >     with QEMU command line from the readme.
>
>  Is this with the system-intalled qemu? I guess so, because Buildroot still has
> 3.1.0... That might be the issue :-)

Just tested with that version of QEMU... Both work as expected here.
Still puzzled (:

-- 
Thanks.
-- Max

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

* [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu
  2019-04-30 11:20         ` Arnout Vandecappelle
  2019-04-30 15:40           ` Max Filippov
@ 2019-04-30 19:40           ` Yann E. MORIN
  2019-04-30 19:56             ` Yann E. MORIN
  2019-05-01  9:35             ` Arnout Vandecappelle
  1 sibling, 2 replies; 21+ messages in thread
From: Yann E. MORIN @ 2019-04-30 19:40 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2019-04-30 13:20 +0200, Arnout Vandecappelle spake thusly:
> On 30/04/2019 10:54, Jugurtha BELKALEM wrote:
> > Thank you for you comments Arnout, I have corrected the indentation, timeout
> > and? function declaration issues.
> > 
> > However; I think that duplicating the content of readme.txt of each qemu
> > architecture would be difficult to maintain (even if it is more convenient to
> > use), this is why a project like toolchain builder :
> > https://github.com/bootlin/toolchains-builder/blob/master/build.sh is reading
> > directly from readme.txt.
> 
>  The idea would not be to duplicate it, but to move it. I.e., readme.txt just
> says "launch with board/qemu/x86_64/launch.sh", and the actual command is in
> that shell script.
> 
>  But maybe we should see what other Buildroot maintainers have to say about it.
> Thomas, Peter, Yann, Romain?

Ideally, I'd go without the readme.txt altogether, or if we want to keep
"backward compatibility", we'd make it a symlink to launch.sh.

Snf then, launch.sh would be an actual shell script that also contains
the readme (possibly as -h).

> >     > > +? elif [ $device_name == "xtensa-lx60" ] || [ $device_name ==
> >     "xtensa-lx60-nommu" ]; then
> >     > > +? ? echo "xtensa cannot be tested"
> >     >? If that is the case, why do we even have these qemu defconfigs? Max?
> >     Tested both configurations just now, with the current buildroot tip
> >     (2019.02-959-gd54b0e22aef3) and QEMU-4.0. Both build and boot for me
> >     with QEMU command line from the readme.
>  Is this with the system-intalled qemu? I guess so, because Buildroot still has
> 3.1.0... That might be the issue :-)

I've started a test-build ehre, to check.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu
  2019-04-30 19:40           ` Yann E. MORIN
@ 2019-04-30 19:56             ` Yann E. MORIN
  2019-04-30 20:09               ` Max Filippov
  2019-05-01  9:35             ` Arnout Vandecappelle
  1 sibling, 1 reply; 21+ messages in thread
From: Yann E. MORIN @ 2019-04-30 19:56 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2019-04-30 21:40 +0200, Yann E. MORIN spake thusly:
> On 2019-04-30 13:20 +0200, Arnout Vandecappelle spake thusly:
[--SNIP--]
> > >   > > +? elif [ $device_name == "xtensa-lx60" ] || [ $device_name ==
> > >   "xtensa-lx60-nommu" ]; then
> > >   > > +? ? echo "xtensa cannot be tested"
> > >   >? If that is the case, why do we even have these qemu defconfigs? Max?
> > >  Tested both configurations just now, with the current buildroot tip
> > >  (2019.02-959-gd54b0e22aef3) and QEMU-4.0. Both build and boot for me
> > >  with QEMU command line from the readme.
> >  Is this with the system-intalled qemu? I guess so, because Buildroot still has
> > 3.1.0... That might be the issue :-)
> 
> I've started a test-build ehre, to check.

And it does not build because:

      UIMAGE  arch/xtensa/boot/uImage
    "mkimage" command not found - U-Boot images will not be built
    arch/xtensa/boot/Makefile:51: recipe for target 'arch/xtensa/boot/uImage' failed

So, it needs to have host-uboot-tools.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu
  2019-04-30 19:56             ` Yann E. MORIN
@ 2019-04-30 20:09               ` Max Filippov
  2019-04-30 20:23                 ` Max Filippov
  0 siblings, 1 reply; 21+ messages in thread
From: Max Filippov @ 2019-04-30 20:09 UTC (permalink / raw)
  To: buildroot

On Tue, Apr 30, 2019 at 12:56 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> And it does not build because:
>
>       UIMAGE  arch/xtensa/boot/uImage
>     "mkimage" command not found - U-Boot images will not be built
>     arch/xtensa/boot/Makefile:51: recipe for target 'arch/xtensa/boot/uImage' failed

Ah, yes, I have mkimage somewhere in my PATH.

> So, it needs to have host-uboot-tools.

But I don't think this is the right thing. What I see is that despite
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME is set to Image,
to only build self-contained ELF kernel, the initial kernel build is
run as 'make ... all', and only the build with the cpio is run as
'make ... Image'. Why?

-- 
Thanks.
-- Max

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

* [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu
  2019-04-30 20:09               ` Max Filippov
@ 2019-04-30 20:23                 ` Max Filippov
  2019-04-30 20:31                   ` Yann E. MORIN
  0 siblings, 1 reply; 21+ messages in thread
From: Max Filippov @ 2019-04-30 20:23 UTC (permalink / raw)
  To: buildroot

On Tue, Apr 30, 2019 at 1:09 PM Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> On Tue, Apr 30, 2019 at 12:56 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > And it does not build because:
> >
> >       UIMAGE  arch/xtensa/boot/uImage
> >     "mkimage" command not found - U-Boot images will not be built
> >     arch/xtensa/boot/Makefile:51: recipe for target 'arch/xtensa/boot/uImage' failed
>
> Ah, yes, I have mkimage somewhere in my PATH.
>
> > So, it needs to have host-uboot-tools.
>
> But I don't think this is the right thing. What I see is that despite
> BR2_LINUX_KERNEL_IMAGE_TARGET_NAME is set to Image,
> to only build self-contained ELF kernel, the initial kernel build is
> run as 'make ... all', and only the build with the cpio is run as
> 'make ... Image'. Why?

Ok, I see why: because ffbe46a5295c ("linux: simplify LINUX_BUILD_CMDS").
It's a regression then.

-- 
Thanks.
-- Max

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

* [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu
  2019-04-30 20:23                 ` Max Filippov
@ 2019-04-30 20:31                   ` Yann E. MORIN
  0 siblings, 0 replies; 21+ messages in thread
From: Yann E. MORIN @ 2019-04-30 20:31 UTC (permalink / raw)
  To: buildroot

Max, All,

On 2019-04-30 13:23 -0700, Max Filippov spake thusly:
> On Tue, Apr 30, 2019 at 1:09 PM Max Filippov <jcmvbkbc@gmail.com> wrote:
> >
> > On Tue, Apr 30, 2019 at 12:56 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > > And it does not build because:
> > >
> > >       UIMAGE  arch/xtensa/boot/uImage
> > >     "mkimage" command not found - U-Boot images will not be built
> > >     arch/xtensa/boot/Makefile:51: recipe for target 'arch/xtensa/boot/uImage' failed
> >
> > Ah, yes, I have mkimage somewhere in my PATH.
> >
> > > So, it needs to have host-uboot-tools.
> >
> > But I don't think this is the right thing. What I see is that despite
> > BR2_LINUX_KERNEL_IMAGE_TARGET_NAME is set to Image,
> > to only build self-contained ELF kernel, the initial kernel build is
> > run as 'make ... all', and only the build with the cpio is run as
> > 'make ... Image'. Why?
> 
> Ok, I see why: because ffbe46a5295c ("linux: simplify LINUX_BUILD_CMDS").
> It's a regression then.

See also 2a7cf511f4 (linux: split calling "all" and "$(LINUX_TARGET_NAME)"
targets) which is an attempt at fixing the regression in ffbe46a5295c.

Furthermore, there were a few patches adding host uboot tools to a few
defconfigs that needed it, like 7cbf9c63e5 (configs/qemu_ppc_virtex_ml507:
kernel build needs mkimage)

Finally, see also the discussion on that series:
    http://lists.busybox.net/pipermail/buildroot/2019-April/248424.html

We may have missed a few. I'll send a patch adding it to the extensa
defconfigs.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu
  2019-04-30 19:40           ` Yann E. MORIN
  2019-04-30 19:56             ` Yann E. MORIN
@ 2019-05-01  9:35             ` Arnout Vandecappelle
  1 sibling, 0 replies; 21+ messages in thread
From: Arnout Vandecappelle @ 2019-05-01  9:35 UTC (permalink / raw)
  To: buildroot



On 30/04/2019 21:40, Yann E. MORIN wrote:
> Arnout, All,
> 
> On 2019-04-30 13:20 +0200, Arnout Vandecappelle spake thusly:
>> On 30/04/2019 10:54, Jugurtha BELKALEM wrote:
>>> Thank you for you comments Arnout, I have corrected the indentation, timeout
>>> and? function declaration issues.
>>>
>>> However; I think that duplicating the content of readme.txt of each qemu
>>> architecture would be difficult to maintain (even if it is more convenient to
>>> use), this is why a project like toolchain builder :
>>> https://github.com/bootlin/toolchains-builder/blob/master/build.sh is reading
>>> directly from readme.txt.
>>  The idea would not be to duplicate it, but to move it. I.e., readme.txt just
>> says "launch with board/qemu/x86_64/launch.sh", and the actual command is in
>> that shell script.
>>
>>  But maybe we should see what other Buildroot maintainers have to say about it.
>> Thomas, Peter, Yann, Romain?
> Ideally, I'd go without the readme.txt altogether, or if we want to keep
> "backward compatibility", we'd make it a symlink to launch.sh.

 Sounds good to me. Most of those don't contain any information at all.

 Regards,
 Arnout

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

end of thread, other threads:[~2019-05-01  9:35 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-29 16:32 [Buildroot] [PATCH 0/7] gitlab Qemu runtime testing Jugurtha BELKALEM
2019-04-29 16:32 ` [Buildroot] [PATCH 1/7] support/docker/Dockerfile: new package expect Jugurtha BELKALEM
2019-04-29 20:49   ` Arnout Vandecappelle
2019-04-29 16:32 ` [Buildroot] [PATCH 2/7] package/qemu: enable nios2 support for host-qemu Jugurtha BELKALEM
2019-04-29 16:32 ` [Buildroot] [PATCH 3/7] package/qemu: enable sparc64 " Jugurtha BELKALEM
2019-04-29 16:32 ` [Buildroot] [PATCH 4/7] package/qemu: remove comment about sh64 Jugurtha BELKALEM
2019-04-29 16:32 ` [Buildroot] [PATCH 5/7] configs/qemu-*: add host-qemu-system Jugurtha BELKALEM
2019-04-29 16:32 ` [Buildroot] [PATCH 6/7] support/scripts/qemu-boot: gitlab tests for Qemu Jugurtha BELKALEM
2019-04-29 22:31   ` Arnout Vandecappelle
2019-04-29 23:38     ` Max Filippov
2019-04-30  8:54       ` Jugurtha BELKALEM
2019-04-30 11:20         ` Arnout Vandecappelle
2019-04-30 15:40           ` Max Filippov
2019-04-30 19:40           ` Yann E. MORIN
2019-04-30 19:56             ` Yann E. MORIN
2019-04-30 20:09               ` Max Filippov
2019-04-30 20:23                 ` Max Filippov
2019-04-30 20:31                   ` Yann E. MORIN
2019-05-01  9:35             ` Arnout Vandecappelle
2019-04-29 16:32 ` [Buildroot] [PATCH 7/7] gitlab.yml.in: enable Qemu gitlab testing Jugurtha BELKALEM
2019-04-29 22:34   ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.