gitlab Qemu runtime testing
Subsystems (3)
v2 cover gitlab Qemu runtime testing
Testing Qemu build states helps
to identify any issue encountered during the build.
When compilation is done, a qemu machine is started, fed with root login and then powered down. Even if this test is simple, it can point to various errors.
Jugurtha BELKALEM (7):
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 board/qemu/*/launch.sh: add qemu launch script support/scripts/qemu-boot-*: gitlab tests for Qemu gitlab.yml.in*: enable Qemu gitlab testing
.gitlab-ci.yml | 3 ++ .gitlab-ci.yml.in | 3 ++ board/qemu/aarch64-virt/launch.sh | 21 ++++++++++++ board/qemu/arm-versatile/launch.sh | 26 ++++++++++++++ board/qemu/arm-vexpress/launch.sh | 25 ++++++++++++++ board/qemu/m68k-mcf5208/launch.sh | 21 ++++++++++++ board/qemu/m68k-q800/launch.sh | 22 ++++++++++++ board/qemu/microblazebe-mmu/launch.sh | 21 ++++++++++++ board/qemu/microblazeel-mmu/launch.sh | 21 ++++++++++++ board/qemu/mips32r2-malta/launch.sh | 23 +++++++++++++ board/qemu/mips32r2el-malta/launch.sh | 23 +++++++++++++ board/qemu/mips32r6-malta/launch.sh | 21 ++++++++++++ board/qemu/mips32r6el-malta/launch.sh | 21 ++++++++++++ board/qemu/mips64-malta/launch.sh | 22 ++++++++++++ board/qemu/mips64el-malta/launch.sh | 22 ++++++++++++ board/qemu/mips64r6-malta/launch.sh | 21 ++++++++++++ board/qemu/mips64r6el-malta/launch.sh | 21 ++++++++++++ board/qemu/nios2-10m50/launch.sh | 21 ++++++++++++ board/qemu/or1k/launch.sh | 23 +++++++++++++ board/qemu/ppc-g3beige/launch.sh | 22 ++++++++++++ board/qemu/ppc-mpc8544ds/launch.sh | 21 ++++++++++++ board/qemu/ppc-virtex-ml507/launch.sh | 21 ++++++++++++ board/qemu/ppc64-e5500/launch.sh | 21 ++++++++++++ board/qemu/ppc64-pseries/launch.sh | 21 ++++++++++++ board/qemu/ppc64le-pseries/launch.sh | 21 ++++++++++++ board/qemu/riscv32-virt/launch.sh | 21 ++++++++++++ board/qemu/riscv64-virt/launch.sh | 21 ++++++++++++ board/qemu/sh4-r2d/launch.sh | 22 ++++++++++++ board/qemu/sh4eb-r2d/launch.sh | 22 ++++++++++++ board/qemu/sparc-ss10/launch.sh | 21 ++++++++++++ board/qemu/sparc64-sun4u/launch.sh | 21 ++++++++++++ board/qemu/x86/launch.sh | 23 +++++++++++++ board/qemu/x86_64/launch.sh | 23 +++++++++++++ board/qemu/xtensa-lx60/launch.sh | 21 ++++++++++++ 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/scripts/qemu-boot-checker.sh | 25 ++++++++++++++ support/scripts/qemu-boot-chg-defconfig.sh | 11 ++++++ support/scripts/qemu-boot-expect.py | 55 ++++++++++++++++++++++++++++++ 73 files changed, 934 insertions(+), 1 deletion(-) create mode 100755 board/qemu/aarch64-virt/launch.sh create mode 100755 board/qemu/arm-versatile/launch.sh create mode 100755 board/qemu/arm-vexpress/launch.sh create mode 100755 board/qemu/m68k-mcf5208/launch.sh create mode 100755 board/qemu/m68k-q800/launch.sh create mode 100755 board/qemu/microblazebe-mmu/launch.sh create mode 100755 board/qemu/microblazeel-mmu/launch.sh create mode 100755 board/qemu/mips32r2-malta/launch.sh create mode 100755 board/qemu/mips32r2el-malta/launch.sh create mode 100755 board/qemu/mips32r6-malta/launch.sh create mode 100755 board/qemu/mips32r6el-malta/launch.sh create mode 100755 board/qemu/mips64-malta/launch.sh create mode 100755 board/qemu/mips64el-malta/launch.sh create mode 100755 board/qemu/mips64r6-malta/launch.sh create mode 100755 board/qemu/mips64r6el-malta/launch.sh create mode 100755 board/qemu/nios2-10m50/launch.sh create mode 100755 board/qemu/or1k/launch.sh create mode 100755 board/qemu/ppc-g3beige/launch.sh create mode 100755 board/qemu/ppc-mpc8544ds/launch.sh create mode 100755 board/qemu/ppc-virtex-ml507/launch.sh create mode 100755 board/qemu/ppc64-e5500/launch.sh create mode 100755 board/qemu/ppc64-pseries/launch.sh create mode 100755 board/qemu/ppc64le-pseries/launch.sh create mode 100755 board/qemu/riscv32-virt/launch.sh create mode 100755 board/qemu/riscv64-virt/launch.sh create mode 100755 board/qemu/sh4-r2d/launch.sh create mode 100755 board/qemu/sh4eb-r2d/launch.sh create mode 100755 board/qemu/sparc-ss10/launch.sh create mode 100755 board/qemu/sparc64-sun4u/launch.sh create mode 100755 board/qemu/x86/launch.sh create mode 100755 board/qemu/x86_64/launch.sh create mode 100755 board/qemu/xtensa-lx60/launch.sh create mode 100755 support/scripts/qemu-boot-checker.sh create mode 100755 support/scripts/qemu-boot-chg-defconfig.sh create mode 100755 support/scripts/qemu-boot-expect.py
Signature · 1 line
2.7.4
PATCH v2 1/7 package/qemu: enable nios2 support for host-qemu
This config enable host eqmu support for nios2 which allows to test this architecture in gitlab.
--- package/qemu/Config.in.host | 1 + package/qemu/qemu.mk | 1 + 2 files changed, 2 insertions(+)
package/qemu/Config.in.host +1 -0
@@ -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
package/qemu/qemu.mk +1 -0
@@ -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)
Signature · 1 line
2.7.4
PATCH v2 1/7 package/qemu: enable nios2 support for host-qemu
Am Sun, 5 May 2019 18:53:53 +0200
schrieb Jugurtha BELKALEM <[email protected]>:
Quoted 2 lines
This config enable host eqmu support for nios2 which allows to test this architecture in gitlab.
s/eqmu/qemu/
with that fixed:
Thomas Petazzoni
AppliedPATCH v2 1/7 package/qemu: enable nios2 support for host-qemu
In reply to Jugurtha BELKALEMQuoted 8 lines · On Sun, 5 May 2019 18:53:53 +0200 Jugurtha BELKALEM…
This config enable host eqmu support for nios2 which allows to test this architecture in gitlab.
Signed-off-by Jugurtha BELKALEM <[email protected]>--- package/qemu/Config.in.host | 1 + package/qemu/qemu.mk | 1 + 2 files changed, 2 insertions(+)
Applied to master after tweaking a bit the commit log. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 2/7 package/qemu: enable sparc64 support for host-qemu
In reply to Jugurtha BELKALEMThis config enable host eqmu support for sparc64 which allows to test this architecture in gitlab.
--- package/qemu/Config.in.host | 1 + package/qemu/qemu.mk | 1 + 2 files changed, 2 insertions(+)
package/qemu/Config.in.host +1 -0
@@ -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
package/qemu/qemu.mk +1 -0
@@ -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)
Signature · 1 line
2.7.4
PATCH v2 2/7 package/qemu: enable sparc64 support for host-qemu
Am Sun, 5 May 2019 18:53:54 +0200
schrieb Jugurtha BELKALEM <[email protected]>:
Quoted 2 lines
This config enable host eqmu support for sparc64 which allows to test this architecture in gitlab.
s/eqmu/qemu/
with that fixed:
Thomas Petazzoni
AppliedPATCH v2 2/7 package/qemu: enable sparc64 support for host-qemu
In reply to Jugurtha BELKALEMQuoted 8 lines · On Sun, 5 May 2019 18:53:54 +0200 Jugurtha BELKALEM…
This config enable host eqmu support for sparc64 which allows to test this architecture in gitlab.
Signed-off-by Jugurtha BELKALEM <[email protected]>--- package/qemu/Config.in.host | 1 + package/qemu/qemu.mk | 1 + 2 files changed, 2 insertions(+)
Applied to master after tweaking a bit the commit log. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 3/7 package/qemu: remove comment about sh64
In reply to Jugurtha BELKALEMsh64 has been removed since commit [1]:
[1] 4338a319b72570e433fd7484f8a95e1e0e978941
--- package/qemu/qemu.mk | 1 - 1 file changed, 1 deletion(-)
package/qemu/qemu.mk +0 -1
@@ -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
Signature · 1 line
2.7.4
PATCH v2 3/7 package/qemu: remove comment about sh64
Am Sun, 5 May 2019 18:53:55 +0200
schrieb Jugurtha BELKALEM <[email protected]>:
Quoted 8 lines
sh64 has been removed since commit [1]:
[1]
4338a319b72570e433fd7484f8a95e1e0e978941Signed-off-by Jugurtha BELKALEM <[email protected]>--- package/qemu/qemu.mk | 1 - 1 file changed, 1 deletion(-)
Thomas Petazzoni
AppliedPATCH v2 3/7 package/qemu: remove comment about sh64
In reply to Jugurtha BELKALEMQuoted 8 lines · On Sun, 5 May 2019 18:53:55 +0200 Jugurtha BELKALEM…
sh64 has been removed since commit [1]:
[1]
4338a319b72570e433fd7484f8a95e1e0e978941Signed-off-by Jugurtha BELKALEM <[email protected]>--- package/qemu/qemu.mk | 1 - 1 file changed, 1 deletion(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 4/7 configs/qemu-*: add host-qemu-system
In reply to Jugurtha BELKALEMSuch config allows to setup gitlab tests for various qemu architectures (x86, mips, nios2, microblaze, ..., etc) using the same Qemu version.
--- 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(+)
configs/qemu_aarch64_virt_defconfig +4 -0
@@ -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
configs/qemu_arm_versatile_defconfig +4 -0
@@ -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
configs/qemu_arm_versatile_nommu_defconfig +4 -0
@@ -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
configs/qemu_arm_vexpress_defconfig +4 -0
@@ -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
configs/qemu_m68k_mcf5208_defconfig +4 -0
@@ -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
configs/qemu_m68k_q800_defconfig +4 -0
@@ -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
configs/qemu_microblazebe_mmu_defconfig +4 -0
@@ -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
configs/qemu_microblazeel_mmu_defconfig +4 -0
@@ -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
configs/qemu_mips32r2_malta_defconfig +4 -0
@@ -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
configs/qemu_mips32r2el_malta_defconfig +4 -0
@@ -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
configs/qemu_mips32r6_malta_defconfig +4 -0
@@ -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
configs/qemu_mips32r6el_malta_defconfig +4 -0
@@ -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
configs/qemu_mips64_malta_defconfig +4 -0
@@ -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
configs/qemu_mips64el_malta_defconfig +4 -0
@@ -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
configs/qemu_mips64r6_malta_defconfig +4 -0
@@ -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
configs/qemu_mips64r6el_malta_defconfig +4 -0
@@ -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
configs/qemu_nios2_10m50_defconfig +4 -0
@@ -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
configs/qemu_or1k_defconfig +4 -0
@@ -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
configs/qemu_ppc64_e5500_defconfig +4 -0
@@ -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
configs/qemu_ppc64_pseries_defconfig +4 -0
@@ -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
configs/qemu_ppc64le_pseries_defconfig +4 -0
@@ -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
configs/qemu_ppc_g3beige_defconfig +4 -0
@@ -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
configs/qemu_ppc_mpc8544ds_defconfig +4 -0
@@ -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
configs/qemu_ppc_virtex_ml507_defconfig +4 -0
@@ -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
configs/qemu_riscv32_virt_defconfig +4 -0
@@ -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
configs/qemu_riscv64_virt_defconfig +4 -0
@@ -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
configs/qemu_sh4_r2d_defconfig +4 -0
@@ -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
configs/qemu_sh4eb_r2d_defconfig +4 -0
@@ -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
configs/qemu_sparc64_sun4u_defconfig +4 -0
@@ -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
configs/qemu_sparc_ss10_defconfig +4 -0
@@ -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
configs/qemu_x86_64_defconfig +4 -0
@@ -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
configs/qemu_x86_defconfig +4 -0
@@ -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
configs/qemu_xtensa_lx60_defconfig +4 -0
@@ -26,3 +26,7 @@ BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image" # 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
configs/qemu_xtensa_lx60_nommu_defconfig +4 -0
@@ -30,3 +30,7 @@ BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image" # 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
Signature · 1 line
2.7.4
Thomas Petazzoni
AppliedPATCH v2 4/7 configs/qemu-*: add host-qemu-system
Quoted 5 lines · On Sun, 5 May 2019 18:53:56 +0200 Jugurtha BELKALEM…
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 <[email protected]>
Applied to master, thanks. Note that a few more Qemu defconfigs have been added since then (especially for the RISC-V CPU architecture), so you might want to add Qemu testing for them as well.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 4/7 configs/qemu-*: add host-qemu-system
In reply to Jugurtha BELKALEMAm Sun, 05 May 2019 18:53:56 +0200 schrieb Jugurtha BELKALEM:
configs/
Quoted 1 line
configs/ renamed from configs/qemu_xtensa_lx60_defconfig +0
-0
qemu_xtensa_lx60_defconfig
configs/
Quoted 12 lines
index 4287e6a..a5fd14b 100644
configs/qemu_xtensa_lx60_defconfig +4
-0@@ -26,3 +26,7 @@ BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image" # 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=yconfigs/ renamed from configs/qemu_xtensa_lx60_nommu_defconfig +0
-0
qemu_xtensa_lx60_nommu_defconfig
configs/qemu_xtensa_lx60_nommu_defconfig BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image" · line 36
Quoted 11 lines
index 37b6743..750e37d 100644
configs/qemu_xtensa_lx60_nommu_defconfig +4
-0@@ -30,3 +30,7 @@ BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image" # 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
Hi Jugurtha,
this patch added qemu-host support for xtensa, but
https://git.buildroot.net/buildroot/tree/package/qemu/Config.in.host
has no support for xtensa.
Regards, Bernd
PATCH v2 5/7 board/qemu/*/launch.sh: add qemu launch script
In reply to Jugurtha BELKALEMlaunch.sh replaces old readme.txt files. This change allows to test qemu architectures and check if build process went successful. This script contains the command used to launch each qemu machine.
The readme.txt files contains few information which is another good reason to replace them.
For backward compatibility, readme.txt is
still accessible using 'launch.sh -h'.
--- board/qemu/aarch64-virt/launch.sh | 21 +++++++++++++++++++++ board/qemu/arm-versatile/launch.sh | 26 ++++++++++++++++++++++++++ board/qemu/arm-vexpress/launch.sh | 25 +++++++++++++++++++++++++ board/qemu/m68k-mcf5208/launch.sh | 21 +++++++++++++++++++++ board/qemu/m68k-q800/launch.sh | 22 ++++++++++++++++++++++ board/qemu/microblazebe-mmu/launch.sh | 21 +++++++++++++++++++++ board/qemu/microblazeel-mmu/launch.sh | 21 +++++++++++++++++++++ board/qemu/mips32r2-malta/launch.sh | 23 +++++++++++++++++++++++ board/qemu/mips32r2el-malta/launch.sh | 23 +++++++++++++++++++++++ board/qemu/mips32r6-malta/launch.sh | 21 +++++++++++++++++++++ board/qemu/mips32r6el-malta/launch.sh | 21 +++++++++++++++++++++ board/qemu/mips64-malta/launch.sh | 22 ++++++++++++++++++++++ board/qemu/mips64el-malta/launch.sh | 22 ++++++++++++++++++++++ board/qemu/mips64r6-malta/launch.sh | 21 +++++++++++++++++++++ board/qemu/mips64r6el-malta/launch.sh | 21 +++++++++++++++++++++ board/qemu/nios2-10m50/launch.sh | 21 +++++++++++++++++++++ board/qemu/or1k/launch.sh | 23 +++++++++++++++++++++++ board/qemu/ppc-g3beige/launch.sh | 22 ++++++++++++++++++++++ board/qemu/ppc-mpc8544ds/launch.sh | 21 +++++++++++++++++++++ board/qemu/ppc-virtex-ml507/launch.sh | 21 +++++++++++++++++++++ board/qemu/ppc64-e5500/launch.sh | 21 +++++++++++++++++++++ board/qemu/ppc64-pseries/launch.sh | 21 +++++++++++++++++++++ board/qemu/ppc64le-pseries/launch.sh | 21 +++++++++++++++++++++ board/qemu/riscv32-virt/launch.sh | 21 +++++++++++++++++++++ board/qemu/riscv64-virt/launch.sh | 21 +++++++++++++++++++++ board/qemu/sh4-r2d/launch.sh | 22 ++++++++++++++++++++++ board/qemu/sh4eb-r2d/launch.sh | 22 ++++++++++++++++++++++ board/qemu/sparc-ss10/launch.sh | 21 +++++++++++++++++++++ board/qemu/sparc64-sun4u/launch.sh | 21 +++++++++++++++++++++ board/qemu/x86/launch.sh | 23 +++++++++++++++++++++++ board/qemu/x86_64/launch.sh | 23 +++++++++++++++++++++++ board/qemu/xtensa-lx60/launch.sh | 21 +++++++++++++++++++++ 32 files changed, 697 insertions(+) create mode 100755 board/qemu/aarch64-virt/launch.sh create mode 100755 board/qemu/arm-versatile/launch.sh create mode 100755 board/qemu/arm-vexpress/launch.sh create mode 100755 board/qemu/m68k-mcf5208/launch.sh create mode 100755 board/qemu/m68k-q800/launch.sh create mode 100755 board/qemu/microblazebe-mmu/launch.sh create mode 100755 board/qemu/microblazeel-mmu/launch.sh create mode 100755 board/qemu/mips32r2-malta/launch.sh create mode 100755 board/qemu/mips32r2el-malta/launch.sh create mode 100755 board/qemu/mips32r6-malta/launch.sh create mode 100755 board/qemu/mips32r6el-malta/launch.sh create mode 100755 board/qemu/mips64-malta/launch.sh create mode 100755 board/qemu/mips64el-malta/launch.sh create mode 100755 board/qemu/mips64r6-malta/launch.sh create mode 100755 board/qemu/mips64r6el-malta/launch.sh create mode 100755 board/qemu/nios2-10m50/launch.sh create mode 100755 board/qemu/or1k/launch.sh create mode 100755 board/qemu/ppc-g3beige/launch.sh create mode 100755 board/qemu/ppc-mpc8544ds/launch.sh create mode 100755 board/qemu/ppc-virtex-ml507/launch.sh create mode 100755 board/qemu/ppc64-e5500/launch.sh create mode 100755 board/qemu/ppc64-pseries/launch.sh create mode 100755 board/qemu/ppc64le-pseries/launch.sh create mode 100755 board/qemu/riscv32-virt/launch.sh create mode 100755 board/qemu/riscv64-virt/launch.sh create mode 100755 board/qemu/sh4-r2d/launch.sh create mode 100755 board/qemu/sh4eb-r2d/launch.sh create mode 100755 board/qemu/sparc-ss10/launch.sh create mode 100755 board/qemu/sparc64-sun4u/launch.sh create mode 100755 board/qemu/x86/launch.sh create mode 100755 board/qemu/x86_64/launch.sh create mode 100755 board/qemu/xtensa-lx60/launch.sh
board/qemu/aarch64-virt/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -smp 1 -kernel output/images/Image -append "root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 -drive file=output/images/rootfs.ext4,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/arm-versatile/launch.sh new file +26 -0
@@ -0,0 +1,26 @@ +#!/bin/bash + +qemu_command='qemu-system-arm -M versatilepb -kernel output/images/zImage -dtb output/images/versatile-pb.dtb -drive file=output/images/rootfs.ext2,if=scsi,format=raw -append "root=/dev/sda console=ttyAMA0,115200" -serial stdio -net nic,model=rtl8139 -net user' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +Or for the noMMU emulation: + + qemu-system-arm -M versatilepb -kernel output/images/zImage -dtb output/images/versatile-pb.dtb -append \"console=ttyAMA0,115200\" -serial stdio -net user -net nic,model=smc91c111 + +The login prompt will appear in the terminal that started Qemu. The +graphical window is the framebuffer. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/arm-vexpress/launch.sh new file +25 -0
@@ -0,0 +1,25 @@ +#!/bin/bash + +qemu_command='qemu-system-arm -M vexpress-a9 -smp 1 -m 256 -kernel output/images/zImage -dtb output/images/vexpress-v2p-ca9.dtb -drive file=output/images/rootfs.ext2,if=sd,format=raw -append "console=ttyAMA0,115200 root=/dev/mmcblk0" -serial stdio -net nic,model=lan9118 -net user' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. The +graphical window is the framebuffer. + +If you want to emulate more cores change \"-smp 1\" to \"-smp 2\" for +dual-core or even \"smp -4\" for a quad-core configuration. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/m68k-mcf5208/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-m68k -M mcf5208evb -cpu m5208 -kernel output/images/vmlinux -nographic' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/m68k-q800/launch.sh new file +22 -0
@@ -0,0 +1,22 @@ +#!/bin/bash + +qemu_command='qemu-system-m68k -M q800 -kernel output/images/vmlinux -nographic -drive file=output/images/rootfs.ext2,format=raw -append "root=/dev/sda console=ttyS0"' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.11.0 from https://github.com/vivier/qemu-m68k +You need following branch: q800-v2.11.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/microblazebe-mmu/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-microblaze -M petalogix-s3adsp1800 -kernel output/images/linux.bin -serial stdio' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/microblazeel-mmu/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-microblazeel -M petalogix-s3adsp1800 -kernel output/images/linux.bin -serial stdio' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/mips32r2-malta/launch.sh new file +23 -0
@@ -0,0 +1,23 @@ +#!/bin/bash + +qemu_command='qemu-system-mips -M malta -kernel output/images/vmlinux -serial stdio -drive file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda" -net nic,model=pcnet -net user' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. The +graphical window is the framebuffer. No keyboard support has been +enabled. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/mips32r2el-malta/launch.sh new file +23 -0
@@ -0,0 +1,23 @@ +#!/bin/bash + +qemu_command='qemu-system-mipsel -M malta -kernel output/images/vmlinux -serial stdio -drive file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda" -net nic,model=pcnet -net user' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. The +graphical window is the framebuffer. No keyboard support has been +enabled. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/mips32r6-malta/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-mips -M malta -cpu mips32r6-generic -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda" -nographic' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/mips32r6el-malta/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-mipsel -M malta -cpu mips32r6-generic -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda" -net nic,model=pcnet -net user -nographic' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/mips64-malta/launch.sh new file +22 -0
@@ -0,0 +1,22 @@ +#!/bin/bash + +qemu_command='qemu-system-mips64 -M malta -kernel output/images/vmlinux -serial stdio -drive file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda"' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. The +graphical window is the framebuffer. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/mips64el-malta/launch.sh new file +22 -0
@@ -0,0 +1,22 @@ +#!/bin/bash + +qemu_command='qemu-system-mips64el -M malta -kernel output/images/vmlinux -serial stdio -drive file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda"' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. The +graphical window is the framebuffer. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/mips64r6-malta/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-mips64 -M malta -cpu I6400 -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda" -nographic' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/mips64r6el-malta/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-mips64el -M malta -cpu I6400 -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda" -nographic' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/nios2-10m50/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-nios2 -kernel output/images/vmlinux -nographic' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0." +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/or1k/launch.sh new file +23 -0
@@ -0,0 +1,23 @@ +#!/bin/bash + +qemu_command='qemu-system-or1k -kernel output/images/vmlinux -nographic' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Ethernet support is not working, yet. + +Tested with QEMU 2.12.0." +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/ppc-g3beige/launch.sh new file +22 -0
@@ -0,0 +1,22 @@ +#!/bin/bash + +qemu_command='qemu-system-ppc -M g3beige -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "console=ttyS0 root=/dev/hda" -serial stdio -net nic,model=rtl8139 -net user' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. The +graphical window is the framebuffer. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/ppc-mpc8544ds/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-ppc -M mpc8544ds -kernel output/images/vmlinux -serial stdio -net nic,model=e1000 -net user' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/ppc-virtex-ml507/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-ppc -M virtex-ml507 -kernel output/images/vmlinux -m 256 -nographic -append "console=ttyS0" -dtb output/images/virtex440-ml507.dtb' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/ppc64-e5500/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-ppc64 -M ppce500 -cpu e5500 -m 256 -kernel output/images/uImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "console=ttyS0 root=/dev/vda" -serial mon:stdio -nographic' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/ppc64-pseries/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-ppc64 -M pseries -cpu POWER7 -m 256 -kernel output/images/vmlinux -append "console=hvc0 root=/dev/sda" -drive file=output/images/rootfs.ext2,if=scsi,index=0,format=raw -serial stdio -display curses' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/ppc64le-pseries/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-ppc64 -M pseries -cpu POWER8 -m 256 -kernel output/images/vmlinux -append "console=hvc0 root=/dev/sda" -drive file=output/images/rootfs.ext2,if=scsi,index=0,format=raw -serial stdio -display curses' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal window. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/riscv32-virt/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-riscv32 -M virt -kernel output/images/fw_jump.elf -device loader,file=output/images/Image,addr=0x80400000 -append "root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 3.1" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/riscv64-virt/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-riscv64 -M virt -kernel output/images/fw_jump.elf -device loader,file=output/images/Image,addr=0x80200000 -append "root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 3.1" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/sh4-r2d/launch.sh new file +22 -0
@@ -0,0 +1,22 @@ +#!/bin/bash + +qemu_command='qemu-system-sh4 -M r2d -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=ide,format=raw -append "root=/dev/sda console=ttySC1,115200 noiotrap" -serial null -serial stdio -net nic,model=rtl8139 -net user' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. +The graphical window is the framebuffer. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/sh4eb-r2d/launch.sh new file +22 -0
@@ -0,0 +1,22 @@ +#!/bin/bash + +qemu_command='qemu-system-sh4eb -M r2d -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=ide,format=raw -append "root=/dev/sda console=ttySC1,115200 noiotrap" -serial null -serial stdio -net nic,model=rtl8139 -net user' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. +The graphical window is the framebuffer. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/sparc-ss10/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-sparc -M SS-10 -kernel output/images/zImage -drive file=output/images/rootfs.ext2,format=raw -append "root=/dev/sda console=ttyS0,115200" -serial stdio -net nic,model=lance -net user' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/sparc64-sun4u/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-sparc64 -M sun4u -kernel output/images/vmlinux -append "root=/dev/sda console=ttyS0,115200" -serial stdio -drive file=output/images/rootfs.ext2,format=raw -net nic,model=e1000 -net user' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/x86/launch.sh new file +23 -0
@@ -0,0 +1,23 @@ +#!/bin/bash + +qemu_command='qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "root=/dev/vda" -net nic,model=virtio -net user' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +Optionally add -smp N to emulate a SMP system with N CPUs. + +The login prompt will appear in the graphical window. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/x86_64/launch.sh new file +23 -0
@@ -0,0 +1,23 @@ +#!/bin/bash + +qemu_command='qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "root=/dev/vda" -net nic,model=virtio -net user' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +Optionally add -smp N to emulate a SMP system with N CPUs. + +The login prompt will appear in the graphical window. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
board/qemu/xtensa-lx60/launch.sh new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-xtensa -M lx60 -cpu dc233c -monitor null -nographic -kernel output/images/Image.elf' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
Signature · 1 line
2.7.4
PATCH v2 5/7 board/qemu/*/launch.sh: add qemu launch script
Hello,
Quoted 17 lines · On Sun, 5 May 2019 18:53:57 +0200 Jugurtha BELKALEM…
board/qemu/aarch64-virt/launch.sh new file +11
-0@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -smp 1 -kernel output/images/Image -append "root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 -drive file=output/images/rootfs.ext4,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. +
board/qemu/aarch64-virt/launch.sh line 21
Quoted 10 lines
board/qemu/aarch64-virt/launch.sh new file +10
-0+Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fi
I am not thrilled by the complexity of those scripts. Why isn't the script just a single line that runs Qemu ? Perhaps the only argument that would be sensible to have is an optional argument to pass the output directory.
So just:
#!/bin/bash
qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -smp 1 -kernel ${0:-output}/images/Image -append "root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 -drive file=${0:-output}/images/rootfs.ext4,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0
Would be enough. But on the other hand, in the toolchain-builders stuff, we simply use the existing readme.txt contents. We do this:
test_qemu_cmd=$(grep qemu-system ${buildroot_dir}/board/qemu/${test_board_dir}/readme.txt)And this gives us the Qemu command to run the qemu emulation. Perhaps we should do this as well here, and avoid the launch.sh scripts altogether ? In any case, we shouldn't duplicate this information between the launch.sh script and the readme.txt file. So if you go the launch.sh way, we need to adjust the readme.txt files accordingly.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 5/7 board/qemu/*/launch.sh: add qemu launch script
Hi Thomas,
Le 02/08/2019 ? 23:58, Thomas Petazzoni a ?crit?:
Quoted 38 lines
Hello,
Quoted 17 lines · On Sun, 5 May 2019 18:53:57 +0200 Jugurtha BELKALEM…
board/qemu/aarch64-virt/launch.sh new file +11
-0@@ -0,0 +1,21 @@ +#!/bin/bash + +qemu_command='qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -smp 1 -kernel output/images/Image -append "root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 -drive file=output/images/rootfs.ext4,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0' + +function DisplayReadme { + echo "Run the emulation with: + +${qemu_command} + +The login prompt will appear in the terminal that started Qemu. +board/qemu/aarch64-virt/launch.sh line 21
Quoted 10 lines
board/qemu/aarch64-virt/launch.sh new file +10
-0+Tested with QEMU 2.12.0" +} + +if [ ! -z $1 ] && [ $1 = "-h" ] +then + DisplayReadme +else + + echo "${qemu_command}" +fiI am not thrilled by the complexity of those scripts. Why isn't the script just a single line that runs Qemu ? Perhaps the only argument that would be sensible to have is an optional argument to pass the output directory.
Quoted 4 lines
So just:
#!/bin/bash
qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -smp 1 -kernel ${0:-output}/images/Image -append "root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 -drive file=${0:-output}/images/rootfs.ext4,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0
Each time I test a Qemu defconfig I always build in a specific build directory. So each time I have to go through this command line to replace output by something else.
So using a script that support an optional argument to pass to the output directory would be handy.
Quoted 11 lines
Would be enough. But on the other hand, in the toolchain-builders stuff, we simply use the existing readme.txt contents. We do this:
test_qemu_cmd=$(grep qemu-system ${buildroot_dir}/board/qemu/${test_board_dir}/readme.txt)And this gives us the Qemu command to run the qemu emulation. Perhaps we should do this as well here, and avoid the
launch.shscripts altogether ? In any case, we shouldn't duplicate this information between thelaunch.shscript and the readme.txt file. So if you go thelaunch.shway, we need to adjust the readme.txt files accordingly.
Agree, so if we go to the launch.sh way, what we should keep in the readme.txt? The only remaining information is the Qemu recommended version and a comment on how to use the launch.sh script.
Does it worth it to keep the readme.txt beside launch.sh?
Best regards,
Romain
Quoted 5 lines
Best regards,
Thomas
PATCH v2 5/7 board/qemu/*/launch.sh: add qemu launch script
Quoted 11 lines · On Sun, 27 Oct 2019 17:44:54 +0100 Romain Naour <[email protected]> wrote:
Quoted 4 lines
So just:
#!/bin/bash
qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -smp 1 -kernel ${0:-output}/images/Image -append "root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 -drive file=${0:-output}/images/rootfs.ext4,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0Each time I test a Qemu defconfig I always build in a specific build directory. So each time I have to go through this command line to replace output by something else.
So using a script that support an optional argument to pass to the output directory would be handy.
I think that's what I wanted to do with ${0:-output}, as it says "use ${0} if not empty, otherwise use output". But of course $0 is the script name itself, not the first argument. So ${1:-output} should do the trick.
Quoted 5 lines
Agree, so if we go to the
launch.shway, what we should keep in the readme.txt? The only remaining information is the Qemu recommended version and a comment on how to use thelaunch.shscript.Does it worth it to keep the readme.txt beside
launch.sh?
Maybe not.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 5/7 board/qemu/*/launch.sh: add qemu launch script
Le 27/10/2019 ? 17:52, Thomas Petazzoni a ?crit?:
Quoted 12 lines
Quoted 9 lines · On Sun, 27 Oct 2019 17:44:54 +0100 Romain Naour <[email protected]> wrote:
Quoted 4 lines
So just:
#!/bin/bash
qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -smp 1 -kernel ${0:-output}/images/Image -append "root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 -drive file=${0:-output}/images/rootfs.ext4,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0Each time I test a Qemu defconfig I always build in a specific build directory. So each time I have to go through this command line to replace output by something else.
Quoted 7 lines
Quoted 2 lines
So using a script that support an optional argument to pass to the output directory would be handy.
I think that's what I wanted to do with ${0:-output}, as it says "use ${0} if not empty, otherwise use output". But of course $0 is the script name itself, not the first argument. So ${1:-output} should do the trick.
OK
Quoted 8 lines
Quoted 6 lines
Agree, so if we go to the
launch.shway, what we should keep in the readme.txt? The only remaining information is the Qemu recommended version and a comment on how to use thelaunch.shscript.Does it worth it to keep the readme.txt beside
launch.sh?Maybe not.
There are some readme.txt containing several qemu command lines, those are not even used by toolchain builder.
Do we want to add more options to launch.Sh to handle theses special cases ?
arm-versatile:
- MMU emulation
- noMMU emulation
arm-vexpress-tz:
The readme.txt has a lot of information and contain several qemu command lines. Only the first one is interesting for automated tested.
csky:
- ck860 smp
- ck810/ck807
- ck610
All other readme.txt contain only one qemu command line.
Best regards,
Romain
Quoted 3 lines
Thomas
PATCH v2 5/7 board/qemu/*/launch.sh: add qemu launch script
Quoted 4 lines · On Sun, 27 Oct 2019 18:59:09 +0100 Romain Naour <[email protected]> wrote:
There are some readme.txt containing several qemu command lines, those are not even used by toolchain builder.
Do we want to add more options to launch.Sh to handle theses special cases ?
I don't think it makes sense to add more options to launch.sh, as these options will not be known by the automated testing stuff, as it will only know about "run launch.sh".
Quoted 3 lines
arm-versatile:
- MMU emulation
- noMMU emulation
These are two separate defconfigs, so we should have two separate launch.sh scripts.
Quoted 3 lines
arm-vexpress-tz:
The readme.txt has a lot of information and contain several qemu command lines. Only the first one is interesting for automated tested.
This one is really special IMO.
Quoted 4 lines
csky:
- ck860 smp
- ck810/ck807
- ck610
These ones could be split into several launch.sh scripts, one for each platform.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 5/7 board/qemu/*/launch.sh: add qemu launch script
Le 27/10/2019 ? 19:15, Thomas Petazzoni a ?crit?:
Quoted 11 lines
Quoted 4 lines · On Sun, 27 Oct 2019 18:59:09 +0100 Romain Naour <[email protected]> wrote:
There are some readme.txt containing several qemu command lines, those are not even used by toolchain builder.
Do we want to add more options to launch.Sh to handle theses special cases ?
I don't think it makes sense to add more options to
launch.sh, as these options will not be known by the automated testing stuff, as it will only know about "runlaunch.sh".
Agree
Quoted 7 lines
Quoted 4 lines
arm-versatile:
- MMU emulation
- noMMU emulationThese are two separate defconfigs, so we should have two separate
launch.shscripts.
Ok, so I'll move all nommu related stuff outside of arm-versatile directory:
board/qemu/arm-versatile/
board/qemu/arm-versatile-nommu/
Quoted 5 lines
Quoted 4 lines
arm-vexpress-tz:
The readme.txt has a lot of information and contain several qemu command lines. Only the first one is interesting for automated tested.
Quoted 8 lines
This one is really special IMO.>
Quoted 4 lines
csky:
- ck860 smp
- ck810/ck807
- ck610These ones could be split into several
launch.shscripts, one for each platform.
Same for them, I'll create one directory for each variant of csky.
Romain
Quoted 3 lines
Thomas
PATCH v2 6/7 support/scripts/qemu-boot-*: gitlab tests for Qemu
In reply to Jugurtha BELKALEMEnables 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 qemu-boot-expect.py is used
to automate the tests.
The script qemu-boot-chg-defconfig.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.
---
Changes v1 => v2:
- qemu-boot-expect.py (based on python-pexpect)
replaces expect.sh (based on expect).
- qemu-boot-chg-defconfig.sh replacesqemu-boot-defconfig_config.sh
--- support/scripts/qemu-boot-checker.sh | 25 ++++++++++++++ support/scripts/qemu-boot-chg-defconfig.sh | 11 ++++++ support/scripts/qemu-boot-expect.py | 55 ++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100755 support/scripts/qemu-boot-checker.sh create mode 100755 support/scripts/qemu-boot-chg-defconfig.sh create mode 100755 support/scripts/qemu-boot-expect.py
support/scripts/qemu-boot-checker.sh new file +25 -0
@@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +function archQemuNoSupport { + echo "cannot boot under qemu, support out of tree!" + exit 0 +} + +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" = "m68k-q800" ] || [ "$device_name" = "ork1k" ]; then + archQemuNoSupport + fi + + export PATH="$2/output/host/bin:$PATH" + qemu_command_launcher=$($2/board/qemu/${device_name}/launch.sh) + $2/support/scripts/qemu-boot-expect.py "${qemu_command_launcher}" + + if [ $? -ne 0 ]; then + echo " booting test system ... FAILED" + exit 1 + fi + echo " booting test system ... SUCCESS" +fi
support/scripts/qemu-boot-chg-defconfig.sh new file +11 -0
@@ -0,0 +1,11 @@ +#!/usr/bin/env 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
support/scripts/qemu-boot-expect.py new file +55 -0
55 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v2 6/7 support/scripts/qemu-boot-*: gitlab tests for Qemu
Hello Jugurtha,
Didn't say it in my review of the previous patch, but I find this contribution very nice and useful. It will be good to have this to improve the testing of our Qemu defconfigs, for sure.
support/scripts/qemu-boot-checker.sh line 3
Quoted 9 lines · On Sun, 5 May 2019 18:53:58 +0200 Jugurtha BELKALEM…
support/scripts/qemu-boot-checker.sh new file +3
-0@@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +function archQemuNoSupport {
Camel-case really hurt my eyes. Also, this function is only used once, so it's not really useful to have a function.
support/scripts/qemu-boot-checker.sh line 8
Quoted 5 lines
support/scripts/qemu-boot-checker.sh new file +5
-0+ echo "cannot boot under qemu, support out of tree!" + exit 0 +} + +if [[ $1 = qemu* ]]; then
You should decide between [[ and [ for tests. And also, simply bail out when != qemu, so that you have one less indentation level.
So:
if [[ $1 != qemu* ]]; then
exit 0
fi
support/scripts/qemu-boot-checker.sh line 9
Quoted 1 line
support/scripts/qemu-boot-checker.sh new file +1
-0+ device_name=$(echo $1 | sed -e 's#^qemu_##; s#_defconfig$##;' | sed -r 's/[_]/-/g')
Perhaps just:
device_name=$(echo $1 | sed -e 's,^qemu_\(.*\)_defconfig$,\1,; s/_/-/g')
support/scripts/qemu-boot-checker.sh line 14
Quoted 5 lines
support/scripts/qemu-boot-checker.sh new file +5
-0+ if [ "$device_name" = "x86-64" ]; then + device_name="x86_64" + elif [ "$device_name" = "m68k-q800" ] || [ "$device_name" = "ork1k" ]; then + archQemuNoSupport + fi
Here you can do:
case ${device_name} in
x86-64)
device_name="x86_64"
;;
m68k-q800)
ork1k)
echo "No Qemu support for ${device_name}"
exit 0
esacBut instead of encoding in this script which architectures can be tested with Qemu and which cannot, why not simply grep the defconfig for BR2_PACKAGE_HOST_QEMU=y ? If it has this config option, then the Qemu boot test can be done.
For the x86_64 case, maybe we should simply rename board/qemu/x86_64 to board/qemu/x86-64, so that it matches the other directories, where we have the same name as the defconfig, with just the _ replaced by -. This would entirely remove those special conditions.
support/scripts/qemu-boot-checker.sh line 17
Quoted 3 lines
support/scripts/qemu-boot-checker.sh new file +3
-0+ + export PATH="$2/output/host/bin:$PATH" + qemu_command_launcher=$($2/board/qemu/${device_name}/launch.sh)
Now I understand why "launch.sh" is not launching, but just echoing the command. Still, this isn't really nice, as a script called launch.sh should really launch. Another reason perhaps to simply keep the qemu command example in readme.txt, and extract it from there.
support/scripts/qemu-boot-checker.sh line 24
Quoted 7 lines
support/scripts/qemu-boot-checker.sh new file +7
-0+ $2/support/scripts/qemu-boot-expect.py "${qemu_command_launcher}" + + if [ $? -ne 0 ]; then + echo " booting test system ... FAILED" + exit 1 + fi + echo " booting test system ... SUCCESS"
Maybe show the "booting test system" message before the test, and the FAILED or SUCCESS after ? Something like this:
printf " booting test system ..."
$2/support/scripts/qemu-boot-expect.py "${qemu_command_launcher}"
if [ $? -ne 0 ]; then
printf "FAILED\n"
exit 1
fi
printf "SUCCESS\n" support/scripts/qemu-boot-chg-defconfig.sh line 6
Quoted 12 lines
support/scripts/qemu-boot-chg-defconfig.sh new file +6
-0@@ -0,0 +1,11 @@ +#!/usr/bin/env 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"
The device_name is not used anywhere else in the script, so why are you changing it ?
support/scripts/qemu-boot-chg-defconfig.sh line 10
Quoted 4 lines
support/scripts/qemu-boot-chg-defconfig.sh new file +4
-0+ sed -i "s/tty1/ttyS0/" $2/configs/$1 + elif [ "$device_name" = "x86" ]; then + sed -i "s/tty1/ttyS0/" $2/configs/$1 + fi
Same comments as above. Also, I think this script should be run after the "make ${DEFCONFIG_NAME}" step in .gitlab-ci.yml, and operate on the .config file, not the defconfig file.
Also, a more specific sed expression would be nice. Perhaps:
sed -i '/^BR2_TARGET_GENERIC_GETTY_PORT/ s/tty1/ttyS0/'
Quoted 6 lines
support/scripts/qemu-boot-expect.py new file +0
-0
support/scripts/qemu-boot-expect.py line 8
Quoted 8 lines
support/scripts/qemu-boot-expect.py new file +8
-0@@ -0,0 +1,55 @@ +#!/usr/bin/env python +# + +import pexpect +import sys +import os + +def checkQemuExec():
Please don't use CamelCase for function names.
support/scripts/qemu-boot-expect.py line 14
Quoted 6 lines
support/scripts/qemu-boot-expect.py new file +6
-0+ qemu_exec_exists = False + for dir in os.getenv("PATH").split(':'): + if (os.path.exists(os.path.join(dir, sys.argv[1].split(" ")[0]))): + qemu_exec_exists = True + break + return qemu_exec_exists
This is more complicated than it need to be:
for dir in os.getenv("PATH").split(':'):
if (os.path.exists(os.path.join(dir, sys.argv[1].split(" ")[0]))):
return True
return Falsewill do the same.
But do we really need to check if Qemu exists ? If it doesn't the pexpect.spawn() will fail anyway.
In addition, you are doing the pexpect.spawn() *before* you check if Qemu exists, which is not very useful.
support/scripts/qemu-boot-expect.py line 17
Quoted 3 lines
support/scripts/qemu-boot-expect.py new file +3
-0+ +def main(): + global child
Pass child as argument to main().
support/scripts/qemu-boot-expect.py line 18
Quoted 1 line
support/scripts/qemu-boot-expect.py new file +1
-0+ if(checkQemuExec()):
If you keep this function for some reason, then work the other way around:
if not checkQemuExec():
print("Cannot find Qemu executable") sys.exit(1)
so that the remainder of the function does not need to be entirely indented.
Could you rework this patch and the previous one to take into account my comments, and send a new iteration ?
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 6/7 support/scripts/qemu-boot-*: gitlab tests for Qemu
Hi Thomas,
Le 03/08/2019 ? 00:24, Thomas Petazzoni a ?crit?:
Quoted 66 lines
Hello Jugurtha,
Didn't say it in my review of the previous patch, but I find this contribution very nice and useful. It will be good to have this to improve the testing of our Qemu defconfigs, for sure.
support/scripts/qemu-boot-checker.sh line 3
Quoted 9 lines · On Sun, 5 May 2019 18:53:58 +0200 Jugurtha BELKALEM…
support/scripts/qemu-boot-checker.sh new file +3
-0@@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +function archQemuNoSupport {Camel-case really hurt my eyes. Also, this function is only used once, so it's not really useful to have a function.
support/scripts/qemu-boot-checker.sh line 8
Quoted 5 lines
support/scripts/qemu-boot-checker.sh new file +5
-0+ echo "cannot boot under qemu, support out of tree!" + exit 0 +} + +if [[ $1 = qemu* ]]; thenYou should decide between [[ and [ for tests. And also, simply bail out when != qemu, so that you have one less indentation level.
So:
if [[ $1 != qemu* ]]; then
exit 0
fisupport/scripts/qemu-boot-checker.sh line 9
Quoted 1 line
support/scripts/qemu-boot-checker.sh new file +1
-0+ device_name=$(echo $1 | sed -e 's#^qemu_##; s#_defconfig$##;' | sed -r 's/[_]/-/g')Perhaps just:
device_name=$(echo $1 | sed -e 's,^qemu_\(.*\)_defconfig$,\1,; s/_/-/g')support/scripts/qemu-boot-checker.sh line 14
Quoted 5 lines
support/scripts/qemu-boot-checker.sh new file +5
-0+ if [ "$device_name" = "x86-64" ]; then + device_name="x86_64" + elif [ "$device_name" = "m68k-q800" ] || [ "$device_name" = "ork1k" ]; then + archQemuNoSupport + fiHere you can do:
case ${device_name} in x86-64) device_name="x86_64" ;; m68k-q800) ork1k) echo "No Qemu support for ${device_name}" exit 0 esacBut instead of encoding in this script which architectures can be tested with Qemu and which cannot, why not simply grep the defconfig for BR2_PACKAGE_HOST_QEMU=y ? If it has this config option, then the Qemu boot test can be done.
Quoted 4 lines
For the
x86_64case, maybe we should simply rename board/qemu/x86_64 to board/qemu/x86-64, so that it matches the other directories, where we have the same name as the defconfig, with just the _ replaced by -. This would entirely remove those special conditions.
Instead of renaming this directory and using the name of the defconfig file to search for the right readme.txt containing the qemu command line to use.
We can instead add a comment in the defconfig
$ cat qemu_aarch64_virt_defconfig # Use the Qemu command line from board/qemu/arm-vexpress/readme.txt to start Qemu.
or if we use a script launch.sh to start qemu (as suggested in the previous patch review)
# Use the script from board/qemu/arm-vexpress/launch.sh to start Qemu.
Doing so, we don't have a naming rule between defconfig file and board/qemu directory.
Thought ?
Romain
Quoted 123 lines
support/scripts/qemu-boot-checker.sh line 17
Quoted 4 lines
support/scripts/qemu-boot-checker.sh new file +3
-0+ + export PATH="$2/output/host/bin:$PATH" + qemu_command_launcher=$($2/board/qemu/${device_name}/launch.sh)Now I understand why "
launch.sh" is not launching, but just echoing the command. Still, this isn't really nice, as a script calledlaunch.shshould really launch. Another reason perhaps to simply keep the qemu command example in readme.txt, and extract it from there.support/scripts/qemu-boot-checker.sh line 24
Quoted 7 lines
support/scripts/qemu-boot-checker.sh new file +7
-0+ $2/support/scripts/qemu-boot-expect.py "${qemu_command_launcher}" + + if [ $? -ne 0 ]; then + echo " booting test system ... FAILED" + exit 1 + fi + echo " booting test system ... SUCCESS"Maybe show the "booting test system" message before the test, and the FAILED or SUCCESS after ? Something like this:
printf " booting test system ..." $2/support/scripts/qemu-boot-expect.py "${qemu_command_launcher}" if [ $? -ne 0 ]; then printf "FAILED\n" exit 1 fi printf "SUCCESS\n"support/scripts/qemu-boot-chg-defconfig.sh line 6
Quoted 12 lines
support/scripts/qemu-boot-chg-defconfig.sh new file +6
-0@@ -0,0 +1,11 @@ +#!/usr/bin/env 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"The
device_nameis not used anywhere else in the script, so why are you changing it ?support/scripts/qemu-boot-chg-defconfig.sh line 10
Quoted 4 lines
support/scripts/qemu-boot-chg-defconfig.sh new file +4
-0+ sed -i "s/tty1/ttyS0/" $2/configs/$1 + elif [ "$device_name" = "x86" ]; then + sed -i "s/tty1/ttyS0/" $2/configs/$1 + fiSame comments as above. Also, I think this script should be run after the "make ${DEFCONFIG_NAME}" step in .gitlab-ci.yml, and operate on the .config file, not the defconfig file.
Also, a more specific sed expression would be nice. Perhaps:
sed -i '/^BR2_TARGET_GENERIC_GETTY_PORT/ s/tty1/ttyS0/'Quoted 6 lines
support/scripts/qemu-boot-expect.py new file +0
-0support/scripts/qemu-boot-expect.py line 8
Quoted 8 lines
support/scripts/qemu-boot-expect.py new file +8
-0@@ -0,0 +1,55 @@ +#!/usr/bin/env python +# + +import pexpect +import sys +import os + +def checkQemuExec():Please don't use CamelCase for function names.
support/scripts/qemu-boot-expect.py line 14
Quoted 6 lines
support/scripts/qemu-boot-expect.py new file +6
-0+ qemu_exec_exists = False + for dir in os.getenv("PATH").split(':'): + if (os.path.exists(os.path.join(dir, sys.argv[1].split(" ")[0]))): + qemu_exec_exists = True + break + return qemu_exec_existsThis is more complicated than it need to be:
for dir in os.getenv("PATH").split(':'): if (os.path.exists(os.path.join(dir, sys.argv[1].split(" ")[0]))): return True return Falsewill do the same.
But do we really need to check if Qemu exists ? If it doesn't the
pexpect.spawn()will fail anyway.In addition, you are doing the
pexpect.spawn()*before* you check if Qemu exists, which is not very useful.support/scripts/qemu-boot-expect.py line 17
Quoted 3 lines
support/scripts/qemu-boot-expect.py new file +3
-0+ +def main(): + global childPass child as argument to
main().support/scripts/qemu-boot-expect.py line 18
Quoted 1 line
support/scripts/qemu-boot-expect.py new file +1
-0+ if(checkQemuExec()):If you keep this function for some reason, then work the other way around:
if not
checkQemuExec():
print("Cannot find Qemu executable")sys.exit(1)so that the remainder of the function does not need to be entirely indented.
Could you rework this patch and the previous one to take into account my comments, and send a new iteration ?
Thanks a lot!
Thomas
PATCH v2 6/7 support/scripts/qemu-boot-*: gitlab tests for Qemu
Quoted 13 lines · On Sun, 27 Oct 2019 15:32:00 +0100 Romain Naour <[email protected]> wrote:
Quoted 4 lines
For the
x86_64case, maybe we should simply rename board/qemu/x86_64 to board/qemu/x86-64, so that it matches the other directories, where we have the same name as the defconfig, with just the _ replaced by -. This would entirely remove those special conditions.Instead of renaming this directory and using the name of the defconfig file to search for the right readme.txt containing the qemu command line to use.
We can instead add a comment in the defconfig
$ cat qemu_aarch64_virt_defconfig # Use the Qemu command line from board/qemu/arm-vexpress/readme.txt to start Qemu.
Quoted 7 lines
or if we use a script
launch.shto start qemu (as suggested in the previous patch review)# Use the script from
board/qemu/arm-vexpress/launch.shto start Qemu.Doing so, we don't have a naming rule between defconfig file and board/qemu directory.
Yes, why not. Could be useful to point people at the readme.txt or launch.sh script.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 7/7 gitlab.yml.in*: enable Qemu gitlab testing
In reply to Jugurtha BELKALEMUsed 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).
--- .gitlab-ci.yml | 3 +++ .gitlab-ci.yml.in | 3 +++ 2 files changed, 6 insertions(+)
.gitlab-ci.yml +3 -0
@@ -46,6 +46,8 @@ check-package: .defconfig_base: script: - echo "Configure Buildroot for ${DEFCONFIG_NAME}" + - main_dir=$(pwd) + - ./support/scripts/qemu-boot-chg-defconfig.sh "${DEFCONFIG_NAME}" "${main_dir}" - make ${DEFCONFIG_NAME} - echo 'Build buildroot' - |
@@ -54,6 +56,7 @@ check-package: tail -200 build.log exit 1 } + - ./support/scripts/qemu-boot-checker.sh "${DEFCONFIG_NAME}" "${main_dir}" artifacts: when: always expire_in: 2 weeks
.gitlab-ci.yml.in +3 -0
@@ -46,6 +46,8 @@ check-package: .defconfig_base: script: - echo "Configure Buildroot for ${DEFCONFIG_NAME}" + - main_dir=$(pwd) + - ./support/scripts/qemu-boot-chg-defconfig.sh "${DEFCONFIG_NAME}" "${main_dir}" - make ${DEFCONFIG_NAME} - echo 'Build buildroot' - |
@@ -54,6 +56,7 @@ check-package: tail -200 build.log exit 1 } + - ./support/scripts/qemu-boot-checker.sh "${DEFCONFIG_NAME}" "${main_dir}" artifacts: when: always expire_in: 2 weeks
Signature · 1 line
2.7.4