All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing
@ 2019-11-17 20:18 Romain Naour
  2019-11-17 20:18 ` [Buildroot] [PATCH v3 for-next 01/11] configs/qemu_m68k_q800: remove host-qemu Romain Naour
                   ` (11 more replies)
  0 siblings, 12 replies; 21+ messages in thread
From: Romain Naour @ 2019-11-17 20:18 UTC (permalink / raw)
  To: buildroot

This new iteration take into account the previous review with
some additional rework.

This series start by removing useless host-qemu build for
m68k_q800, enable serial console for x86/x86_64 and some
refactoring for csky and arm-versatile.

Replace the readme.txt file by a bash script that ease starting
Qemu. Then a new comment is added to each Qemu defconfig files in
order to provide the path to this new script.
This path help to link each Qemu defconfig with it's own script.

Add new python script to be used by gitlab to start Qemu when
a Qemu defconfig is built.

Finally add this new python script to .gitlab-ci.yml.

http://lists.busybox.net/pipermail/buildroot/2019-May/249432.html

Jugurtha BELKALEM (3):
  board/qemu/*/launch.sh: add qemu launch script
  support/scripts/boot-qemu-image.py: boot Qemu images with Qemu-system.
  gitlab.yml.in*: enable Qemu gitlab testing

Romain Naour (8):
  configs/qemu_m68k_q800: remove host-qemu
  configs/qemu{x86,x86_64}: add a serial console
  board/qemu/arm-versatile: move arm-versatile nommu stuff to
    board/qemu/arm-versatile-nommu
  board/qemu/csky: move csky610 stuff to board/qemu/csky610-virt
  board/qemu/csky: move csky807 stuff to board/qemu/csky807-virt
  board/qemu/csky: move csky810 stuff to board/qemu/csky810-virt
  board/qemu/csky: move csky860 stuff to board/qemu/csky860-virt
  configs/qemu-*: add a comment to provide the path launch.sh script for
    each Qemu defconfig

 .gitlab-ci.yml                                |   7 ++
 .gitlab-ci.yml.in                             |   7 ++
 board/qemu/aarch64-virt/launch.sh             |   7 ++
 board/qemu/aarch64-virt/readme.txt            |   7 --
 board/qemu/arm-versatile-nommu/launch.sh      |   8 ++
 .../linux.config}                             |   0
 .../patches/linux/versatile-nommu.patch       |   0
 board/qemu/arm-versatile/launch.sh            |   8 ++
 board/qemu/arm-versatile/readme.txt           |  12 --
 board/qemu/arm-vexpress-tz/launch.sh          |   3 +
 board/qemu/arm-vexpress/launch.sh             |  11 ++
 board/qemu/arm-vexpress/readme.txt            |  11 --
 board/qemu/csky/readme.txt                    |  12 --
 board/qemu/csky610-virt/launch.sh             |   5 +
 .../linux.config.fragment}                    |   0
 board/qemu/csky807-virt/launch.sh             |   5 +
 .../linux.config.fragment}                    |   0
 board/qemu/csky810-virt/launch.sh             |   5 +
 .../linux.config.fragment}                    |   0
 board/qemu/csky860-virt/launch.sh             |   5 +
 .../linux.config.fragment}                    |   0
 board/qemu/m68k-mcf5208/launch.sh             |   7 ++
 board/qemu/m68k-mcf5208/readme.txt            |   7 --
 board/qemu/m68k-q800/launch.sh                |   8 ++
 board/qemu/m68k-q800/readme.txt               |   8 --
 board/qemu/microblazebe-mmu/launch.sh         |   7 ++
 board/qemu/microblazebe-mmu/readme.txt        |   7 --
 board/qemu/microblazeel-mmu/launch.sh         |   7 ++
 board/qemu/microblazeel-mmu/readme.txt        |   7 --
 board/qemu/mips32r2-malta/launch.sh           |   2 +
 board/qemu/mips32r2-malta/readme.txt          |   9 --
 board/qemu/mips32r2el-malta/launch.sh         |   9 ++
 board/qemu/mips32r2el-malta/readme.txt        |   9 --
 board/qemu/mips32r6-malta/launch.sh           |   7 ++
 board/qemu/mips32r6-malta/readme.txt          |   7 --
 board/qemu/mips32r6el-malta/launch.sh         |   7 ++
 board/qemu/mips32r6el-malta/readme.txt        |   7 --
 board/qemu/mips64-malta/launch.sh             |   8 ++
 board/qemu/mips64-malta/readme.txt            |   8 --
 board/qemu/mips64el-malta/launch.sh           |   8 ++
 board/qemu/mips64el-malta/readme.txt          |   8 --
 board/qemu/mips64r6-malta/launch.sh           |   7 ++
 board/qemu/mips64r6-malta/readme.txt          |   7 --
 board/qemu/mips64r6el-malta/launch.sh         |   7 ++
 board/qemu/mips64r6el-malta/readme.txt        |   7 --
 board/qemu/nios2-10m50/launch.sh              |   7 ++
 board/qemu/nios2-10m50/readme.txt             |   7 --
 board/qemu/or1k/launch.sh                     |   9 ++
 board/qemu/or1k/readme.txt                    |   9 --
 board/qemu/ppc-g3beige/launch.sh              |   8 ++
 board/qemu/ppc-g3beige/readme.txt             |   8 --
 board/qemu/ppc-mac99/launch.sh                |   5 +
 board/qemu/ppc-mac99/readme.txt               |   5 -
 board/qemu/ppc-mpc8544ds/launch.sh            |   7 ++
 board/qemu/ppc-mpc8544ds/readme.txt           |   7 --
 board/qemu/ppc-virtex-ml507/launch.sh         |   7 ++
 board/qemu/ppc-virtex-ml507/readme.txt        |   7 --
 board/qemu/ppc64-e5500/launch.sh              |   7 ++
 board/qemu/ppc64-e5500/readme.txt             |   7 --
 board/qemu/ppc64-pseries/launch.sh            |   7 ++
 board/qemu/ppc64-pseries/readme.txt           |   7 --
 board/qemu/ppc64le-pseries/launch.sh          |   7 ++
 board/qemu/ppc64le-pseries/readme.txt         |   7 --
 board/qemu/riscv32-virt/launch.sh             |   7 ++
 board/qemu/riscv32-virt/readme.txt            |   7 --
 board/qemu/riscv64-virt/launch.sh             |   8 ++
 board/qemu/riscv64-virt/readme.txt            |   7 --
 board/qemu/sh4-r2d/launch.sh                  |   9 ++
 board/qemu/sh4-r2d/readme.txt                 |   8 --
 board/qemu/sh4eb-r2d/launch.sh                |   8 ++
 board/qemu/sh4eb-r2d/readme.txt               |   8 --
 board/qemu/sparc-ss10/launch.sh               |   7 ++
 board/qemu/sparc-ss10/readme.txt              |   7 --
 board/qemu/sparc64-sun4u/launch.sh            |   7 ++
 board/qemu/sparc64-sun4u/readme.txt           |   7 --
 board/qemu/x86/launch.sh                      |   9 ++
 board/qemu/x86/post-build.sh                  |  11 ++
 board/qemu/x86/readme.txt                     |   9 --
 board/qemu/x86_64/launch.sh                   |   9 ++
 board/qemu/x86_64/post-build.sh               |  11 ++
 board/qemu/x86_64/readme.txt                  |   9 --
 board/qemu/xtensa-lx60/launch.sh              |   7 ++
 board/qemu/xtensa-lx60/readme.txt             |   7 --
 configs/qemu_aarch64_virt_defconfig           |   2 +
 configs/qemu_arm_versatile_defconfig          |   2 +
 configs/qemu_arm_versatile_nommu_defconfig    |   6 +-
 configs/qemu_arm_vexpress_defconfig           |   2 +
 configs/qemu_arm_vexpress_tz_defconfig        |   2 +
 configs/qemu_csky610_virt_defconfig           |   4 +-
 configs/qemu_csky807_virt_defconfig           |   4 +-
 configs/qemu_csky810_virt_defconfig           |   4 +-
 configs/qemu_csky860_virt_defconfig           |   4 +-
 configs/qemu_m68k_mcf5208_defconfig           |   2 +
 configs/qemu_m68k_q800_defconfig              |   6 +-
 configs/qemu_microblazebe_mmu_defconfig       |   2 +
 configs/qemu_microblazeel_mmu_defconfig       |   2 +
 configs/qemu_mips32r2_malta_defconfig         |   2 +
 configs/qemu_mips32r2el_malta_defconfig       |   2 +
 configs/qemu_mips32r6_malta_defconfig         |   2 +
 configs/qemu_mips32r6el_malta_defconfig       |   2 +
 configs/qemu_mips64_malta_defconfig           |   2 +
 configs/qemu_mips64el_malta_defconfig         |   2 +
 configs/qemu_mips64r6_malta_defconfig         |   2 +
 configs/qemu_mips64r6el_malta_defconfig       |   2 +
 configs/qemu_nios2_10m50_defconfig            |   2 +
 configs/qemu_or1k_defconfig                   |   2 +
 configs/qemu_ppc64_e5500_defconfig            |   2 +
 configs/qemu_ppc64_pseries_defconfig          |   2 +
 configs/qemu_ppc64le_pseries_defconfig        |   2 +
 configs/qemu_ppc_g3beige_defconfig            |   2 +
 configs/qemu_ppc_mac99_defconfig              |   2 +
 configs/qemu_ppc_mpc8544ds_defconfig          |   2 +
 configs/qemu_ppc_virtex_ml507_defconfig       |   2 +
 configs/qemu_riscv32_virt_defconfig           |   2 +
 configs/qemu_riscv64_virt_defconfig           |   2 +
 configs/qemu_sh4_r2d_defconfig                |   2 +
 configs/qemu_sh4eb_r2d_defconfig              |   2 +
 configs/qemu_sparc64_sun4u_defconfig          |   2 +
 configs/qemu_sparc_ss10_defconfig             |   2 +
 configs/qemu_x86_64_defconfig                 |   6 +-
 configs/qemu_x86_defconfig                    |   6 +-
 configs/qemu_xtensa_lx60_defconfig            |   2 +
 configs/qemu_xtensa_lx60_nommu_defconfig      |   2 +
 support/scripts/boot-qemu-image.py            | 109 ++++++++++++++++++
 124 files changed, 511 insertions(+), 280 deletions(-)
 create mode 100755 board/qemu/aarch64-virt/launch.sh
 delete mode 100644 board/qemu/aarch64-virt/readme.txt
 create mode 100644 board/qemu/arm-versatile-nommu/launch.sh
 rename board/qemu/{arm-versatile/linux-nommu.config => arm-versatile-nommu/linux.config} (100%)
 rename board/qemu/{arm-versatile => arm-versatile-nommu}/patches/linux/versatile-nommu.patch (100%)
 create mode 100755 board/qemu/arm-versatile/launch.sh
 delete mode 100644 board/qemu/arm-versatile/readme.txt
 create mode 100644 board/qemu/arm-vexpress-tz/launch.sh
 create mode 100755 board/qemu/arm-vexpress/launch.sh
 delete mode 100644 board/qemu/arm-vexpress/readme.txt
 delete mode 100644 board/qemu/csky/readme.txt
 create mode 100644 board/qemu/csky610-virt/launch.sh
 rename board/qemu/{csky/linux-ck610.config.fragment => csky610-virt/linux.config.fragment} (100%)
 create mode 100644 board/qemu/csky807-virt/launch.sh
 rename board/qemu/{csky/linux-ck807.config.fragment => csky807-virt/linux.config.fragment} (100%)
 create mode 100644 board/qemu/csky810-virt/launch.sh
 rename board/qemu/{csky/linux-ck810.config.fragment => csky810-virt/linux.config.fragment} (100%)
 create mode 100644 board/qemu/csky860-virt/launch.sh
 rename board/qemu/{csky/linux-ck860.config.fragment => csky860-virt/linux.config.fragment} (100%)
 create mode 100755 board/qemu/m68k-mcf5208/launch.sh
 delete mode 100644 board/qemu/m68k-mcf5208/readme.txt
 create mode 100755 board/qemu/m68k-q800/launch.sh
 delete mode 100644 board/qemu/m68k-q800/readme.txt
 create mode 100755 board/qemu/microblazebe-mmu/launch.sh
 delete mode 100644 board/qemu/microblazebe-mmu/readme.txt
 create mode 100755 board/qemu/microblazeel-mmu/launch.sh
 delete mode 100644 board/qemu/microblazeel-mmu/readme.txt
 create mode 100755 board/qemu/mips32r2-malta/launch.sh
 delete mode 100644 board/qemu/mips32r2-malta/readme.txt
 create mode 100755 board/qemu/mips32r2el-malta/launch.sh
 delete mode 100644 board/qemu/mips32r2el-malta/readme.txt
 create mode 100755 board/qemu/mips32r6-malta/launch.sh
 delete mode 100644 board/qemu/mips32r6-malta/readme.txt
 create mode 100755 board/qemu/mips32r6el-malta/launch.sh
 delete mode 100644 board/qemu/mips32r6el-malta/readme.txt
 create mode 100755 board/qemu/mips64-malta/launch.sh
 delete mode 100644 board/qemu/mips64-malta/readme.txt
 create mode 100755 board/qemu/mips64el-malta/launch.sh
 delete mode 100644 board/qemu/mips64el-malta/readme.txt
 create mode 100755 board/qemu/mips64r6-malta/launch.sh
 delete mode 100644 board/qemu/mips64r6-malta/readme.txt
 create mode 100755 board/qemu/mips64r6el-malta/launch.sh
 delete mode 100644 board/qemu/mips64r6el-malta/readme.txt
 create mode 100755 board/qemu/nios2-10m50/launch.sh
 delete mode 100644 board/qemu/nios2-10m50/readme.txt
 create mode 100755 board/qemu/or1k/launch.sh
 delete mode 100644 board/qemu/or1k/readme.txt
 create mode 100755 board/qemu/ppc-g3beige/launch.sh
 delete mode 100644 board/qemu/ppc-g3beige/readme.txt
 create mode 100644 board/qemu/ppc-mac99/launch.sh
 delete mode 100644 board/qemu/ppc-mac99/readme.txt
 create mode 100755 board/qemu/ppc-mpc8544ds/launch.sh
 delete mode 100644 board/qemu/ppc-mpc8544ds/readme.txt
 create mode 100755 board/qemu/ppc-virtex-ml507/launch.sh
 delete mode 100644 board/qemu/ppc-virtex-ml507/readme.txt
 create mode 100755 board/qemu/ppc64-e5500/launch.sh
 delete mode 100644 board/qemu/ppc64-e5500/readme.txt
 create mode 100755 board/qemu/ppc64-pseries/launch.sh
 delete mode 100644 board/qemu/ppc64-pseries/readme.txt
 create mode 100755 board/qemu/ppc64le-pseries/launch.sh
 delete mode 100644 board/qemu/ppc64le-pseries/readme.txt
 create mode 100755 board/qemu/riscv32-virt/launch.sh
 delete mode 100644 board/qemu/riscv32-virt/readme.txt
 create mode 100755 board/qemu/riscv64-virt/launch.sh
 delete mode 100644 board/qemu/riscv64-virt/readme.txt
 create mode 100755 board/qemu/sh4-r2d/launch.sh
 delete mode 100644 board/qemu/sh4-r2d/readme.txt
 create mode 100755 board/qemu/sh4eb-r2d/launch.sh
 delete mode 100644 board/qemu/sh4eb-r2d/readme.txt
 create mode 100755 board/qemu/sparc-ss10/launch.sh
 delete mode 100644 board/qemu/sparc-ss10/readme.txt
 create mode 100755 board/qemu/sparc64-sun4u/launch.sh
 delete mode 100644 board/qemu/sparc64-sun4u/readme.txt
 create mode 100755 board/qemu/x86/launch.sh
 create mode 100755 board/qemu/x86/post-build.sh
 delete mode 100644 board/qemu/x86/readme.txt
 create mode 100755 board/qemu/x86_64/launch.sh
 create mode 100755 board/qemu/x86_64/post-build.sh
 delete mode 100644 board/qemu/x86_64/readme.txt
 create mode 100755 board/qemu/xtensa-lx60/launch.sh
 delete mode 100644 board/qemu/xtensa-lx60/readme.txt
 create mode 100755 support/scripts/boot-qemu-image.py

-- 
2.21.0

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

* [Buildroot] [PATCH v3 for-next 01/11] configs/qemu_m68k_q800: remove host-qemu
  2019-11-17 20:18 [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
@ 2019-11-17 20:18 ` Romain Naour
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 02/11] configs/qemu{x86, x86_64}: add a serial console Romain Naour
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Romain Naour @ 2019-11-17 20:18 UTC (permalink / raw)
  To: buildroot

Building upstream host-qemu for m68k_q800 is useless
since it doesn't support the q800 machine:

qemu-system-m68k: -M q800: unsupported machine type

This defconfig mush be used with the QEMU fork from [1]
using q800-v2.11.0 branch.

[1] https://github.com/vivier/qemu-m68k

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 configs/qemu_m68k_q800_defconfig | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/configs/qemu_m68k_q800_defconfig b/configs/qemu_m68k_q800_defconfig
index ce264430fd..0dd90a97b3 100644
--- a/configs/qemu_m68k_q800_defconfig
+++ b/configs/qemu_m68k_q800_defconfig
@@ -23,7 +23,3 @@ 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
-- 
2.21.0

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

* [Buildroot] [PATCH v3 for-next 02/11] configs/qemu{x86, x86_64}: add a serial console
  2019-11-17 20:18 [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
  2019-11-17 20:18 ` [Buildroot] [PATCH v3 for-next 01/11] configs/qemu_m68k_q800: remove host-qemu Romain Naour
@ 2019-11-17 20:19 ` Romain Naour
  2019-11-22 11:27   ` Carlos Santos
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 03/11] board/qemu/arm-versatile: move arm-versatile nommu stuff to board/qemu/arm-versatile-nommu Romain Naour
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 21+ messages in thread
From: Romain Naour @ 2019-11-17 20:19 UTC (permalink / raw)
  To: buildroot

The current Buildroot defconfigs for qemu_x86 and qemu_x86_64
instantiate a console on tty1, which appears on QEMU's
graphical window. Add a console on the serial port (ttyS0) to
be used later for gitlab testing.

This change is need since the script used for gitlab testing
needs to use a serial output with pexpect.

This change is similar to the one made for raspberrypi [1] to
handle HDMI and serial console:

This requires three changes:
 1. have two 'console=' entries in the kernel command line: tty1,
    then ttyS0;
 2. change BR2_TARGET_GENERIC_GETTY_PORT to "console", so it starts
    a getty on the last console= passed to the kernel, ttyS0;
 3. add a new getty on tty1 to the generated inittab.

Step 2 is actually obtained by removing BR2_TARGET_GENERIC_GETTY_PORT
entirely from the defconfigs, since "console" is the default value.

Step 3 requires a post-build script since the Buildroot makefiles can
configure only one console.

Note: instead of simply adding a new getty on ttyS0 (which would
work) this patch actually changes BR2_TARGET_GENERIC_GETTY_PORT to
instantiate a console on UART, then adds back tty1 via
post-build.sh. This is done only to avoid the "GENERIC_SERIAL" comment
where we instantiate a console on QEMU graphical window, then
instantiate a really-serial console on another line.

The result is these two inittab lines:

  console::respawn:/sbin/getty -L  console 0 vt100 # GENERIC_SERIAL
  tty1::respawn:/sbin/getty -L  tty1 0 vt100 # QEMU graphical window

[1] 20878a1017e2bf7eb8c5f870dc6d2641493cb0f9

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 board/qemu/x86/post-build.sh    | 11 +++++++++++
 board/qemu/x86/readme.txt       |  2 +-
 board/qemu/x86_64/post-build.sh | 11 +++++++++++
 board/qemu/x86_64/readme.txt    |  2 +-
 configs/qemu_x86_64_defconfig   |  4 ++--
 configs/qemu_x86_defconfig      |  4 ++--
 6 files changed, 28 insertions(+), 6 deletions(-)
 create mode 100755 board/qemu/x86/post-build.sh
 create mode 100755 board/qemu/x86_64/post-build.sh

diff --git a/board/qemu/x86/post-build.sh b/board/qemu/x86/post-build.sh
new file mode 100755
index 0000000000..bf83a002c2
--- /dev/null
+++ b/board/qemu/x86/post-build.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -u
+set -e
+
+# Add a console on tty1
+if [ -e ${TARGET_DIR}/etc/inittab ]; then
+    grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \
+	sed -i '/GENERIC_SERIAL/a\
+tty1::respawn:/sbin/getty -L  tty1 0 vt100 # QEMU graphical window' ${TARGET_DIR}/etc/inittab
+fi
diff --git a/board/qemu/x86/readme.txt b/board/qemu/x86/readme.txt
index 42fc2439da..3bbafecf91 100644
--- a/board/qemu/x86/readme.txt
+++ b/board/qemu/x86/readme.txt
@@ -1,6 +1,6 @@
 Run the emulation with:
 
-  qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "rootwait root=/dev/vda" -net nic,model=virtio -net user
+  qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "rootwait root=/dev/vda console=tty1 console=ttyS0" -serial stdio -net nic,model=virtio -net user
 
 Optionally add -smp N to emulate a SMP system with N CPUs.
 
diff --git a/board/qemu/x86_64/post-build.sh b/board/qemu/x86_64/post-build.sh
new file mode 100755
index 0000000000..bf83a002c2
--- /dev/null
+++ b/board/qemu/x86_64/post-build.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -u
+set -e
+
+# Add a console on tty1
+if [ -e ${TARGET_DIR}/etc/inittab ]; then
+    grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \
+	sed -i '/GENERIC_SERIAL/a\
+tty1::respawn:/sbin/getty -L  tty1 0 vt100 # QEMU graphical window' ${TARGET_DIR}/etc/inittab
+fi
diff --git a/board/qemu/x86_64/readme.txt b/board/qemu/x86_64/readme.txt
index 4a1c0c0ff5..93ac22a947 100644
--- a/board/qemu/x86_64/readme.txt
+++ b/board/qemu/x86_64/readme.txt
@@ -1,6 +1,6 @@
 Run the emulation with:
 
-  qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "rootwait root=/dev/vda" -net nic,model=virtio -net user
+  qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "rootwait root=/dev/vda console=tty1 console=ttyS0" -serial stdio -net nic,model=virtio -net user
 
 Optionally add -smp N to emulate a SMP system with N CPUs.
 
diff --git a/configs/qemu_x86_64_defconfig b/configs/qemu_x86_64_defconfig
index c3c0991fcc..f9d868d169 100644
--- a/configs/qemu_x86_64_defconfig
+++ b/configs/qemu_x86_64_defconfig
@@ -3,11 +3,11 @@ BR2_x86_64=y
 
 # System
 BR2_SYSTEM_DHCP="eth0"
-BR2_TARGET_GENERIC_GETTY_PORT="tty1"
 
-# Filesystem
+# Filesystem / image
 BR2_TARGET_ROOTFS_EXT2=y
 # BR2_TARGET_ROOTFS_TAR is not set
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh"
 
 # Linux headers same as kernel, a 4.19 series
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
diff --git a/configs/qemu_x86_defconfig b/configs/qemu_x86_defconfig
index 6d68b7d71f..cb68b5f4ff 100644
--- a/configs/qemu_x86_defconfig
+++ b/configs/qemu_x86_defconfig
@@ -4,11 +4,11 @@ BR2_x86_pentiumpro=y
 
 # System
 BR2_SYSTEM_DHCP="eth0"
-BR2_TARGET_GENERIC_GETTY_PORT="tty1"
 
-# Filesystem
+# Filesystem / image
 BR2_TARGET_ROOTFS_EXT2=y
 # BR2_TARGET_ROOTFS_TAR is not set
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86/post-build.sh"
 
 # Linux headers same as kernel, a 4.19 series
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
-- 
2.21.0

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

* [Buildroot] [PATCH v3 for-next 03/11] board/qemu/arm-versatile: move arm-versatile nommu stuff to board/qemu/arm-versatile-nommu
  2019-11-17 20:18 [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
  2019-11-17 20:18 ` [Buildroot] [PATCH v3 for-next 01/11] configs/qemu_m68k_q800: remove host-qemu Romain Naour
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 02/11] configs/qemu{x86, x86_64}: add a serial console Romain Naour
@ 2019-11-17 20:19 ` Romain Naour
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 04/11] board/qemu/csky: move csky610 stuff to board/qemu/csky610-virt Romain Naour
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Romain Naour @ 2019-11-17 20:19 UTC (permalink / raw)
  To: buildroot

In order to indroduce automated gitlab testing for all qemu defconfig,
split arm-versatile (MMU) and arm-versatile (noMMU) to a separate
directory.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 .../linux-nommu.config => arm-versatile-nommu/linux.config}   | 0
 .../patches/linux/versatile-nommu.patch                       | 0
 board/qemu/{arm-versatile => arm-versatile-nommu}/readme.txt  | 4 ----
 board/qemu/arm-versatile/readme.txt                           | 4 ----
 configs/qemu_arm_versatile_nommu_defconfig                    | 4 ++--
 5 files changed, 2 insertions(+), 10 deletions(-)
 rename board/qemu/{arm-versatile/linux-nommu.config => arm-versatile-nommu/linux.config} (100%)
 rename board/qemu/{arm-versatile => arm-versatile-nommu}/patches/linux/versatile-nommu.patch (100%)
 copy board/qemu/{arm-versatile => arm-versatile-nommu}/readme.txt (53%)

diff --git a/board/qemu/arm-versatile/linux-nommu.config b/board/qemu/arm-versatile-nommu/linux.config
similarity index 100%
rename from board/qemu/arm-versatile/linux-nommu.config
rename to board/qemu/arm-versatile-nommu/linux.config
diff --git a/board/qemu/arm-versatile/patches/linux/versatile-nommu.patch b/board/qemu/arm-versatile-nommu/patches/linux/versatile-nommu.patch
similarity index 100%
rename from board/qemu/arm-versatile/patches/linux/versatile-nommu.patch
rename to board/qemu/arm-versatile-nommu/patches/linux/versatile-nommu.patch
diff --git a/board/qemu/arm-versatile/readme.txt b/board/qemu/arm-versatile-nommu/readme.txt
similarity index 53%
copy from board/qemu/arm-versatile/readme.txt
copy to board/qemu/arm-versatile-nommu/readme.txt
index f3a9e1ab47..d25cc4dc00 100644
--- a/board/qemu/arm-versatile/readme.txt
+++ b/board/qemu/arm-versatile-nommu/readme.txt
@@ -1,9 +1,5 @@
 Run the emulation with:
 
-  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 "rootwait root=/dev/sda console=ttyAMA0,115200" -serial stdio -net nic,model=rtl8139 -net user
-
-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
diff --git a/board/qemu/arm-versatile/readme.txt b/board/qemu/arm-versatile/readme.txt
index f3a9e1ab47..e514cefe82 100644
--- a/board/qemu/arm-versatile/readme.txt
+++ b/board/qemu/arm-versatile/readme.txt
@@ -2,10 +2,6 @@ Run the emulation with:
 
   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 "rootwait root=/dev/sda console=ttyAMA0,115200" -serial stdio -net nic,model=rtl8139 -net user
 
-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.
 
diff --git a/configs/qemu_arm_versatile_nommu_defconfig b/configs/qemu_arm_versatile_nommu_defconfig
index ae4353d0a5..c4fefeef48 100644
--- a/configs/qemu_arm_versatile_nommu_defconfig
+++ b/configs/qemu_arm_versatile_nommu_defconfig
@@ -7,7 +7,7 @@ BR2_PACKAGE_HOST_ELF2FLT=y
 # BR2_USE_MMU is not set
 
 # Patches
-BR2_GLOBAL_PATCH_DIR="board/qemu/arm-versatile/patches"
+BR2_GLOBAL_PATCH_DIR="board/qemu/arm-versatile-nommu/patches"
 
 # Busybox with hush
 BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
@@ -29,7 +29,7 @@ BR2_LINUX_KERNEL=y
 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/arm-versatile/linux-nommu.config"
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/arm-versatile-nommu/linux.config"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="versatile-pb"
 
-- 
2.21.0

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

* [Buildroot] [PATCH v3 for-next 04/11] board/qemu/csky: move csky610 stuff to board/qemu/csky610-virt
  2019-11-17 20:18 [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
                   ` (2 preceding siblings ...)
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 03/11] board/qemu/arm-versatile: move arm-versatile nommu stuff to board/qemu/arm-versatile-nommu Romain Naour
@ 2019-11-17 20:19 ` Romain Naour
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 05/11] board/qemu/csky: move csky807 stuff to board/qemu/csky807-virt Romain Naour
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Romain Naour @ 2019-11-17 20:19 UTC (permalink / raw)
  To: buildroot

In order to indroduce automated gitlab testing for all qemu defconfig,
split all csky boards to a separate directory.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 board/qemu/csky/readme.txt                                   | 3 ---
 .../linux.config.fragment}                                   | 0
 board/qemu/csky610-virt/readme.txt                           | 5 +++++
 configs/qemu_csky610_virt_defconfig                          | 2 +-
 4 files changed, 6 insertions(+), 4 deletions(-)
 rename board/qemu/{csky/linux-ck610.config.fragment => csky610-virt/linux.config.fragment} (100%)
 create mode 100644 board/qemu/csky610-virt/readme.txt

diff --git a/board/qemu/csky/readme.txt b/board/qemu/csky/readme.txt
index 89d68aafb8..897b1ee7a0 100644
--- a/board/qemu/csky/readme.txt
+++ b/board/qemu/csky/readme.txt
@@ -6,7 +6,4 @@ For ck860 smp:
 For ck810/ck807:
  qemu-system-cskyv2 -M virt -nographic -kernel vmlinux
 
-For ck610:
- qemu-system-cskyv1 -M virt -nographic -kernel vmlinux
-
 The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/board/qemu/csky/linux-ck610.config.fragment b/board/qemu/csky610-virt/linux.config.fragment
similarity index 100%
rename from board/qemu/csky/linux-ck610.config.fragment
rename to board/qemu/csky610-virt/linux.config.fragment
diff --git a/board/qemu/csky610-virt/readme.txt b/board/qemu/csky610-virt/readme.txt
new file mode 100644
index 0000000000..6f9f7c18ce
--- /dev/null
+++ b/board/qemu/csky610-virt/readme.txt
@@ -0,0 +1,5 @@
+Run with qemu:
+
+ qemu-system-cskyv1 -M virt -nographic -kernel vmlinux
+
+The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/configs/qemu_csky610_virt_defconfig b/configs/qemu_csky610_virt_defconfig
index f337bd7eb4..be5fee8c6a 100644
--- a/configs/qemu_csky610_virt_defconfig
+++ b/configs/qemu_csky610_virt_defconfig
@@ -13,4 +13,4 @@ BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0.12"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/csky/linux-ck610.config.fragment"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/csky610-virt/linux.config.fragment"
-- 
2.21.0

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

* [Buildroot] [PATCH v3 for-next 05/11] board/qemu/csky: move csky807 stuff to board/qemu/csky807-virt
  2019-11-17 20:18 [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
                   ` (3 preceding siblings ...)
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 04/11] board/qemu/csky: move csky610 stuff to board/qemu/csky610-virt Romain Naour
@ 2019-11-17 20:19 ` Romain Naour
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 06/11] board/qemu/csky: move csky810 stuff to board/qemu/csky810-virt Romain Naour
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Romain Naour @ 2019-11-17 20:19 UTC (permalink / raw)
  To: buildroot

In order to indroduce automated gitlab testing for all qemu defconfig,
split all csky boards to a separate directory.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 board/qemu/csky/readme.txt                                   | 2 +-
 .../linux.config.fragment}                                   | 0
 board/qemu/csky807-virt/readme.txt                           | 5 +++++
 configs/qemu_csky807_virt_defconfig                          | 2 +-
 4 files changed, 7 insertions(+), 2 deletions(-)
 rename board/qemu/{csky/linux-ck807.config.fragment => csky807-virt/linux.config.fragment} (100%)
 create mode 100644 board/qemu/csky807-virt/readme.txt

diff --git a/board/qemu/csky/readme.txt b/board/qemu/csky/readme.txt
index 897b1ee7a0..433339c4b6 100644
--- a/board/qemu/csky/readme.txt
+++ b/board/qemu/csky/readme.txt
@@ -3,7 +3,7 @@ Run with qemu:
 For ck860 smp:
  qemu-system-cskyv2 -M virt -cpu ck860 -smp 2 -nographic -kernel vmlinux
 
-For ck810/ck807:
+For ck810:
  qemu-system-cskyv2 -M virt -nographic -kernel vmlinux
 
 The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/board/qemu/csky/linux-ck807.config.fragment b/board/qemu/csky807-virt/linux.config.fragment
similarity index 100%
rename from board/qemu/csky/linux-ck807.config.fragment
rename to board/qemu/csky807-virt/linux.config.fragment
diff --git a/board/qemu/csky807-virt/readme.txt b/board/qemu/csky807-virt/readme.txt
new file mode 100644
index 0000000000..20b7fa312b
--- /dev/null
+++ b/board/qemu/csky807-virt/readme.txt
@@ -0,0 +1,5 @@
+Run with qemu:
+
+qemu-system-cskyv2 -M virt -nographic -kernel vmlinux
+
+The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/configs/qemu_csky807_virt_defconfig b/configs/qemu_csky807_virt_defconfig
index c4a10b8ade..09e0e3dd01 100644
--- a/configs/qemu_csky807_virt_defconfig
+++ b/configs/qemu_csky807_virt_defconfig
@@ -13,4 +13,4 @@ BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0.12"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/csky/linux-ck807.config.fragment"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/csky807-virt/linux.config.fragment"
-- 
2.21.0

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

* [Buildroot] [PATCH v3 for-next 06/11] board/qemu/csky: move csky810 stuff to board/qemu/csky810-virt
  2019-11-17 20:18 [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
                   ` (4 preceding siblings ...)
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 05/11] board/qemu/csky: move csky807 stuff to board/qemu/csky807-virt Romain Naour
@ 2019-11-17 20:19 ` Romain Naour
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 07/11] board/qemu/csky: move csky860 stuff to board/qemu/csky860-virt Romain Naour
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Romain Naour @ 2019-11-17 20:19 UTC (permalink / raw)
  To: buildroot

In order to indroduce automated gitlab testing for all qemu defconfig,
split all csky boards to a separate directory.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 board/qemu/csky/readme.txt                                    | 3 ---
 .../linux.config.fragment}                                    | 0
 board/qemu/{csky => csky810-virt}/readme.txt                  | 4 ----
 configs/qemu_csky810_virt_defconfig                           | 2 +-
 4 files changed, 1 insertion(+), 8 deletions(-)
 rename board/qemu/{csky/linux-ck810.config.fragment => csky810-virt/linux.config.fragment} (100%)
 copy board/qemu/{csky => csky810-virt}/readme.txt (62%)

diff --git a/board/qemu/csky/readme.txt b/board/qemu/csky/readme.txt
index 433339c4b6..f7cd01b021 100644
--- a/board/qemu/csky/readme.txt
+++ b/board/qemu/csky/readme.txt
@@ -3,7 +3,4 @@ Run with qemu:
 For ck860 smp:
  qemu-system-cskyv2 -M virt -cpu ck860 -smp 2 -nographic -kernel vmlinux
 
-For ck810:
- qemu-system-cskyv2 -M virt -nographic -kernel vmlinux
-
 The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/board/qemu/csky/linux-ck810.config.fragment b/board/qemu/csky810-virt/linux.config.fragment
similarity index 100%
rename from board/qemu/csky/linux-ck810.config.fragment
rename to board/qemu/csky810-virt/linux.config.fragment
diff --git a/board/qemu/csky/readme.txt b/board/qemu/csky810-virt/readme.txt
similarity index 62%
copy from board/qemu/csky/readme.txt
copy to board/qemu/csky810-virt/readme.txt
index 433339c4b6..758e436467 100644
--- a/board/qemu/csky/readme.txt
+++ b/board/qemu/csky810-virt/readme.txt
@@ -1,9 +1,5 @@
 Run with qemu:
 
-For ck860 smp:
- qemu-system-cskyv2 -M virt -cpu ck860 -smp 2 -nographic -kernel vmlinux
-
-For ck810:
  qemu-system-cskyv2 -M virt -nographic -kernel vmlinux
 
 The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/configs/qemu_csky810_virt_defconfig b/configs/qemu_csky810_virt_defconfig
index 56efe8a6ae..f6d3b82206 100644
--- a/configs/qemu_csky810_virt_defconfig
+++ b/configs/qemu_csky810_virt_defconfig
@@ -13,4 +13,4 @@ BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0.12"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/csky/linux-ck810.config.fragment"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/csky810-virt/linux.config.fragment"
-- 
2.21.0

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

* [Buildroot] [PATCH v3 for-next 07/11] board/qemu/csky: move csky860 stuff to board/qemu/csky860-virt
  2019-11-17 20:18 [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
                   ` (5 preceding siblings ...)
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 06/11] board/qemu/csky: move csky810 stuff to board/qemu/csky810-virt Romain Naour
@ 2019-11-17 20:19 ` Romain Naour
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 08/11] board/qemu/*/launch.sh: add qemu launch script Romain Naour
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Romain Naour @ 2019-11-17 20:19 UTC (permalink / raw)
  To: buildroot

In order to indroduce automated gitlab testing for all qemu defconfig,
split all csky boards to a separate directory.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 .../linux.config.fragment}                                      | 0
 board/qemu/{csky => csky860-virt}/readme.txt                    | 1 -
 configs/qemu_csky860_virt_defconfig                             | 2 +-
 3 files changed, 1 insertion(+), 2 deletions(-)
 rename board/qemu/{csky/linux-ck860.config.fragment => csky860-virt/linux.config.fragment} (100%)
 rename board/qemu/{csky => csky860-virt}/readme.txt (92%)

diff --git a/board/qemu/csky/linux-ck860.config.fragment b/board/qemu/csky860-virt/linux.config.fragment
similarity index 100%
rename from board/qemu/csky/linux-ck860.config.fragment
rename to board/qemu/csky860-virt/linux.config.fragment
diff --git a/board/qemu/csky/readme.txt b/board/qemu/csky860-virt/readme.txt
similarity index 92%
rename from board/qemu/csky/readme.txt
rename to board/qemu/csky860-virt/readme.txt
index f7cd01b021..bc6a55cdb7 100644
--- a/board/qemu/csky/readme.txt
+++ b/board/qemu/csky860-virt/readme.txt
@@ -1,6 +1,5 @@
 Run with qemu:
 
-For ck860 smp:
  qemu-system-cskyv2 -M virt -cpu ck860 -smp 2 -nographic -kernel vmlinux
 
 The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/configs/qemu_csky860_virt_defconfig b/configs/qemu_csky860_virt_defconfig
index 9ec8f633af..896b9a8f2e 100644
--- a/configs/qemu_csky860_virt_defconfig
+++ b/configs/qemu_csky860_virt_defconfig
@@ -13,4 +13,4 @@ BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.0.12"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/csky/linux-ck860.config.fragment"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/csky860-virt/linux.config.fragment"
-- 
2.21.0

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

* [Buildroot] [PATCH v3 for-next 08/11] board/qemu/*/launch.sh: add qemu launch script
  2019-11-17 20:18 [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
                   ` (6 preceding siblings ...)
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 07/11] board/qemu/csky: move csky860 stuff to board/qemu/csky860-virt Romain Naour
@ 2019-11-17 20:19 ` Romain Naour
  2019-11-21 21:42   ` Romain Naour
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 09/11] configs/qemu-*: add a comment to provide the path launch.sh script for each Qemu defconfig Romain Naour
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 21+ messages in thread
From: Romain Naour @ 2019-11-17 20:19 UTC (permalink / raw)
  To: buildroot

From: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>

It is not very convenient for Buildroot users to store
the Qemu command line in a readme.txt instead of a script
to be used as soon as the Qemu image has been created.

This patch replace the readme.txt file located in
board/qemu/<Qemu target>/ by a script (launch.sh).

This allow Buildroot user to start easily Qemu using
only one simple command:

$ ./board/qemu/aarch64-virt/launch.sh test/qemu_aarch64_virt/

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 board/qemu/aarch64-virt/launch.sh         |  7 +++++++
 board/qemu/aarch64-virt/readme.txt        |  7 -------
 board/qemu/arm-versatile-nommu/launch.sh  |  8 ++++++++
 board/qemu/arm-versatile-nommu/readme.txt |  8 --------
 board/qemu/arm-versatile/launch.sh        |  8 ++++++++
 board/qemu/arm-versatile/readme.txt       |  8 --------
 board/qemu/arm-vexpress-tz/launch.sh      |  3 +++
 board/qemu/arm-vexpress/launch.sh         | 11 +++++++++++
 board/qemu/arm-vexpress/readme.txt        | 11 -----------
 board/qemu/csky610-virt/launch.sh         |  5 +++++
 board/qemu/csky610-virt/readme.txt        |  5 -----
 board/qemu/csky807-virt/launch.sh         |  5 +++++
 board/qemu/csky807-virt/readme.txt        |  5 -----
 board/qemu/csky810-virt/launch.sh         |  5 +++++
 board/qemu/csky810-virt/readme.txt        |  5 -----
 board/qemu/csky860-virt/launch.sh         |  5 +++++
 board/qemu/csky860-virt/readme.txt        |  5 -----
 board/qemu/m68k-mcf5208/launch.sh         |  7 +++++++
 board/qemu/m68k-mcf5208/readme.txt        |  7 -------
 board/qemu/m68k-q800/launch.sh            |  8 ++++++++
 board/qemu/m68k-q800/readme.txt           |  8 --------
 board/qemu/microblazebe-mmu/launch.sh     |  7 +++++++
 board/qemu/microblazebe-mmu/readme.txt    |  7 -------
 board/qemu/microblazeel-mmu/launch.sh     |  7 +++++++
 board/qemu/microblazeel-mmu/readme.txt    |  7 -------
 board/qemu/mips32r2-malta/launch.sh       |  2 ++
 board/qemu/mips32r2-malta/readme.txt      |  9 ---------
 board/qemu/mips32r2el-malta/launch.sh     |  9 +++++++++
 board/qemu/mips32r2el-malta/readme.txt    |  9 ---------
 board/qemu/mips32r6-malta/launch.sh       |  7 +++++++
 board/qemu/mips32r6-malta/readme.txt      |  7 -------
 board/qemu/mips32r6el-malta/launch.sh     |  7 +++++++
 board/qemu/mips32r6el-malta/readme.txt    |  7 -------
 board/qemu/mips64-malta/launch.sh         |  8 ++++++++
 board/qemu/mips64-malta/readme.txt        |  8 --------
 board/qemu/mips64el-malta/launch.sh       |  8 ++++++++
 board/qemu/mips64el-malta/readme.txt      |  8 --------
 board/qemu/mips64r6-malta/launch.sh       |  7 +++++++
 board/qemu/mips64r6-malta/readme.txt      |  7 -------
 board/qemu/mips64r6el-malta/launch.sh     |  7 +++++++
 board/qemu/mips64r6el-malta/readme.txt    |  7 -------
 board/qemu/nios2-10m50/launch.sh          |  7 +++++++
 board/qemu/nios2-10m50/readme.txt         |  7 -------
 board/qemu/or1k/launch.sh                 |  9 +++++++++
 board/qemu/or1k/readme.txt                |  9 ---------
 board/qemu/ppc-g3beige/launch.sh          |  8 ++++++++
 board/qemu/ppc-g3beige/readme.txt         |  8 --------
 board/qemu/ppc-mac99/launch.sh            |  5 +++++
 board/qemu/ppc-mac99/readme.txt           |  5 -----
 board/qemu/ppc-mpc8544ds/launch.sh        |  7 +++++++
 board/qemu/ppc-mpc8544ds/readme.txt       |  7 -------
 board/qemu/ppc-virtex-ml507/launch.sh     |  7 +++++++
 board/qemu/ppc-virtex-ml507/readme.txt    |  7 -------
 board/qemu/ppc64-e5500/launch.sh          |  7 +++++++
 board/qemu/ppc64-e5500/readme.txt         |  7 -------
 board/qemu/ppc64-pseries/launch.sh        |  7 +++++++
 board/qemu/ppc64-pseries/readme.txt       |  7 -------
 board/qemu/ppc64le-pseries/launch.sh      |  7 +++++++
 board/qemu/ppc64le-pseries/readme.txt     |  7 -------
 board/qemu/riscv32-virt/launch.sh         |  7 +++++++
 board/qemu/riscv32-virt/readme.txt        |  7 -------
 board/qemu/riscv64-virt/launch.sh         |  8 ++++++++
 board/qemu/riscv64-virt/readme.txt        |  7 -------
 board/qemu/sh4-r2d/launch.sh              |  9 +++++++++
 board/qemu/sh4-r2d/readme.txt             |  8 --------
 board/qemu/sh4eb-r2d/launch.sh            |  8 ++++++++
 board/qemu/sh4eb-r2d/readme.txt           |  8 --------
 board/qemu/sparc-ss10/launch.sh           |  7 +++++++
 board/qemu/sparc-ss10/readme.txt          |  7 -------
 board/qemu/sparc64-sun4u/launch.sh        |  7 +++++++
 board/qemu/sparc64-sun4u/readme.txt       |  7 -------
 board/qemu/x86/launch.sh                  |  9 +++++++++
 board/qemu/x86/readme.txt                 |  9 ---------
 board/qemu/x86_64/launch.sh               |  9 +++++++++
 board/qemu/x86_64/readme.txt              |  9 ---------
 board/qemu/xtensa-lx60/launch.sh          |  7 +++++++
 board/qemu/xtensa-lx60/readme.txt         |  7 -------
 77 files changed, 276 insertions(+), 278 deletions(-)
 create mode 100755 board/qemu/aarch64-virt/launch.sh
 delete mode 100644 board/qemu/aarch64-virt/readme.txt
 create mode 100755 board/qemu/arm-versatile-nommu/launch.sh
 delete mode 100644 board/qemu/arm-versatile-nommu/readme.txt
 create mode 100755 board/qemu/arm-versatile/launch.sh
 delete mode 100644 board/qemu/arm-versatile/readme.txt
 create mode 100755 board/qemu/arm-vexpress-tz/launch.sh
 create mode 100755 board/qemu/arm-vexpress/launch.sh
 delete mode 100644 board/qemu/arm-vexpress/readme.txt
 create mode 100755 board/qemu/csky610-virt/launch.sh
 delete mode 100644 board/qemu/csky610-virt/readme.txt
 create mode 100755 board/qemu/csky807-virt/launch.sh
 delete mode 100644 board/qemu/csky807-virt/readme.txt
 create mode 100755 board/qemu/csky810-virt/launch.sh
 delete mode 100644 board/qemu/csky810-virt/readme.txt
 create mode 100755 board/qemu/csky860-virt/launch.sh
 delete mode 100644 board/qemu/csky860-virt/readme.txt
 create mode 100755 board/qemu/m68k-mcf5208/launch.sh
 delete mode 100644 board/qemu/m68k-mcf5208/readme.txt
 create mode 100755 board/qemu/m68k-q800/launch.sh
 delete mode 100644 board/qemu/m68k-q800/readme.txt
 create mode 100755 board/qemu/microblazebe-mmu/launch.sh
 delete mode 100644 board/qemu/microblazebe-mmu/readme.txt
 create mode 100755 board/qemu/microblazeel-mmu/launch.sh
 delete mode 100644 board/qemu/microblazeel-mmu/readme.txt
 create mode 100755 board/qemu/mips32r2-malta/launch.sh
 delete mode 100644 board/qemu/mips32r2-malta/readme.txt
 create mode 100755 board/qemu/mips32r2el-malta/launch.sh
 delete mode 100644 board/qemu/mips32r2el-malta/readme.txt
 create mode 100755 board/qemu/mips32r6-malta/launch.sh
 delete mode 100644 board/qemu/mips32r6-malta/readme.txt
 create mode 100755 board/qemu/mips32r6el-malta/launch.sh
 delete mode 100644 board/qemu/mips32r6el-malta/readme.txt
 create mode 100755 board/qemu/mips64-malta/launch.sh
 delete mode 100644 board/qemu/mips64-malta/readme.txt
 create mode 100755 board/qemu/mips64el-malta/launch.sh
 delete mode 100644 board/qemu/mips64el-malta/readme.txt
 create mode 100755 board/qemu/mips64r6-malta/launch.sh
 delete mode 100644 board/qemu/mips64r6-malta/readme.txt
 create mode 100755 board/qemu/mips64r6el-malta/launch.sh
 delete mode 100644 board/qemu/mips64r6el-malta/readme.txt
 create mode 100755 board/qemu/nios2-10m50/launch.sh
 delete mode 100644 board/qemu/nios2-10m50/readme.txt
 create mode 100755 board/qemu/or1k/launch.sh
 delete mode 100644 board/qemu/or1k/readme.txt
 create mode 100755 board/qemu/ppc-g3beige/launch.sh
 delete mode 100644 board/qemu/ppc-g3beige/readme.txt
 create mode 100755 board/qemu/ppc-mac99/launch.sh
 delete mode 100644 board/qemu/ppc-mac99/readme.txt
 create mode 100755 board/qemu/ppc-mpc8544ds/launch.sh
 delete mode 100644 board/qemu/ppc-mpc8544ds/readme.txt
 create mode 100755 board/qemu/ppc-virtex-ml507/launch.sh
 delete mode 100644 board/qemu/ppc-virtex-ml507/readme.txt
 create mode 100755 board/qemu/ppc64-e5500/launch.sh
 delete mode 100644 board/qemu/ppc64-e5500/readme.txt
 create mode 100755 board/qemu/ppc64-pseries/launch.sh
 delete mode 100644 board/qemu/ppc64-pseries/readme.txt
 create mode 100755 board/qemu/ppc64le-pseries/launch.sh
 delete mode 100644 board/qemu/ppc64le-pseries/readme.txt
 create mode 100755 board/qemu/riscv32-virt/launch.sh
 delete mode 100644 board/qemu/riscv32-virt/readme.txt
 create mode 100755 board/qemu/riscv64-virt/launch.sh
 delete mode 100644 board/qemu/riscv64-virt/readme.txt
 create mode 100755 board/qemu/sh4-r2d/launch.sh
 delete mode 100644 board/qemu/sh4-r2d/readme.txt
 create mode 100755 board/qemu/sh4eb-r2d/launch.sh
 delete mode 100644 board/qemu/sh4eb-r2d/readme.txt
 create mode 100755 board/qemu/sparc-ss10/launch.sh
 delete mode 100644 board/qemu/sparc-ss10/readme.txt
 create mode 100755 board/qemu/sparc64-sun4u/launch.sh
 delete mode 100644 board/qemu/sparc64-sun4u/readme.txt
 create mode 100755 board/qemu/x86/launch.sh
 delete mode 100644 board/qemu/x86/readme.txt
 create mode 100755 board/qemu/x86_64/launch.sh
 delete mode 100644 board/qemu/x86_64/readme.txt
 create mode 100755 board/qemu/xtensa-lx60/launch.sh
 delete mode 100644 board/qemu/xtensa-lx60/readme.txt

diff --git a/board/qemu/aarch64-virt/launch.sh b/board/qemu/aarch64-virt/launch.sh
new file mode 100755
index 0000000000..145bee4670
--- /dev/null
+++ b/board/qemu/aarch64-virt/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -smp 1 -kernel ${1:-output}/images/Image -append "rootwait root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 -drive file=${1:-output}/images/rootfs.ext4,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/aarch64-virt/readme.txt b/board/qemu/aarch64-virt/readme.txt
deleted file mode 100644
index f868905d91..0000000000
--- a/board/qemu/aarch64-virt/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
-  qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -smp 1 -kernel output/images/Image -append "rootwait 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
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/arm-versatile-nommu/launch.sh b/board/qemu/arm-versatile-nommu/launch.sh
new file mode 100755
index 0000000000..be404b8f62
--- /dev/null
+++ b/board/qemu/arm-versatile-nommu/launch.sh
@@ -0,0 +1,8 @@
+#!/bin/env bash
+
+qemu-system-arm -M versatilepb -kernel ${1:-output}/images/zImage -dtb ${1:-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
diff --git a/board/qemu/arm-versatile-nommu/readme.txt b/board/qemu/arm-versatile-nommu/readme.txt
deleted file mode 100644
index d25cc4dc00..0000000000
--- a/board/qemu/arm-versatile-nommu/readme.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Run the emulation with:
-
-  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
diff --git a/board/qemu/arm-versatile/launch.sh b/board/qemu/arm-versatile/launch.sh
new file mode 100755
index 0000000000..9f159371f1
--- /dev/null
+++ b/board/qemu/arm-versatile/launch.sh
@@ -0,0 +1,8 @@
+#!/bin/env bash
+
+qemu-system-arm -M versatilepb -kernel ${1:-output}/images/zImage -dtb ${1:-output}/images/versatile-pb.dtb -drive file=${1:-output}/images/rootfs.ext2,if=scsi,format=raw -append "rootwait root=/dev/sda console=ttyAMA0,115200" -serial stdio -net nic,model=rtl8139 -net user
+
+# The login prompt will appear in the terminal that started Qemu. The
+# graphical window is the framebuffer.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/arm-versatile/readme.txt b/board/qemu/arm-versatile/readme.txt
deleted file mode 100644
index e514cefe82..0000000000
--- a/board/qemu/arm-versatile/readme.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Run the emulation with:
-
-  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 "rootwait root=/dev/sda console=ttyAMA0,115200" -serial stdio -net nic,model=rtl8139 -net user
-
-The login prompt will appear in the terminal that started Qemu. The
-graphical window is the framebuffer.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/arm-vexpress-tz/launch.sh b/board/qemu/arm-vexpress-tz/launch.sh
new file mode 100755
index 0000000000..7ee494ce20
--- /dev/null
+++ b/board/qemu/arm-vexpress-tz/launch.sh
@@ -0,0 +1,3 @@
+#!/bin/env bash
+
+qemu-system-arm -machine virt -machine secure=on -cpu cortex-a15 -smp 1 -s -m 1024 -d unimp -serial stdio -netdev user,id=vmnic -device virtio-net-device,netdev=vmnic -semihosting-config enable,target=native -bios ${1:-output}/images/bl1.bin
diff --git a/board/qemu/arm-vexpress/launch.sh b/board/qemu/arm-vexpress/launch.sh
new file mode 100755
index 0000000000..9578249f8e
--- /dev/null
+++ b/board/qemu/arm-vexpress/launch.sh
@@ -0,0 +1,11 @@
+#!/bin/env bash
+
+qemu-system-arm -M vexpress-a9 -smp 1 -m 256 -kernel ${1:-output}/images/zImage -dtb ${1:-output}/images/vexpress-v2p-ca9.dtb -drive file=${1:-output}/images/rootfs.ext2,if=sd,format=raw -append "console=ttyAMA0,115200 rootwait root=/dev/mmcblk0" -serial stdio -net nic,model=lan9118 -net user
+
+# 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
diff --git a/board/qemu/arm-vexpress/readme.txt b/board/qemu/arm-vexpress/readme.txt
deleted file mode 100644
index 7f7b43a3b3..0000000000
--- a/board/qemu/arm-vexpress/readme.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-Run the emulation with:
-
-  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 rootwait root=/dev/mmcblk0" -serial stdio -net nic,model=lan9118 -net user
-
-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
diff --git a/board/qemu/csky610-virt/launch.sh b/board/qemu/csky610-virt/launch.sh
new file mode 100755
index 0000000000..4e1e138708
--- /dev/null
+++ b/board/qemu/csky610-virt/launch.sh
@@ -0,0 +1,5 @@
+#!/bin/env bash
+
+qemu-system-cskyv1 -M virt -nographic -kernel vmlinux
+
+# The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/board/qemu/csky610-virt/readme.txt b/board/qemu/csky610-virt/readme.txt
deleted file mode 100644
index 6f9f7c18ce..0000000000
--- a/board/qemu/csky610-virt/readme.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Run with qemu:
-
- qemu-system-cskyv1 -M virt -nographic -kernel vmlinux
-
-The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/board/qemu/csky807-virt/launch.sh b/board/qemu/csky807-virt/launch.sh
new file mode 100755
index 0000000000..9d34e60125
--- /dev/null
+++ b/board/qemu/csky807-virt/launch.sh
@@ -0,0 +1,5 @@
+#!/bin/env bash
+
+qemu-system-cskyv2 -M virt -nographic -kernel vmlinux
+
+# The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/board/qemu/csky807-virt/readme.txt b/board/qemu/csky807-virt/readme.txt
deleted file mode 100644
index 20b7fa312b..0000000000
--- a/board/qemu/csky807-virt/readme.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Run with qemu:
-
-qemu-system-cskyv2 -M virt -nographic -kernel vmlinux
-
-The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/board/qemu/csky810-virt/launch.sh b/board/qemu/csky810-virt/launch.sh
new file mode 100755
index 0000000000..9d34e60125
--- /dev/null
+++ b/board/qemu/csky810-virt/launch.sh
@@ -0,0 +1,5 @@
+#!/bin/env bash
+
+qemu-system-cskyv2 -M virt -nographic -kernel vmlinux
+
+# The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/board/qemu/csky810-virt/readme.txt b/board/qemu/csky810-virt/readme.txt
deleted file mode 100644
index 758e436467..0000000000
--- a/board/qemu/csky810-virt/readme.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Run with qemu:
-
- qemu-system-cskyv2 -M virt -nographic -kernel vmlinux
-
-The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/board/qemu/csky860-virt/launch.sh b/board/qemu/csky860-virt/launch.sh
new file mode 100755
index 0000000000..8d678f881d
--- /dev/null
+++ b/board/qemu/csky860-virt/launch.sh
@@ -0,0 +1,5 @@
+#!/bin/env bash
+
+qemu-system-cskyv2 -M virt -cpu ck860 -smp 2 -nographic -kernel vmlinux
+
+# The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/board/qemu/csky860-virt/readme.txt b/board/qemu/csky860-virt/readme.txt
deleted file mode 100644
index bc6a55cdb7..0000000000
--- a/board/qemu/csky860-virt/readme.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Run with qemu:
-
- qemu-system-cskyv2 -M virt -cpu ck860 -smp 2 -nographic -kernel vmlinux
-
-The login prompt will appear in the terminal that started Qemu. Username is root and no password.
diff --git a/board/qemu/m68k-mcf5208/launch.sh b/board/qemu/m68k-mcf5208/launch.sh
new file mode 100755
index 0000000000..5138619334
--- /dev/null
+++ b/board/qemu/m68k-mcf5208/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-m68k -M mcf5208evb -cpu m5208 -kernel ${1:-output}/images/vmlinux -nographic
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/m68k-mcf5208/readme.txt b/board/qemu/m68k-mcf5208/readme.txt
deleted file mode 100644
index d1c9086805..0000000000
--- a/board/qemu/m68k-mcf5208/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
- qemu-system-m68k -M mcf5208evb -cpu m5208 -kernel output/images/vmlinux -nographic
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/m68k-q800/launch.sh b/board/qemu/m68k-q800/launch.sh
new file mode 100755
index 0000000000..ea0cd4c91e
--- /dev/null
+++ b/board/qemu/m68k-q800/launch.sh
@@ -0,0 +1,8 @@
+#!/bin/env bash
+
+qemu-system-m68k -M q800 -kernel ${1:-output}/images/vmlinux -drive file=${1:-output}/images/rootfs.ext2,format=raw -append "rootwait root=/dev/sda console=ttyS0" -nographic
+
+# 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
diff --git a/board/qemu/m68k-q800/readme.txt b/board/qemu/m68k-q800/readme.txt
deleted file mode 100644
index b516bacdff..0000000000
--- a/board/qemu/m68k-q800/readme.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Run the emulation with:
-
- qemu-system-m68k -M q800 -kernel output/images/vmlinux -nographic -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/sda console=ttyS0"
-
-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
diff --git a/board/qemu/microblazebe-mmu/launch.sh b/board/qemu/microblazebe-mmu/launch.sh
new file mode 100755
index 0000000000..af7b1f575d
--- /dev/null
+++ b/board/qemu/microblazebe-mmu/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-microblaze -M petalogix-s3adsp1800 -kernel ${1:-output}/images/linux.bin -serial stdio
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/microblazebe-mmu/readme.txt b/board/qemu/microblazebe-mmu/readme.txt
deleted file mode 100644
index 4f52baff1f..0000000000
--- a/board/qemu/microblazebe-mmu/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
- qemu-system-microblaze -M petalogix-s3adsp1800 -kernel output/images/linux.bin -serial stdio
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/microblazeel-mmu/launch.sh b/board/qemu/microblazeel-mmu/launch.sh
new file mode 100755
index 0000000000..fb69e018d0
--- /dev/null
+++ b/board/qemu/microblazeel-mmu/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-microblazeel -M petalogix-s3adsp1800 -kernel ${1:-output}/images/linux.bin -serial stdio
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/microblazeel-mmu/readme.txt b/board/qemu/microblazeel-mmu/readme.txt
deleted file mode 100644
index 0b0f330a5e..0000000000
--- a/board/qemu/microblazeel-mmu/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
- qemu-system-microblazeel -M petalogix-s3adsp1800 -kernel output/images/linux.bin -serial stdio
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/mips32r2-malta/launch.sh b/board/qemu/mips32r2-malta/launch.sh
new file mode 100755
index 0000000000..8069b59171
--- /dev/null
+++ b/board/qemu/mips32r2-malta/launch.sh
@@ -0,0 +1,2 @@
+#!/bin/env bash
+
diff --git a/board/qemu/mips32r2-malta/readme.txt b/board/qemu/mips32r2-malta/readme.txt
deleted file mode 100644
index 9ff3c4b810..0000000000
--- a/board/qemu/mips32r2-malta/readme.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Run the emulation with:
-
- qemu-system-mips -M malta -kernel output/images/vmlinux -serial stdio -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -net nic,model=pcnet -net user
-
-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
diff --git a/board/qemu/mips32r2el-malta/launch.sh b/board/qemu/mips32r2el-malta/launch.sh
new file mode 100755
index 0000000000..693306bdbc
--- /dev/null
+++ b/board/qemu/mips32r2el-malta/launch.sh
@@ -0,0 +1,9 @@
+#!/bin/env bash
+
+qemu-system-mipsel -M malta -kernel ${1:-output}/images/vmlinux -serial stdio -drive file=${1:-output}/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -net nic,model=pcnet -net user
+
+# 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
diff --git a/board/qemu/mips32r2el-malta/readme.txt b/board/qemu/mips32r2el-malta/readme.txt
deleted file mode 100644
index 745bfea608..0000000000
--- a/board/qemu/mips32r2el-malta/readme.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Run the emulation with:
-
- qemu-system-mipsel -M malta -kernel output/images/vmlinux -serial stdio -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -net nic,model=pcnet -net user
-
-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
diff --git a/board/qemu/mips32r6-malta/launch.sh b/board/qemu/mips32r6-malta/launch.sh
new file mode 100755
index 0000000000..b027b14993
--- /dev/null
+++ b/board/qemu/mips32r6-malta/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-mips -M malta -cpu mips32r6-generic -kernel ${1:-output}/images/vmlinux -drive file=${1:-output}/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -nographic
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/mips32r6-malta/readme.txt b/board/qemu/mips32r6-malta/readme.txt
deleted file mode 100644
index 6a026b2165..0000000000
--- a/board/qemu/mips32r6-malta/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
-qemu-system-mips -M malta -cpu mips32r6-generic -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -nographic
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/mips32r6el-malta/launch.sh b/board/qemu/mips32r6el-malta/launch.sh
new file mode 100755
index 0000000000..ad3806a406
--- /dev/null
+++ b/board/qemu/mips32r6el-malta/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-mipsel -M malta -cpu mips32r6-generic -kernel ${1:-output}/images/vmlinux -drive file=${1:-output}/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -net nic,model=pcnet -net user -nographic
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/mips32r6el-malta/readme.txt b/board/qemu/mips32r6el-malta/readme.txt
deleted file mode 100644
index f69fd21af1..0000000000
--- a/board/qemu/mips32r6el-malta/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
-qemu-system-mipsel -M malta -cpu mips32r6-generic -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -net nic,model=pcnet -net user -nographic
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/mips64-malta/launch.sh b/board/qemu/mips64-malta/launch.sh
new file mode 100755
index 0000000000..471c7f4038
--- /dev/null
+++ b/board/qemu/mips64-malta/launch.sh
@@ -0,0 +1,8 @@
+#!/bin/env bash
+
+qemu-system-mips64 -M malta -kernel ${1:-output}/images/vmlinux -serial stdio -drive file=${1:-output}/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda"
+
+# The login prompt will appear in the terminal that started Qemu. The
+# graphical window is the framebuffer.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/mips64-malta/readme.txt b/board/qemu/mips64-malta/readme.txt
deleted file mode 100644
index ea3a92541e..0000000000
--- a/board/qemu/mips64-malta/readme.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Run the emulation with:
-
- qemu-system-mips64 -M malta -kernel output/images/vmlinux -serial stdio -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda"
-
-The login prompt will appear in the terminal that started Qemu. The
-graphical window is the framebuffer.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/mips64el-malta/launch.sh b/board/qemu/mips64el-malta/launch.sh
new file mode 100755
index 0000000000..be7e5792d3
--- /dev/null
+++ b/board/qemu/mips64el-malta/launch.sh
@@ -0,0 +1,8 @@
+#!/bin/env bash
+
+qemu-system-mips64el -M malta -kernel ${1:-output}/images/vmlinux -serial stdio -drive file=${1:-output}/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda"
+
+# The login prompt will appear in the terminal that started Qemu. The
+# graphical window is the framebuffer.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/mips64el-malta/readme.txt b/board/qemu/mips64el-malta/readme.txt
deleted file mode 100644
index 144da93839..0000000000
--- a/board/qemu/mips64el-malta/readme.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Run the emulation with:
-
- qemu-system-mips64el -M malta -kernel output/images/vmlinux -serial stdio -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda"
-
-The login prompt will appear in the terminal that started Qemu. The
-graphical window is the framebuffer.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/mips64r6-malta/launch.sh b/board/qemu/mips64r6-malta/launch.sh
new file mode 100755
index 0000000000..ea7cc6ceaa
--- /dev/null
+++ b/board/qemu/mips64r6-malta/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-mips64 -M malta -cpu I6400 -kernel ${1:-output}/images/vmlinux -drive file=${1:-output}/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -nographic
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/mips64r6-malta/readme.txt b/board/qemu/mips64r6-malta/readme.txt
deleted file mode 100644
index cfa16fd863..0000000000
--- a/board/qemu/mips64r6-malta/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
- qemu-system-mips64 -M malta -cpu I6400 -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -nographic
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/mips64r6el-malta/launch.sh b/board/qemu/mips64r6el-malta/launch.sh
new file mode 100755
index 0000000000..bb97b3c467
--- /dev/null
+++ b/board/qemu/mips64r6el-malta/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-mips64el -M malta -cpu I6400 -kernel ${1:-output}/images/vmlinux -drive file=${1:-output}/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -nographic
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/mips64r6el-malta/readme.txt b/board/qemu/mips64r6el-malta/readme.txt
deleted file mode 100644
index 61a6ceb5f4..0000000000
--- a/board/qemu/mips64r6el-malta/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
- qemu-system-mips64el -M malta -cpu I6400 -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -nographic
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/nios2-10m50/launch.sh b/board/qemu/nios2-10m50/launch.sh
new file mode 100755
index 0000000000..e7a709e6e8
--- /dev/null
+++ b/board/qemu/nios2-10m50/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-nios2 -kernel ${1:-output}/images/vmlinux -nographic
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0.
diff --git a/board/qemu/nios2-10m50/readme.txt b/board/qemu/nios2-10m50/readme.txt
deleted file mode 100644
index 44cbcb08a2..0000000000
--- a/board/qemu/nios2-10m50/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
-  qemu-system-nios2 -kernel output/images/vmlinux -nographic
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0.
diff --git a/board/qemu/or1k/launch.sh b/board/qemu/or1k/launch.sh
new file mode 100755
index 0000000000..6786d3f957
--- /dev/null
+++ b/board/qemu/or1k/launch.sh
@@ -0,0 +1,9 @@
+#!/bin/env bash
+
+qemu-system-or1k -kernel ${1:-output}/images/vmlinux -nographic
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Ethernet support is not working, yet.
+
+# Tested with QEMU 2.12.0.
diff --git a/board/qemu/or1k/readme.txt b/board/qemu/or1k/readme.txt
deleted file mode 100644
index df6b467e82..0000000000
--- a/board/qemu/or1k/readme.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Run the emulation with:
-
- qemu-system-or1k -kernel output/images/vmlinux -nographic
-
-The login prompt will appear in the terminal that started Qemu.
-
-Ethernet support is not working, yet.
-
-Tested with QEMU 2.12.0.
diff --git a/board/qemu/ppc-g3beige/launch.sh b/board/qemu/ppc-g3beige/launch.sh
new file mode 100755
index 0000000000..de366f96d0
--- /dev/null
+++ b/board/qemu/ppc-g3beige/launch.sh
@@ -0,0 +1,8 @@
+#!/bin/env bash
+
+qemu-system-ppc -M g3beige -kernel ${1:-output}/images/vmlinux -drive file=${1:-output}/images/rootfs.ext2,format=raw -append "console=ttyS0 rootwait root=/dev/hda" -serial stdio -net nic,model=rtl8139 -net user
+
+# The login prompt will appear in the terminal that started Qemu. The
+# graphical window is the framebuffer.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/ppc-g3beige/readme.txt b/board/qemu/ppc-g3beige/readme.txt
deleted file mode 100644
index 608814ee3b..0000000000
--- a/board/qemu/ppc-g3beige/readme.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Run the emulation with:
-
-  qemu-system-ppc -M g3beige -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "console=ttyS0 rootwait root=/dev/hda" -serial stdio -net nic,model=rtl8139 -net user
-
-The login prompt will appear in the terminal that started Qemu. The
-graphical window is the framebuffer.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/ppc-mac99/launch.sh b/board/qemu/ppc-mac99/launch.sh
new file mode 100755
index 0000000000..251379923c
--- /dev/null
+++ b/board/qemu/ppc-mac99/launch.sh
@@ -0,0 +1,5 @@
+#!/bin/env bash
+
+qemu-system-ppc -M mac99 -cpu g4 -m 1G -kernel ${1:-output}/images/vmlinux -drive file=${1:-output}/images/rootfs.ext2,format=raw  -net nic,model=sungem -net user -append "root=/dev/sda" -nographic -vga none
+
+# Tested with QEMU 3.1.0
diff --git a/board/qemu/ppc-mac99/readme.txt b/board/qemu/ppc-mac99/readme.txt
deleted file mode 100644
index a8a18db5b9..0000000000
--- a/board/qemu/ppc-mac99/readme.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Run the emulation with:
-
-  qemu-system-ppc -nographic -vga none -M mac99 -cpu g4 -m 1G -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -net nic,model=sungem -net user -append "root=/dev/sda"
-
-Tested with QEMU 3.1.0
diff --git a/board/qemu/ppc-mpc8544ds/launch.sh b/board/qemu/ppc-mpc8544ds/launch.sh
new file mode 100755
index 0000000000..ef5a3de413
--- /dev/null
+++ b/board/qemu/ppc-mpc8544ds/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-ppc -M mpc8544ds -kernel ${1:-output}/images/vmlinux -serial stdio -net nic,model=e1000 -net user
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/ppc-mpc8544ds/readme.txt b/board/qemu/ppc-mpc8544ds/readme.txt
deleted file mode 100644
index 172aad5626..0000000000
--- a/board/qemu/ppc-mpc8544ds/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
- qemu-system-ppc -M mpc8544ds -kernel output/images/vmlinux -serial stdio -net nic,model=e1000 -net user
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/ppc-virtex-ml507/launch.sh b/board/qemu/ppc-virtex-ml507/launch.sh
new file mode 100755
index 0000000000..cb38249e54
--- /dev/null
+++ b/board/qemu/ppc-virtex-ml507/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-ppc -M virtex-ml507 -m 256 -kernel ${1:-output}/images/vmlinux -dtb ${1:-output}/images/virtex440-ml507.dtb -append "console=ttyS0" -nographic
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/ppc-virtex-ml507/readme.txt b/board/qemu/ppc-virtex-ml507/readme.txt
deleted file mode 100644
index 6178ace816..0000000000
--- a/board/qemu/ppc-virtex-ml507/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
- qemu-system-ppc -M virtex-ml507 -kernel output/images/vmlinux -m 256 -nographic -append "console=ttyS0" -dtb output/images/virtex440-ml507.dtb
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/ppc64-e5500/launch.sh b/board/qemu/ppc64-e5500/launch.sh
new file mode 100755
index 0000000000..e241e016b4
--- /dev/null
+++ b/board/qemu/ppc64-e5500/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-ppc64 -M ppce500 -cpu e5500 -m 256 -kernel ${1:-output}/images/uImage -drive file=${1:-output}/images/rootfs.ext2,if=virtio,format=raw -append "console=ttyS0 rootwait root=/dev/vda" -serial mon:stdio -nographic
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/ppc64-e5500/readme.txt b/board/qemu/ppc64-e5500/readme.txt
deleted file mode 100644
index 8080766984..0000000000
--- a/board/qemu/ppc64-e5500/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
- 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 rootwait root=/dev/vda" -serial mon:stdio -nographic
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/ppc64-pseries/launch.sh b/board/qemu/ppc64-pseries/launch.sh
new file mode 100755
index 0000000000..13f7454a7d
--- /dev/null
+++ b/board/qemu/ppc64-pseries/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-ppc64 -M pseries -cpu POWER7 -m 256 -kernel ${1:-output}/images/vmlinux -append "console=hvc0 rootwait root=/dev/sda" -drive file=${1:-output}/images/rootfs.ext2,if=scsi,index=0,format=raw -serial stdio -display curses
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/ppc64-pseries/readme.txt b/board/qemu/ppc64-pseries/readme.txt
deleted file mode 100644
index 6a3e96a2e5..0000000000
--- a/board/qemu/ppc64-pseries/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
- qemu-system-ppc64 -M pseries -cpu POWER7 -m 256 -kernel output/images/vmlinux -append "console=hvc0 rootwait root=/dev/sda" -drive file=output/images/rootfs.ext2,if=scsi,index=0,format=raw -serial stdio -display curses
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/ppc64le-pseries/launch.sh b/board/qemu/ppc64le-pseries/launch.sh
new file mode 100755
index 0000000000..3a7e9d3d4f
--- /dev/null
+++ b/board/qemu/ppc64le-pseries/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-ppc64 -M pseries -cpu POWER8 -m 256 -kernel ${1:-output}/images/vmlinux -append "console=hvc0 rootwait root=/dev/sda" -drive file=${1:-output}/images/rootfs.ext2,if=scsi,index=0,format=raw -serial stdio -display curses
+
+# The login prompt will appear in the terminal window.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/ppc64le-pseries/readme.txt b/board/qemu/ppc64le-pseries/readme.txt
deleted file mode 100644
index 2728675df2..0000000000
--- a/board/qemu/ppc64le-pseries/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
-qemu-system-ppc64 -M pseries -cpu POWER8 -m 256 -kernel output/images/vmlinux -append "console=hvc0 rootwait root=/dev/sda" -drive file=output/images/rootfs.ext2,if=scsi,index=0,format=raw -serial stdio -display curses
-
-The login prompt will appear in the terminal window.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/riscv32-virt/launch.sh b/board/qemu/riscv32-virt/launch.sh
new file mode 100755
index 0000000000..63ff466a94
--- /dev/null
+++ b/board/qemu/riscv32-virt/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-riscv32 -M virt -kernel ${1:-output}/images/fw_jump.elf -device loader,file=${1:-output}/images/Image,addr=0x80400000 -append "rootwait root=/dev/vda ro" -drive file=${1:-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
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 3.1
diff --git a/board/qemu/riscv32-virt/readme.txt b/board/qemu/riscv32-virt/readme.txt
deleted file mode 100644
index 5d7c1988d2..0000000000
--- a/board/qemu/riscv32-virt/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run Linux in emulation with:
-
-  qemu-system-riscv32 -M virt -kernel output/images/fw_jump.elf -device loader,file=output/images/Image,addr=0x80400000 -append "rootwait 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
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 3.1
diff --git a/board/qemu/riscv64-virt/launch.sh b/board/qemu/riscv64-virt/launch.sh
new file mode 100755
index 0000000000..321967555a
--- /dev/null
+++ b/board/qemu/riscv64-virt/launch.sh
@@ -0,0 +1,8 @@
+#!/bin/env bash
+
+qemu-system-riscv64 -M virt -kernel ${1:-output}/images/fw_jump.elf -device loader,file=${1:-output}/images/Image,addr=0x80200000 -append "rootwait root=/dev/vda ro" -drive file=${1:-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
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 3.1
+
diff --git a/board/qemu/riscv64-virt/readme.txt b/board/qemu/riscv64-virt/readme.txt
deleted file mode 100644
index c075cc464d..0000000000
--- a/board/qemu/riscv64-virt/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run Linux in emulation with:
-
-  qemu-system-riscv64 -M virt -kernel output/images/fw_jump.elf -device loader,file=output/images/Image,addr=0x80200000 -append "rootwait 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
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 3.1
diff --git a/board/qemu/sh4-r2d/launch.sh b/board/qemu/sh4-r2d/launch.sh
new file mode 100755
index 0000000000..75be3b9438
--- /dev/null
+++ b/board/qemu/sh4-r2d/launch.sh
@@ -0,0 +1,9 @@
+#!/bin/env bash
+
+qemu-system-sh4 -M r2d -kernel ${1:-output}/images/zImage -drive file=${1:-output}/images/rootfs.ext2,if=ide,format=raw -append "rootwait root=/dev/sda console=ttySC1,115200 noiotrap" -serial null -serial stdio -net nic,model=rtl8139 -net user
+
+# The login prompt will appear in the terminal that started Qemu.
+# The graphical window is the framebuffer.
+
+# Tested with QEMU 2.12.0
+
diff --git a/board/qemu/sh4-r2d/readme.txt b/board/qemu/sh4-r2d/readme.txt
deleted file mode 100644
index dd80953b97..0000000000
--- a/board/qemu/sh4-r2d/readme.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Run the emulation with:
-
-  qemu-system-sh4 -M r2d -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=ide,format=raw -append "rootwait root=/dev/sda console=ttySC1,115200 noiotrap" -serial null -serial stdio -net nic,model=rtl8139 -net user
-
-The login prompt will appear in the terminal that started Qemu.
-The graphical window is the framebuffer.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/sh4eb-r2d/launch.sh b/board/qemu/sh4eb-r2d/launch.sh
new file mode 100755
index 0000000000..b18bdfeed1
--- /dev/null
+++ b/board/qemu/sh4eb-r2d/launch.sh
@@ -0,0 +1,8 @@
+#!/bin/env bash
+
+qemu-system-sh4eb -M r2d -kernel ${1:-output}/images/zImage -drive file=${1:-output}/images/rootfs.ext2,if=ide,format=raw -append "rootwait root=/dev/sda console=ttySC1,115200 noiotrap" -serial null -serial stdio -net nic,model=rtl8139 -net user
+
+# The login prompt will appear in the terminal that started Qemu.
+# The graphical window is the framebuffer.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/sh4eb-r2d/readme.txt b/board/qemu/sh4eb-r2d/readme.txt
deleted file mode 100644
index e71a9bce90..0000000000
--- a/board/qemu/sh4eb-r2d/readme.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Run the emulation with:
-
-  qemu-system-sh4eb -M r2d -kernel output/images/zImage -drive file=output/images/rootfs.ext2,if=ide,format=raw -append "rootwait root=/dev/sda console=ttySC1,115200 noiotrap" -serial null -serial stdio -net nic,model=rtl8139 -net user
-
-The login prompt will appear in the terminal that started Qemu.
-The graphical window is the framebuffer.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/sparc-ss10/launch.sh b/board/qemu/sparc-ss10/launch.sh
new file mode 100755
index 0000000000..9cdc086e82
--- /dev/null
+++ b/board/qemu/sparc-ss10/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-sparc -M SS-10 -kernel ${1:-output}/images/zImage -drive file=${1:-output}/images/rootfs.ext2,format=raw -append "rootwait root=/dev/sda console=ttyS0,115200" -serial stdio -net nic,model=lance -net user
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/sparc-ss10/readme.txt b/board/qemu/sparc-ss10/readme.txt
deleted file mode 100644
index 33833c2d33..0000000000
--- a/board/qemu/sparc-ss10/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
-  qemu-system-sparc -M SS-10 -kernel output/images/zImage -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/sda console=ttyS0,115200" -serial stdio -net nic,model=lance -net user
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/sparc64-sun4u/launch.sh b/board/qemu/sparc64-sun4u/launch.sh
new file mode 100755
index 0000000000..7629bc9d37
--- /dev/null
+++ b/board/qemu/sparc64-sun4u/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-sparc64 -M sun4u -kernel ${1:-output}/images/vmlinux -append "rootwait root=/dev/sda console=ttyS0,115200" -serial stdio -drive file=${1:-output}/images/rootfs.ext2,format=raw -net nic,model=e1000 -net user
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/sparc64-sun4u/readme.txt b/board/qemu/sparc64-sun4u/readme.txt
deleted file mode 100644
index f2e6e81a86..0000000000
--- a/board/qemu/sparc64-sun4u/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
-  qemu-system-sparc64 -M sun4u -kernel output/images/vmlinux -append "rootwait root=/dev/sda console=ttyS0,115200" -serial stdio -drive file=output/images/rootfs.ext2,format=raw -net nic,model=e1000 -net user
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
diff --git a/board/qemu/x86/launch.sh b/board/qemu/x86/launch.sh
new file mode 100755
index 0000000000..c678278851
--- /dev/null
+++ b/board/qemu/x86/launch.sh
@@ -0,0 +1,9 @@
+#!/bin/env bash
+
+qemu-system-i386 -M pc -kernel ${1:-output}/images/bzImage -drive file=${1:-output}/images/rootfs.ext2,if=virtio,format=raw -append "rootwait root=/dev/vda console=tty1 console=ttyS0" -serial stdio -net nic,model=virtio -net user
+
+# 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
diff --git a/board/qemu/x86/readme.txt b/board/qemu/x86/readme.txt
deleted file mode 100644
index 3bbafecf91..0000000000
--- a/board/qemu/x86/readme.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Run the emulation with:
-
-  qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "rootwait root=/dev/vda console=tty1 console=ttyS0" -serial stdio -net nic,model=virtio -net user
-
-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
diff --git a/board/qemu/x86_64/launch.sh b/board/qemu/x86_64/launch.sh
new file mode 100755
index 0000000000..7c98a7185e
--- /dev/null
+++ b/board/qemu/x86_64/launch.sh
@@ -0,0 +1,9 @@
+#!/bin/env bash
+
+qemu-system-x86_64 -M pc -kernel ${1:-output}/images/bzImage -drive file=${1:-output}/images/rootfs.ext2,if=virtio,format=raw -append "rootwait root=/dev/vda console=tty1 console=ttyS0" -serial stdio -net nic,model=virtio -net user
+
+# 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
diff --git a/board/qemu/x86_64/readme.txt b/board/qemu/x86_64/readme.txt
deleted file mode 100644
index 93ac22a947..0000000000
--- a/board/qemu/x86_64/readme.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Run the emulation with:
-
-  qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "rootwait root=/dev/vda console=tty1 console=ttyS0" -serial stdio -net nic,model=virtio -net user
-
-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
diff --git a/board/qemu/xtensa-lx60/launch.sh b/board/qemu/xtensa-lx60/launch.sh
new file mode 100755
index 0000000000..1d045b0053
--- /dev/null
+++ b/board/qemu/xtensa-lx60/launch.sh
@@ -0,0 +1,7 @@
+#!/bin/env bash
+
+qemu-system-xtensa -M lx60 -cpu dc233c -kernel ${1:-output}/images/Image.elf -monitor null -nographic 
+
+# The login prompt will appear in the terminal that started Qemu.
+
+# Tested with QEMU 2.12.0
diff --git a/board/qemu/xtensa-lx60/readme.txt b/board/qemu/xtensa-lx60/readme.txt
deleted file mode 100644
index 4287e1f09e..0000000000
--- a/board/qemu/xtensa-lx60/readme.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Run the emulation with:
-
- qemu-system-xtensa -M lx60 -cpu dc233c -monitor null -nographic -kernel output/images/Image.elf
-
-The login prompt will appear in the terminal that started Qemu.
-
-Tested with QEMU 2.12.0
-- 
2.21.0

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

* [Buildroot] [PATCH v3 for-next 09/11] configs/qemu-*: add a comment to provide the path launch.sh script for each Qemu defconfig
  2019-11-17 20:18 [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
                   ` (7 preceding siblings ...)
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 08/11] board/qemu/*/launch.sh: add qemu launch script Romain Naour
@ 2019-11-17 20:19 ` Romain Naour
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 10/11] support/scripts/boot-qemu-image.py: boot Qemu images with Qemu-system Romain Naour
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Romain Naour @ 2019-11-17 20:19 UTC (permalink / raw)
  To: buildroot

This comment could be useful to point peoples at the script to
start Qemu but also for a script used in a automated CI (gitlab).

The path provided in the defconfig allow to "link" explicitely
a Qemu defconfig and it's Qemu command line.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Cc: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
 configs/qemu_aarch64_virt_defconfig        | 2 ++
 configs/qemu_arm_versatile_defconfig       | 2 ++
 configs/qemu_arm_versatile_nommu_defconfig | 2 ++
 configs/qemu_arm_vexpress_defconfig        | 2 ++
 configs/qemu_arm_vexpress_tz_defconfig     | 2 ++
 configs/qemu_csky610_virt_defconfig        | 2 ++
 configs/qemu_csky807_virt_defconfig        | 2 ++
 configs/qemu_csky810_virt_defconfig        | 2 ++
 configs/qemu_csky860_virt_defconfig        | 2 ++
 configs/qemu_m68k_mcf5208_defconfig        | 2 ++
 configs/qemu_m68k_q800_defconfig           | 2 ++
 configs/qemu_microblazebe_mmu_defconfig    | 2 ++
 configs/qemu_microblazeel_mmu_defconfig    | 2 ++
 configs/qemu_mips32r2_malta_defconfig      | 2 ++
 configs/qemu_mips32r2el_malta_defconfig    | 2 ++
 configs/qemu_mips32r6_malta_defconfig      | 2 ++
 configs/qemu_mips32r6el_malta_defconfig    | 2 ++
 configs/qemu_mips64_malta_defconfig        | 2 ++
 configs/qemu_mips64el_malta_defconfig      | 2 ++
 configs/qemu_mips64r6_malta_defconfig      | 2 ++
 configs/qemu_mips64r6el_malta_defconfig    | 2 ++
 configs/qemu_nios2_10m50_defconfig         | 2 ++
 configs/qemu_or1k_defconfig                | 2 ++
 configs/qemu_ppc64_e5500_defconfig         | 2 ++
 configs/qemu_ppc64_pseries_defconfig       | 2 ++
 configs/qemu_ppc64le_pseries_defconfig     | 2 ++
 configs/qemu_ppc_g3beige_defconfig         | 2 ++
 configs/qemu_ppc_mac99_defconfig           | 2 ++
 configs/qemu_ppc_mpc8544ds_defconfig       | 2 ++
 configs/qemu_ppc_virtex_ml507_defconfig    | 2 ++
 configs/qemu_riscv32_virt_defconfig        | 2 ++
 configs/qemu_riscv64_virt_defconfig        | 2 ++
 configs/qemu_sh4_r2d_defconfig             | 2 ++
 configs/qemu_sh4eb_r2d_defconfig           | 2 ++
 configs/qemu_sparc64_sun4u_defconfig       | 2 ++
 configs/qemu_sparc_ss10_defconfig          | 2 ++
 configs/qemu_x86_64_defconfig              | 2 ++
 configs/qemu_x86_defconfig                 | 2 ++
 configs/qemu_xtensa_lx60_defconfig         | 2 ++
 configs/qemu_xtensa_lx60_nommu_defconfig   | 2 ++
 40 files changed, 80 insertions(+)

diff --git a/configs/qemu_aarch64_virt_defconfig b/configs/qemu_aarch64_virt_defconfig
index 212d779ac9..c0ca6c9840 100644
--- a/configs/qemu_aarch64_virt_defconfig
+++ b/configs/qemu_aarch64_virt_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/aarch64-virt/launch.sh
+
 # Architecture
 BR2_aarch64=y
 BR2_cortex_a53=y
diff --git a/configs/qemu_arm_versatile_defconfig b/configs/qemu_arm_versatile_defconfig
index 1194644eca..ef85cef4ba 100644
--- a/configs/qemu_arm_versatile_defconfig
+++ b/configs/qemu_arm_versatile_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/arm-versatile/launch.sh
+
 # Architecture
 BR2_arm=y
 BR2_arm926t=y
diff --git a/configs/qemu_arm_versatile_nommu_defconfig b/configs/qemu_arm_versatile_nommu_defconfig
index c4fefeef48..10265b77da 100644
--- a/configs/qemu_arm_versatile_nommu_defconfig
+++ b/configs/qemu_arm_versatile_nommu_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/arm-versatile-nommu/launch.sh
+
 # Architecture
 BR2_arm=y
 BR2_arm926t=y
diff --git a/configs/qemu_arm_vexpress_defconfig b/configs/qemu_arm_vexpress_defconfig
index e52a14081e..191610e924 100644
--- a/configs/qemu_arm_vexpress_defconfig
+++ b/configs/qemu_arm_vexpress_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/arm-vexpress/launch.sh
+
 # Architecture
 BR2_arm=y
 BR2_cortex_a9=y
diff --git a/configs/qemu_arm_vexpress_tz_defconfig b/configs/qemu_arm_vexpress_tz_defconfig
index bf75493dbe..c5c5467b3d 100644
--- a/configs/qemu_arm_vexpress_tz_defconfig
+++ b/configs/qemu_arm_vexpress_tz_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/arm-vexpress-tz/launch.sh
+
 # Architecture
 BR2_arm=y
 BR2_cortex_a15=y
diff --git a/configs/qemu_csky610_virt_defconfig b/configs/qemu_csky610_virt_defconfig
index be5fee8c6a..4fffda51de 100644
--- a/configs/qemu_csky610_virt_defconfig
+++ b/configs/qemu_csky610_virt_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/csky610-virt/launch.sh
+
 # Architecture
 BR2_csky=y
 BR2_ck610=y
diff --git a/configs/qemu_csky807_virt_defconfig b/configs/qemu_csky807_virt_defconfig
index 09e0e3dd01..95e2b19e8b 100644
--- a/configs/qemu_csky807_virt_defconfig
+++ b/configs/qemu_csky807_virt_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/csky807-virt/launch.sh
+
 # Architecture
 BR2_csky=y
 BR2_ck807=y
diff --git a/configs/qemu_csky810_virt_defconfig b/configs/qemu_csky810_virt_defconfig
index f6d3b82206..0221bdd263 100644
--- a/configs/qemu_csky810_virt_defconfig
+++ b/configs/qemu_csky810_virt_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/csky810-virt/launch.sh
+
 # Architecture
 BR2_csky=y
 BR2_ck810=y
diff --git a/configs/qemu_csky860_virt_defconfig b/configs/qemu_csky860_virt_defconfig
index 896b9a8f2e..71c186e8ce 100644
--- a/configs/qemu_csky860_virt_defconfig
+++ b/configs/qemu_csky860_virt_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/csky860-virt/launch.sh
+
 # Architecture
 BR2_csky=y
 BR2_ck860=y
diff --git a/configs/qemu_m68k_mcf5208_defconfig b/configs/qemu_m68k_mcf5208_defconfig
index 4dde10b3aa..414f0c962e 100644
--- a/configs/qemu_m68k_mcf5208_defconfig
+++ b/configs/qemu_m68k_mcf5208_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/m68k-mcf5208/launch.sh
+
 # Architecture
 BR2_m68k=y
 BR2_m68k_cf5208=y
diff --git a/configs/qemu_m68k_q800_defconfig b/configs/qemu_m68k_q800_defconfig
index 0dd90a97b3..868e4f0980 100644
--- a/configs/qemu_m68k_q800_defconfig
+++ b/configs/qemu_m68k_q800_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/m68k-q800/launch.sh
+
 # Architecture
 BR2_m68k=y
 BR2_m68k_68040=y
diff --git a/configs/qemu_microblazebe_mmu_defconfig b/configs/qemu_microblazebe_mmu_defconfig
index 022d2b7825..661f30ab64 100644
--- a/configs/qemu_microblazebe_mmu_defconfig
+++ b/configs/qemu_microblazebe_mmu_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/microblazebe-mmu/launch.sh
+
 # Architecture
 BR2_microblaze=y
 BR2_microblazebe=y
diff --git a/configs/qemu_microblazeel_mmu_defconfig b/configs/qemu_microblazeel_mmu_defconfig
index fbe02ca429..7bf5a2aaec 100644
--- a/configs/qemu_microblazeel_mmu_defconfig
+++ b/configs/qemu_microblazeel_mmu_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/microblazeel-mmu/launch.sh
+
 # Architecture
 BR2_microblaze=y
 BR2_microblazeel=y
diff --git a/configs/qemu_mips32r2_malta_defconfig b/configs/qemu_mips32r2_malta_defconfig
index 838a3d6621..3ce6ebe0b9 100644
--- a/configs/qemu_mips32r2_malta_defconfig
+++ b/configs/qemu_mips32r2_malta_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/mips32r2-malta/launch.sh
+
 # Architecture
 BR2_mips=y
 BR2_mips_32r2=y
diff --git a/configs/qemu_mips32r2el_malta_defconfig b/configs/qemu_mips32r2el_malta_defconfig
index aaf382143a..998b3e03f1 100644
--- a/configs/qemu_mips32r2el_malta_defconfig
+++ b/configs/qemu_mips32r2el_malta_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/mips32r2el-malta/launch.sh
+
 # Architecture
 BR2_mipsel=y
 BR2_mips_32r2=y
diff --git a/configs/qemu_mips32r6_malta_defconfig b/configs/qemu_mips32r6_malta_defconfig
index 01781f3159..2ecf92e89b 100644
--- a/configs/qemu_mips32r6_malta_defconfig
+++ b/configs/qemu_mips32r6_malta_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/mips32r6-malta/launch.sh
+
 # Architecture
 BR2_mips=y
 BR2_mips_32r6=y
diff --git a/configs/qemu_mips32r6el_malta_defconfig b/configs/qemu_mips32r6el_malta_defconfig
index 1d3d0aff9b..958a44252a 100644
--- a/configs/qemu_mips32r6el_malta_defconfig
+++ b/configs/qemu_mips32r6el_malta_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/mips32r6el-malta/launch.sh
+
 # Architecture
 BR2_mipsel=y
 BR2_mips_32r6=y
diff --git a/configs/qemu_mips64_malta_defconfig b/configs/qemu_mips64_malta_defconfig
index 20e368a323..7a07408e4c 100644
--- a/configs/qemu_mips64_malta_defconfig
+++ b/configs/qemu_mips64_malta_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/mips64-malta/launch.sh
+
 # Architecture
 BR2_mips64=y
 BR2_MIPS_NABI64=y
diff --git a/configs/qemu_mips64el_malta_defconfig b/configs/qemu_mips64el_malta_defconfig
index 2ec28436bb..8a7c6fbcdc 100644
--- a/configs/qemu_mips64el_malta_defconfig
+++ b/configs/qemu_mips64el_malta_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/mips64el-malta/launch.sh
+
 # Architecture
 BR2_mips64el=y
 BR2_MIPS_NABI64=y
diff --git a/configs/qemu_mips64r6_malta_defconfig b/configs/qemu_mips64r6_malta_defconfig
index 5c00cf588b..289cedf22f 100644
--- a/configs/qemu_mips64r6_malta_defconfig
+++ b/configs/qemu_mips64r6_malta_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/mips64r6-malta/launch.sh
+
 # Architecture
 BR2_mips64=y
 BR2_mips_64r6=y
diff --git a/configs/qemu_mips64r6el_malta_defconfig b/configs/qemu_mips64r6el_malta_defconfig
index 03f5651e93..5b668ff68f 100644
--- a/configs/qemu_mips64r6el_malta_defconfig
+++ b/configs/qemu_mips64r6el_malta_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/mips64r6el-malta/launch.sh
+
 # Architecture
 BR2_mips64el=y
 BR2_mips_64r6=y
diff --git a/configs/qemu_nios2_10m50_defconfig b/configs/qemu_nios2_10m50_defconfig
index 24573fc083..5445146b5d 100644
--- a/configs/qemu_nios2_10m50_defconfig
+++ b/configs/qemu_nios2_10m50_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/nios2-10m50/launch.sh
+
 BR2_nios2=y
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
diff --git a/configs/qemu_or1k_defconfig b/configs/qemu_or1k_defconfig
index 3d3fd537a3..2f6c38b4f6 100644
--- a/configs/qemu_or1k_defconfig
+++ b/configs/qemu_or1k_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/or1k/launch.sh
+
 # Architecture
 BR2_or1k=y
 
diff --git a/configs/qemu_ppc64_e5500_defconfig b/configs/qemu_ppc64_e5500_defconfig
index d5d66474b0..45b0cbdf15 100644
--- a/configs/qemu_ppc64_e5500_defconfig
+++ b/configs/qemu_ppc64_e5500_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/ppc64-e5500/launch.sh
+
 # Architecture
 BR2_powerpc64=y
 BR2_powerpc_e5500=y
diff --git a/configs/qemu_ppc64_pseries_defconfig b/configs/qemu_ppc64_pseries_defconfig
index 200c50da1a..ca14b62ec9 100644
--- a/configs/qemu_ppc64_pseries_defconfig
+++ b/configs/qemu_ppc64_pseries_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/ppc64-pseries/launch.sh
+
 # Architecture
 BR2_powerpc64=y
 BR2_powerpc_power7=y
diff --git a/configs/qemu_ppc64le_pseries_defconfig b/configs/qemu_ppc64le_pseries_defconfig
index 0eb3f117c1..3ee70fe869 100644
--- a/configs/qemu_ppc64le_pseries_defconfig
+++ b/configs/qemu_ppc64le_pseries_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/ppc64le-pseries/launch.sh
+
 # Architecture
 BR2_powerpc64le=y
 BR2_powerpc_power8=y
diff --git a/configs/qemu_ppc_g3beige_defconfig b/configs/qemu_ppc_g3beige_defconfig
index 8034abce51..be46767edb 100644
--- a/configs/qemu_ppc_g3beige_defconfig
+++ b/configs/qemu_ppc_g3beige_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/ppc-g3beige/launch.sh
+
 # Architecture
 BR2_powerpc=y
 BR2_powerpc_750=y
diff --git a/configs/qemu_ppc_mac99_defconfig b/configs/qemu_ppc_mac99_defconfig
index 9a33c3d82c..66368dbed4 100644
--- a/configs/qemu_ppc_mac99_defconfig
+++ b/configs/qemu_ppc_mac99_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/ppc-mac99/launch.sh
+
 BR2_powerpc=y
 BR2_powerpc_7400=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
diff --git a/configs/qemu_ppc_mpc8544ds_defconfig b/configs/qemu_ppc_mpc8544ds_defconfig
index 9a529ae54b..cf9ba12858 100644
--- a/configs/qemu_ppc_mpc8544ds_defconfig
+++ b/configs/qemu_ppc_mpc8544ds_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/ppc-mpc8544ds/launch.sh
+
 # Architecture
 BR2_powerpc=y
 BR2_powerpc_8548=y
diff --git a/configs/qemu_ppc_virtex_ml507_defconfig b/configs/qemu_ppc_virtex_ml507_defconfig
index 4b60675474..2df88b62e1 100644
--- a/configs/qemu_ppc_virtex_ml507_defconfig
+++ b/configs/qemu_ppc_virtex_ml507_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/ppc-virtex-ml507/launch.sh
+
 # Architecture
 BR2_powerpc=y
 BR2_powerpc_440=y
diff --git a/configs/qemu_riscv32_virt_defconfig b/configs/qemu_riscv32_virt_defconfig
index 914eada004..dece6673db 100644
--- a/configs/qemu_riscv32_virt_defconfig
+++ b/configs/qemu_riscv32_virt_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/riscv32-virt/launch.sh
+
 # Architecture
 BR2_riscv=y
 BR2_RISCV_32=y
diff --git a/configs/qemu_riscv64_virt_defconfig b/configs/qemu_riscv64_virt_defconfig
index 5c52f7a0f8..478b10d333 100644
--- a/configs/qemu_riscv64_virt_defconfig
+++ b/configs/qemu_riscv64_virt_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/riscv64-virt/launch.sh
+
 # Architecture
 BR2_riscv=y
 BR2_RISCV_64=y
diff --git a/configs/qemu_sh4_r2d_defconfig b/configs/qemu_sh4_r2d_defconfig
index ca7b25e295..f75a9de458 100644
--- a/configs/qemu_sh4_r2d_defconfig
+++ b/configs/qemu_sh4_r2d_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/sh4-r2d/launch.sh
+
 # Architecture
 BR2_sh=y
 BR2_sh4=y
diff --git a/configs/qemu_sh4eb_r2d_defconfig b/configs/qemu_sh4eb_r2d_defconfig
index 0664a08c4d..b58c6b0b88 100644
--- a/configs/qemu_sh4eb_r2d_defconfig
+++ b/configs/qemu_sh4eb_r2d_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/sh4eb-r2d/launch.sh
+
 # Architecture
 BR2_sh=y
 BR2_sh4eb=y
diff --git a/configs/qemu_sparc64_sun4u_defconfig b/configs/qemu_sparc64_sun4u_defconfig
index 70b4f13cf8..71841a6feb 100644
--- a/configs/qemu_sparc64_sun4u_defconfig
+++ b/configs/qemu_sparc64_sun4u_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/sparc64-sun4u/launch.sh
+
 # Architecture
 BR2_sparc64=y
 BR2_sparc_v9=y
diff --git a/configs/qemu_sparc_ss10_defconfig b/configs/qemu_sparc_ss10_defconfig
index 23733d8594..ae18d2e0c7 100644
--- a/configs/qemu_sparc_ss10_defconfig
+++ b/configs/qemu_sparc_ss10_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/sparc-ss10/launch.sh
+
 # Architecture
 BR2_sparc=y
 BR2_sparc_v8=y
diff --git a/configs/qemu_x86_64_defconfig b/configs/qemu_x86_64_defconfig
index f9d868d169..2752f70e97 100644
--- a/configs/qemu_x86_64_defconfig
+++ b/configs/qemu_x86_64_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/x86_64/launch.sh
+
 # Architecture
 BR2_x86_64=y
 
diff --git a/configs/qemu_x86_defconfig b/configs/qemu_x86_defconfig
index cb68b5f4ff..e08a7a5c51 100644
--- a/configs/qemu_x86_defconfig
+++ b/configs/qemu_x86_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/x86/launch.sh
+
 # Architecture
 BR2_i386=y
 BR2_x86_pentiumpro=y
diff --git a/configs/qemu_xtensa_lx60_defconfig b/configs/qemu_xtensa_lx60_defconfig
index a5fd14b3fd..380ebe1453 100644
--- a/configs/qemu_xtensa_lx60_defconfig
+++ b/configs/qemu_xtensa_lx60_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/xtensa-lx60/launch.sh
+
 # Architecture
 BR2_xtensa=y
 BR2_XTENSA_CUSTOM=y
diff --git a/configs/qemu_xtensa_lx60_nommu_defconfig b/configs/qemu_xtensa_lx60_nommu_defconfig
index 750e37dc07..1fe82488f9 100644
--- a/configs/qemu_xtensa_lx60_nommu_defconfig
+++ b/configs/qemu_xtensa_lx60_nommu_defconfig
@@ -1,3 +1,5 @@
+# To start Qemu, use the Qemu command line from: board/qemu/xtensa-lx60/launch.sh
+
 # Architecture
 BR2_xtensa=y
 BR2_XTENSA_CUSTOM=y
-- 
2.21.0

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

* [Buildroot] [PATCH v3 for-next 10/11] support/scripts/boot-qemu-image.py: boot Qemu images with Qemu-system.
  2019-11-17 20:18 [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
                   ` (8 preceding siblings ...)
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 09/11] configs/qemu-*: add a comment to provide the path launch.sh script for each Qemu defconfig Romain Naour
@ 2019-11-17 20:19 ` Romain Naour
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 11/11] gitlab.yml.in*: enable Qemu gitlab testing Romain Naour
  2019-12-14 20:48 ` [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
  11 siblings, 0 replies; 21+ messages in thread
From: Romain Naour @ 2019-11-17 20:19 UTC (permalink / raw)
  To: buildroot

From: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>

This script is intended to be used by gitlab CI to test
at runtime Qemu images generated by Buildroot's Qemu defconfigs.

This allows to troubleshoot different issues that may be
associated with defective builds by lanching a qemu machine,
sending root password, waiting for login shell and then perform
a shutdown.

This script is inspired by toolchain builder [1] and the Buildroot
testing infrastructure.

Usage: boot-qemu-image.py <qemu_arch_defconfig>

The gitlab CI will call this script for each defconfig build but
only Qemu defconfig will be runtime tested, all others defconfig are
ignored. The script retrieve the patch to the launch.sh script that
contain the Qemu command ligne. The launch.sh script is no executed
directly since we need to tweak some Qemu options (remove serial port
redirection, disable graphic support...).

The script check is the corresponding Qemu binary (qemu-system) is
available, either built by Buildroot or available from the host.
Some Qemu defconfig must be used with a specific Qemu version (fork)
that is not always available. The script doesn't error out when
qemu-system is missing but a message is added in a log.

Finally, the script start Qemu like it's done for the Buildroot
testing infrastructure (using pexpect).

Note:
We noticed some timeout issues with pexpect when the Qemu machine is
powered off. That's because Qemu process doesn't stop even if the
system is halted (after "System halted"). So the script doesn't error
out when such timeout occure. The behaviour depends on the architecture
emulated by Qemu.

[1] https://github.com/bootlin/toolchains-builder/blob/master/build.sh

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 support/scripts/boot-qemu-image.py | 109 +++++++++++++++++++++++++++++
 1 file changed, 109 insertions(+)
 create mode 100755 support/scripts/boot-qemu-image.py

diff --git a/support/scripts/boot-qemu-image.py b/support/scripts/boot-qemu-image.py
new file mode 100755
index 0000000000..14cb3b02d0
--- /dev/null
+++ b/support/scripts/boot-qemu-image.py
@@ -0,0 +1,109 @@
+#!/usr/bin/env python3
+
+import pexpect
+import sys
+import os
+import re
+import shlex
+import shutil
+import subprocess
+
+argc = len(sys.argv)
+if not (argc == 2):
+    print("Error: incorrect number of arguments")
+    print("""Usage: boot-qemu-image.py <qemu_arch_defconfig>""")
+    sys.exit(1)
+
+defconfig_filename = sys.argv[1]
+
+# Ignore non Qemu defconfig
+if defconfig_filename.startswith('qemu_') is False:
+    sys.exit(0)
+
+# This script expect to run from the Buildroot top directory.
+defconfig_filepath = os.path.join(os.getcwd(), 'configs', defconfig_filename)
+
+with open(defconfig_filepath, 'r') as defconfig_file:
+    # read only the first line and keep the path to launch.sh script.
+    launch_filepath = defconfig_file.readline().split(":")[1].strip()
+
+qemu_cmd = ""
+
+with open(launch_filepath, 'r') as launch_file:
+    for line in launch_file:
+        if re.search("qemu-system", line):
+            qemu_cmd = line
+            break
+
+if not qemu_cmd:
+    print("Error: No QEMU command line found in " + defconfig_filename)
+    sys.exit(1)
+
+# Replace bashism
+qemu_cmd = line.replace("${1:-output}", "output")
+
+# Remove -serial stdio if present
+qemu_cmd = qemu_cmd.replace("-serial stdio", "")
+
+# Special case for SH4 -display none
+if defconfig_filename.startswith('qemu_sh4') is True:
+    qemu_cmd += "-serial stdio -display none"
+else:
+    qemu_cmd += "-nographic"
+
+# pexpect needs a list, convert a sting to a list and escape quoted substring.
+qemu_cmd = shlex.split(qemu_cmd)
+
+# Use host Qemu if provided by Buildroot.
+os.environ["PATH"] = os.getcwd() + "/output/host/bin" + os.pathsep + os.environ["PATH"]
+
+# Ignore when no Qemu emulation is available
+if not shutil.which(qemu_cmd[0]):
+    print("No " + qemu_cmd[0] + " binary available, THIS DEFCONFIG CAN NOT BE TESTED!")
+    sys.exit(0)
+
+
+def main():
+    global child
+
+    try:
+        child.expect(["buildroot login:", pexpect.TIMEOUT], timeout=60)
+    except pexpect.EOF:
+        print("Connection problem, exiting.")
+        sys.exit(1)
+    except pexpect.TIMEOUT:
+        print("System did not boot in time, exiting.")
+        sys.exit(1)
+
+    child.sendline("root\r")
+
+    try:
+        child.expect(["# ", pexpect.TIMEOUT], timeout=60)
+    except pexpect.EOF:
+        print("Cannot connect to shell")
+        sys.exit(1)
+    except pexpect.TIMEOUT:
+        print("Timeout while waiting for shell")
+        sys.exit(1)
+
+    child.sendline("poweroff\r")
+
+    try:
+        child.expect(["System halted", pexpect.TIMEOUT], timeout=60)
+        child.expect(pexpect.EOF)
+    except pexpect.EOF:
+        sys.exit(0)
+    except pexpect.TIMEOUT:
+        print("Cannot halt machine")
+        # Qemu may not exit properly after "System halted", ignore.
+        sys.exit(0)
+
+
+# Log the Qemu version
+subprocess.call([qemu_cmd[0], "--version"])
+
+child = pexpect.spawn(qemu_cmd[0], qemu_cmd[1:], timeout=5, encoding='utf-8',
+                      env={"QEMU_AUDIO_DRV": "none", 'PATH': os.environ["PATH"]})
+# We want only stdout into the log to avoid double echo
+child.logfile = sys.stdout
+main()
-- 
2.21.0

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

* [Buildroot] [PATCH v3 for-next 11/11] gitlab.yml.in*: enable Qemu gitlab testing
  2019-11-17 20:18 [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
                   ` (9 preceding siblings ...)
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 10/11] support/scripts/boot-qemu-image.py: boot Qemu images with Qemu-system Romain Naour
@ 2019-11-17 20:19 ` Romain Naour
  2019-12-14 20:48 ` [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
  11 siblings, 0 replies; 21+ messages in thread
From: Romain Naour @ 2019-11-17 20:19 UTC (permalink / raw)
  To: buildroot

From: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>

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).

Add the log generated by Qemu to the build artefacts.

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 .gitlab-ci.yml    | 7 +++++++
 .gitlab-ci.yml.in | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1d71257a20..3469de4a7e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -54,6 +54,12 @@ check-package:
                 tail -200 build.log
                 exit 1
             }
+        - |
+            ./support/scripts/boot-qemu-image.py "${DEFCONFIG_NAME}" > >(tee runtime-test.log) 2>&1 || {
+                echo 'Failed runtime test last output'
+                tail -200 runtime-test.log
+                exit 1
+            }
     artifacts:
         when: always
         expire_in: 2 weeks
@@ -64,6 +70,7 @@ check-package:
             - output/build/build-time.log
             - output/build/packages-file-list.txt
             - output/build/*/.config
+            - runtime-test.log
 
 .defconfig:
     extends: .defconfig_base
diff --git a/.gitlab-ci.yml.in b/.gitlab-ci.yml.in
index 7e6a7598ae..6b09730a65 100644
--- a/.gitlab-ci.yml.in
+++ b/.gitlab-ci.yml.in
@@ -54,6 +54,12 @@ check-package:
                 tail -200 build.log
                 exit 1
             }
+        - |
+            ./support/scripts/boot-qemu-image.py "${DEFCONFIG_NAME}" > >(tee runtime-test.log) 2>&1 || {
+                echo 'Failed runtime test last output'
+                tail -200 runtime-test.log
+                exit 1
+            }
     artifacts:
         when: always
         expire_in: 2 weeks
@@ -64,6 +70,7 @@ check-package:
             - output/build/build-time.log
             - output/build/packages-file-list.txt
             - output/build/*/.config
+            - runtime-test.log
 
 .defconfig:
     extends: .defconfig_base
-- 
2.21.0

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

* [Buildroot] [PATCH v3 for-next 08/11] board/qemu/*/launch.sh: add qemu launch script
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 08/11] board/qemu/*/launch.sh: add qemu launch script Romain Naour
@ 2019-11-21 21:42   ` Romain Naour
  0 siblings, 0 replies; 21+ messages in thread
From: Romain Naour @ 2019-11-21 21:42 UTC (permalink / raw)
  To: buildroot

Hi,

Le 17/11/2019 ? 21:19, Romain Naour a ?crit?:
> From: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
> 
> It is not very convenient for Buildroot users to store
> the Qemu command line in a readme.txt instead of a script
> to be used as soon as the Qemu image has been created.
> 
> This patch replace the readme.txt file located in
> board/qemu/<Qemu target>/ by a script (launch.sh).
> 
> This allow Buildroot user to start easily Qemu using
> only one simple command:
> 
> $ ./board/qemu/aarch64-virt/launch.sh test/qemu_aarch64_virt/
> 
> Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> ---


> diff --git a/board/qemu/mips32r2-malta/launch.sh b/board/qemu/mips32r2-malta/launch.sh
> new file mode 100755
> index 0000000000..8069b59171
> --- /dev/null
> +++ b/board/qemu/mips32r2-malta/launch.sh
> @@ -0,0 +1,2 @@
> +#!/bin/env bash
> +

The content of this script is missing, it should be:

 qemu-system-mips -M malta -kernel ${1:-output}/images/vmlinux -serial stdio
-drive file=${1:-output}/images/rootfs.ext2,format=raw -append "rootwait
root=/dev/hda" -net nic,model=pcnet -net user

# 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

It's fixed for v4.

Best regards,
Romain


> diff --git a/board/qemu/mips32r2-malta/readme.txt b/board/qemu/mips32r2-malta/readme.txt
> deleted file mode 100644
> index 9ff3c4b810..0000000000
> --- a/board/qemu/mips32r2-malta/readme.txt
> +++ /dev/null
> @@ -1,9 +0,0 @@
> -Run the emulation with:
> -
> - qemu-system-mips -M malta -kernel output/images/vmlinux -serial stdio -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/hda" -net nic,model=pcnet -net user
> -
> -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

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

* [Buildroot] [PATCH v3 for-next 02/11] configs/qemu{x86, x86_64}: add a serial console
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 02/11] configs/qemu{x86, x86_64}: add a serial console Romain Naour
@ 2019-11-22 11:27   ` Carlos Santos
  2019-11-22 12:42     ` Romain Naour
  0 siblings, 1 reply; 21+ messages in thread
From: Carlos Santos @ 2019-11-22 11:27 UTC (permalink / raw)
  To: buildroot

On Sun, Nov 17, 2019 at 5:19 PM Romain Naour <romain.naour@smile.fr> wrote:
>
> The current Buildroot defconfigs for qemu_x86 and qemu_x86_64
> instantiate a console on tty1, which appears on QEMU's
> graphical window. Add a console on the serial port (ttyS0) to
> be used later for gitlab testing.
>
> This change is need since the script used for gitlab testing
> needs to use a serial output with pexpect.
>
> This change is similar to the one made for raspberrypi [1] to
> handle HDMI and serial console:

I think the serial console should be the default on all qemu
defconfigs, since it best matches embedded devices.

In the long run it should be possible to configure additional ttys by
means of a cleaner and standard mechanism. I even sketched it by meas
of a BR2_TARGET_GETTY_PORTS list some time but lost it when moved to a
new job. I will try to recreate it and submit a draft for review.

-- 
Carlos Santos <unixmania@gmail.com>

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

* [Buildroot] [PATCH v3 for-next 02/11] configs/qemu{x86, x86_64}: add a serial console
  2019-11-22 11:27   ` Carlos Santos
@ 2019-11-22 12:42     ` Romain Naour
  0 siblings, 0 replies; 21+ messages in thread
From: Romain Naour @ 2019-11-22 12:42 UTC (permalink / raw)
  To: buildroot

Hi Carlos,

Thanks for your feedback!

Le 22/11/2019 ? 12:27, Carlos Santos a ?crit?:
> On Sun, Nov 17, 2019 at 5:19 PM Romain Naour <romain.naour@smile.fr> wrote:
>>
>> The current Buildroot defconfigs for qemu_x86 and qemu_x86_64
>> instantiate a console on tty1, which appears on QEMU's
>> graphical window. Add a console on the serial port (ttyS0) to
>> be used later for gitlab testing.
>>
>> This change is need since the script used for gitlab testing
>> needs to use a serial output with pexpect.
>>
>> This change is similar to the one made for raspberrypi [1] to
>> handle HDMI and serial console:
> 
> I think the serial console should be the default on all qemu
> defconfigs, since it best matches embedded devices.

At least it's the common starting point when you start working with Buildroot
and a new embedded device.

Only x86 qemu defconfig was not using the serial console by default.

> 
> In the long run it should be possible to configure additional ttys by
> means of a cleaner and standard mechanism. I even sketched it by meas
> of a BR2_TARGET_GETTY_PORTS list some time but lost it when moved to a
> new job. I will try to recreate it and submit a draft for review.
> 

Ok.

Best regards,
Romain

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

* [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing
  2019-11-17 20:18 [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
                   ` (10 preceding siblings ...)
  2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 11/11] gitlab.yml.in*: enable Qemu gitlab testing Romain Naour
@ 2019-12-14 20:48 ` Romain Naour
  2019-12-18 22:50   ` Arnout Vandecappelle
  11 siblings, 1 reply; 21+ messages in thread
From: Romain Naour @ 2019-12-14 20:48 UTC (permalink / raw)
  To: buildroot

Hi,

Le 17/11/2019 ? 21:18, Romain Naour a ?crit?:
> This new iteration take into account the previous review with
> some additional rework.
> 
> This series start by removing useless host-qemu build for
> m68k_q800, enable serial console for x86/x86_64 and some
> refactoring for csky and arm-versatile.
> 
> Replace the readme.txt file by a bash script that ease starting
> Qemu. Then a new comment is added to each Qemu defconfig files in
> order to provide the path to this new script.
> This path help to link each Qemu defconfig with it's own script.
> 
> Add new python script to be used by gitlab to start Qemu when
> a Qemu defconfig is built.
> 
> Finally add this new python script to .gitlab-ci.yml.
> 
> http://lists.busybox.net/pipermail/buildroot/2019-May/249432.html
> 

I discussed about this series with Jeremy and he suggest to add the Qemu command
line into the Qemu's defconfig file (add a new Kconfig option).
With that, we can even add a new Makefile target "make run-qemu" to start Qemu
when the Qemu command line is set in the defconfig (this would avoid adding
several launch.sh script).

Thought ?

Best regards,
Romain

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

* [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing
  2019-12-14 20:48 ` [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
@ 2019-12-18 22:50   ` Arnout Vandecappelle
  2019-12-19 11:11     ` Peter Korsgaard
  0 siblings, 1 reply; 21+ messages in thread
From: Arnout Vandecappelle @ 2019-12-18 22:50 UTC (permalink / raw)
  To: buildroot



On 14/12/2019 21:48, Romain Naour wrote:
> Hi,
> 
> Le 17/11/2019 ? 21:18, Romain Naour a ?crit?:
>> This new iteration take into account the previous review with
>> some additional rework.
>>
>> This series start by removing useless host-qemu build for
>> m68k_q800, enable serial console for x86/x86_64 and some
>> refactoring for csky and arm-versatile.
>>
>> Replace the readme.txt file by a bash script that ease starting
>> Qemu. Then a new comment is added to each Qemu defconfig files in
>> order to provide the path to this new script.
>> This path help to link each Qemu defconfig with it's own script.
>>
>> Add new python script to be used by gitlab to start Qemu when
>> a Qemu defconfig is built.
>>
>> Finally add this new python script to .gitlab-ci.yml.
>>
>> http://lists.busybox.net/pipermail/buildroot/2019-May/249432.html
>>
> 
> I discussed about this series with Jeremy and he suggest to add the Qemu command
> line into the Qemu's defconfig file (add a new Kconfig option).
> With that, we can even add a new Makefile target "make run-qemu" to start Qemu
> when the Qemu command line is set in the defconfig (this would avoid adding
> several launch.sh script).

So something like

config BR2_PACKAGE_HOST_QEMU_LAUNCH_ARGS
	string "qemu launch command"
	help
	  Command to launch qemu. If this is defined, 'make run-qemu' can be
	  used to build everything and launch qemu.


HOST_QEMU_LAUNCH_ARGS = $(call qstrip,$(BR2_PACKAGE_HOST_QEMU_LAUNCH_ARGS))
ifneq ($(HOST_QEMU_LAUNCH_ARGS),)
run-qemu: world
	$(Q)$(HOST_QEMU) <kernel args> <rootfs args> $(HOST_QEMU_LAUNCH_ARGS)
endif



Looks like a good idea indeed!

 Regards,
 Arnout

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

* [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing
  2019-12-18 22:50   ` Arnout Vandecappelle
@ 2019-12-19 11:11     ` Peter Korsgaard
  2020-02-04 13:59       ` Romain Naour
  0 siblings, 1 reply; 21+ messages in thread
From: Peter Korsgaard @ 2019-12-19 11:11 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

Hi,

 >> I discussed about this series with Jeremy and he suggest to add the Qemu command
 >> line into the Qemu's defconfig file (add a new Kconfig option).
 >> With that, we can even add a new Makefile target "make run-qemu" to start Qemu
 >> when the Qemu command line is set in the defconfig (this would avoid adding
 >> several launch.sh script).

 > So something like

 > config BR2_PACKAGE_HOST_QEMU_LAUNCH_ARGS
 > 	string "qemu launch command"
 > 	help
 > 	  Command to launch qemu. If this is defined, 'make run-qemu' can be
 > 	  used to build everything and launch qemu.


 > HOST_QEMU_LAUNCH_ARGS = $(call qstrip,$(BR2_PACKAGE_HOST_QEMU_LAUNCH_ARGS))
 > ifneq ($(HOST_QEMU_LAUNCH_ARGS),)
 > run-qemu: world
 > 	$(Q)$(HOST_QEMU) <kernel args> <rootfs args> $(HOST_QEMU_LAUNCH_ARGS)
 > endif

 > Looks like a good idea indeed!

Cute. The kernel arguments (-kernel path/to/kernel/image) could indeed
probably be standardized, but we do some to have quite some variation in
the rootfs arguments.

But OK, we could start with just including the rootfs argument in
_LAUNCH_ARGS.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing
  2019-12-19 11:11     ` Peter Korsgaard
@ 2020-02-04 13:59       ` Romain Naour
  2020-02-04 14:31         ` Arnout Vandecappelle
  0 siblings, 1 reply; 21+ messages in thread
From: Romain Naour @ 2020-02-04 13:59 UTC (permalink / raw)
  To: buildroot

Hi,

Le 19/12/2019 ? 12:11, Peter Korsgaard a ?crit?:
>>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
> 
> Hi,
> 
>  >> I discussed about this series with Jeremy and he suggest to add the Qemu command
>  >> line into the Qemu's defconfig file (add a new Kconfig option).
>  >> With that, we can even add a new Makefile target "make run-qemu" to start Qemu
>  >> when the Qemu command line is set in the defconfig (this would avoid adding
>  >> several launch.sh script).
> 
>  > So something like
> 
>  > config BR2_PACKAGE_HOST_QEMU_LAUNCH_ARGS
>  > 	string "qemu launch command"
>  > 	help
>  > 	  Command to launch qemu. If this is defined, 'make run-qemu' can be
>  > 	  used to build everything and launch qemu.
> 
> 
>  > HOST_QEMU_LAUNCH_ARGS = $(call qstrip,$(BR2_PACKAGE_HOST_QEMU_LAUNCH_ARGS))
>  > ifneq ($(HOST_QEMU_LAUNCH_ARGS),)
>  > run-qemu: world
>  > 	$(Q)$(HOST_QEMU) <kernel args> <rootfs args> $(HOST_QEMU_LAUNCH_ARGS)
>  > endif
> 
>  > Looks like a good idea indeed!
> 
> Cute. The kernel arguments (-kernel path/to/kernel/image) could indeed
> probably be standardized, but we do some to have quite some variation in
> the rootfs arguments.
> 
> But OK, we could start with just including the rootfs argument in
> _LAUNCH_ARGS.
> 

About the qemu-system-* binary, should we use the one from the host or use the
one from the host-qemu package? (or it depend?)

It can be convenient to use the Qemu provided by the host since it can provide
full feature support. The Qemu provided by host-qemu only support some
dependencies but not all.

On the other hand, the user can still use the qemu-system-* he want by not using
make run-qemu but using the qemu command line in the console.

Best regards,
Romain

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

* [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing
  2020-02-04 13:59       ` Romain Naour
@ 2020-02-04 14:31         ` Arnout Vandecappelle
  2020-02-04 17:20           ` Romain Naour
  0 siblings, 1 reply; 21+ messages in thread
From: Arnout Vandecappelle @ 2020-02-04 14:31 UTC (permalink / raw)
  To: buildroot



On 04/02/2020 14:59, Romain Naour wrote:
> Hi,
> 
> Le 19/12/2019 ? 12:11, Peter Korsgaard a ?crit?:
>>>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
>>
>> Hi,
>>
>>  >> I discussed about this series with Jeremy and he suggest to add the Qemu command
>>  >> line into the Qemu's defconfig file (add a new Kconfig option).
>>  >> With that, we can even add a new Makefile target "make run-qemu" to start Qemu
>>  >> when the Qemu command line is set in the defconfig (this would avoid adding
>>  >> several launch.sh script).
>>
>>  > So something like
>>
>>  > config BR2_PACKAGE_HOST_QEMU_LAUNCH_ARGS
>>  > 	string "qemu launch command"
>>  > 	help
>>  > 	  Command to launch qemu. If this is defined, 'make run-qemu' can be
>>  > 	  used to build everything and launch qemu.
>>
>>
>>  > HOST_QEMU_LAUNCH_ARGS = $(call qstrip,$(BR2_PACKAGE_HOST_QEMU_LAUNCH_ARGS))
>>  > ifneq ($(HOST_QEMU_LAUNCH_ARGS),)
>>  > run-qemu: world
>>  > 	$(Q)$(HOST_QEMU) <kernel args> <rootfs args> $(HOST_QEMU_LAUNCH_ARGS)
>>  > endif
>>
>>  > Looks like a good idea indeed!
>>
>> Cute. The kernel arguments (-kernel path/to/kernel/image) could indeed
>> probably be standardized, but we do some to have quite some variation in
>> the rootfs arguments.
>>
>> But OK, we could start with just including the rootfs argument in
>> _LAUNCH_ARGS.
>>
> 
> About the qemu-system-* binary, should we use the one from the host or use the
> one from the host-qemu package? (or it depend?)
> 
> It can be convenient to use the Qemu provided by the host since it can provide
> full feature support. The Qemu provided by host-qemu only support some
> dependencies but not all.
> 
> On the other hand, the user can still use the qemu-system-* he want by not using
> make run-qemu but using the qemu command line in the console.

 Indeed. I think the 'run-qemu' should be something completely self-contained
and not rely on anything on the build machine.

 So I think we should use host-qemu.

 Regards,
 Arnout

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

* [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing
  2020-02-04 14:31         ` Arnout Vandecappelle
@ 2020-02-04 17:20           ` Romain Naour
  0 siblings, 0 replies; 21+ messages in thread
From: Romain Naour @ 2020-02-04 17:20 UTC (permalink / raw)
  To: buildroot

Arnout, All,

Le 04/02/2020 ? 15:31, Arnout Vandecappelle a ?crit?:
> 
> 
> On 04/02/2020 14:59, Romain Naour wrote:
>> Hi,
>>
>> Le 19/12/2019 ? 12:11, Peter Korsgaard a ?crit?:
>>>>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
>>>
>>> Hi,
>>>
>>>  >> I discussed about this series with Jeremy and he suggest to add the Qemu command
>>>  >> line into the Qemu's defconfig file (add a new Kconfig option).
>>>  >> With that, we can even add a new Makefile target "make run-qemu" to start Qemu
>>>  >> when the Qemu command line is set in the defconfig (this would avoid adding
>>>  >> several launch.sh script).
>>>
>>>  > So something like
>>>
>>>  > config BR2_PACKAGE_HOST_QEMU_LAUNCH_ARGS
>>>  > 	string "qemu launch command"
>>>  > 	help
>>>  > 	  Command to launch qemu. If this is defined, 'make run-qemu' can be
>>>  > 	  used to build everything and launch qemu.
>>>
>>>
>>>  > HOST_QEMU_LAUNCH_ARGS = $(call qstrip,$(BR2_PACKAGE_HOST_QEMU_LAUNCH_ARGS))
>>>  > ifneq ($(HOST_QEMU_LAUNCH_ARGS),)
>>>  > run-qemu: world
>>>  > 	$(Q)$(HOST_QEMU) <kernel args> <rootfs args> $(HOST_QEMU_LAUNCH_ARGS)
>>>  > endif
>>>
>>>  > Looks like a good idea indeed!
>>>
>>> Cute. The kernel arguments (-kernel path/to/kernel/image) could indeed
>>> probably be standardized, but we do some to have quite some variation in
>>> the rootfs arguments.
>>>
>>> But OK, we could start with just including the rootfs argument in
>>> _LAUNCH_ARGS.
>>>
>>
>> About the qemu-system-* binary, should we use the one from the host or use the
>> one from the host-qemu package? (or it depend?)
>>
>> It can be convenient to use the Qemu provided by the host since it can provide
>> full feature support. The Qemu provided by host-qemu only support some
>> dependencies but not all.
>>
>> On the other hand, the user can still use the qemu-system-* he want by not using
>> make run-qemu but using the qemu command line in the console.
> 
>  Indeed. I think the 'run-qemu' should be something completely self-contained
> and not rely on anything on the build machine.
> 
>  So I think we should use host-qemu.

Ok.

With Yann, we discussed about why adding the qemu command line in the defconfig
may be not a good idea for several reasons:

- The defconfig file contains information that is used during the build, while
running qemu is not part of the build itself.

- The readme.txt file is a documentation file that explain how to start and test
the system under Qemu. A script is not documentation that we can refer users to.

Most of the following is reasoning by Yann (and reviewed/reworked by him IRL):

We could instead use a post-build script to generate the launch.sh script into
the output directory. Thus, the script is in a know location
(output/images/launch.sh).

We still need to retrieve the command line from the readme.txt from the
board/qemu/<qemu target>/. We have to make sure to extract the Qemu command line
to be used by the script, and no a any other text present in the readme.txt.

Some readme.txt files have multiple qemu command lines, either for various
configurations (e.g. csky, one for each defconfig), or for various conditions
(e.g. the ARM V-Express TrustZone cases).

we could add a tag with the name of the defconfig file in front of each command
line in order to extract the right qemu command line. For example:

    qemu_x86_defconfig: qemu-system-i386 -M pc -kernel output/images/bzImage \
        -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append \
        "rootwait root=/dev/vda console=tty1 console=ttyS0" -serial stdio \
        -net nic,model=virtio -net user

Eventually, the user can easily run that script directly from
output/build/maunch.sh (or whatever we call it). Same goes for the testing
infrastructure.

And for the infrastructure, the launcher.sh can be templatised with smartness to
remove or add incompatible options (e.g. remove -serial stdio, or force
-nographics).

Thoughts?

(Yann yields Romain's keyboard  now ;-] )

Best regards,
Romain and Yann.


>  Regards,
>  Arnout
> 

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

end of thread, other threads:[~2020-02-04 17:20 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-17 20:18 [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
2019-11-17 20:18 ` [Buildroot] [PATCH v3 for-next 01/11] configs/qemu_m68k_q800: remove host-qemu Romain Naour
2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 02/11] configs/qemu{x86, x86_64}: add a serial console Romain Naour
2019-11-22 11:27   ` Carlos Santos
2019-11-22 12:42     ` Romain Naour
2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 03/11] board/qemu/arm-versatile: move arm-versatile nommu stuff to board/qemu/arm-versatile-nommu Romain Naour
2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 04/11] board/qemu/csky: move csky610 stuff to board/qemu/csky610-virt Romain Naour
2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 05/11] board/qemu/csky: move csky807 stuff to board/qemu/csky807-virt Romain Naour
2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 06/11] board/qemu/csky: move csky810 stuff to board/qemu/csky810-virt Romain Naour
2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 07/11] board/qemu/csky: move csky860 stuff to board/qemu/csky860-virt Romain Naour
2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 08/11] board/qemu/*/launch.sh: add qemu launch script Romain Naour
2019-11-21 21:42   ` Romain Naour
2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 09/11] configs/qemu-*: add a comment to provide the path launch.sh script for each Qemu defconfig Romain Naour
2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 10/11] support/scripts/boot-qemu-image.py: boot Qemu images with Qemu-system Romain Naour
2019-11-17 20:19 ` [Buildroot] [PATCH v3 for-next 11/11] gitlab.yml.in*: enable Qemu gitlab testing Romain Naour
2019-12-14 20:48 ` [Buildroot] [PATCH v3 for-next 00/11] gitlab Qemu runtime testing Romain Naour
2019-12-18 22:50   ` Arnout Vandecappelle
2019-12-19 11:11     ` Peter Korsgaard
2020-02-04 13:59       ` Romain Naour
2020-02-04 14:31         ` Arnout Vandecappelle
2020-02-04 17:20           ` Romain Naour

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.