Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4 05/12] board/qemu: add IBM s390x and Z arch support
Date: Thu, 24 Sep 2020 23:49:01 +0200	[thread overview]
Message-ID: <20200924214901.GC11621@scaer> (raw)
In-Reply-To: <20200917040802.846896-6-egorenar@linux.ibm.com>

Alexander, All,

On 2020-09-17 06:07 +0200, Alexander Egorenkov spake thusly:
> Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
[--SNIP--]
> diff --git a/board/qemu/s390x/post-build.sh b/board/qemu/s390x/post-build.sh
> new file mode 100755
> index 0000000000..bf83a002c2
> --- /dev/null
> +++ b/board/qemu/s390x/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

I was not too fond of this, so i dropped it and we still get a login
prompt in the terminal that started qemu.

Also, since qemu is not spawning a window to emulate a graphics card (of
sorts), then the tty1 will not really be usable anyway.

So I dropped the post-build script.

> +fi
> diff --git a/board/qemu/s390x/readme.txt b/board/qemu/s390x/readme.txt
> new file mode 100644
> index 0000000000..7fa41640c0
> --- /dev/null
> +++ b/board/qemu/s390x/readme.txt
> @@ -0,0 +1,8 @@
> +Run the emulation with:
> +
> +  qemu-system-s390x -M s390-ccw-virtio -cpu max,zpci=on -m 4G -smp 2 \
> +    -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw \
> +    -append "rootwait root=/dev/vda net.ifnames=0 biosdevname=0" -display none -serial mon:stdio \
> +    -net nic,model=virtio -net user,host=10.0.2.10,hostfwd=tcp:127.0.0.1:10021-:22 # qemu_s390x_defconfig

I saw no reason to force the network IP,so I dropped it. Also, there is
no sshd running, so there is no need to do a port forwarding either, so
dropped too.

Applied to master with those minor fixes, thanks!

Regards,
Yann E. MORIN.

> +The login prompt will appear in the terminal that started Qemu.
> diff --git a/configs/qemu_s390x_defconfig b/configs/qemu_s390x_defconfig
> new file mode 100644
> index 0000000000..8e25d64e15
> --- /dev/null
> +++ b/configs/qemu_s390x_defconfig
> @@ -0,0 +1,24 @@
> +# Architecture
> +BR2_s390x=y
> +
> +# System
> +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
> +BR2_SYSTEM_DHCP="eth0"
> +
> +# Filesystem
> +BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/s390x/post-build.sh"
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)"
> +BR2_TARGET_ROOTFS_EXT2=y
> +# BR2_TARGET_ROOTFS_TAR is not set
> +
> +# Kernel
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.7"
> +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
> +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
> +
> +# host-qemu for gitlab testing
> +BR2_PACKAGE_HOST_QEMU=y
> +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
> -- 
> 2.26.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

  reply	other threads:[~2020-09-24 21:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17  4:07 [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support Alexander Egorenkov
2020-09-17  4:07 ` [Buildroot] [PATCH v4 01/12] arch: add the basic IBM s390x and Z arch support Alexander Egorenkov
2020-09-24 21:44   ` Yann E. MORIN
2020-09-17  4:07 ` [Buildroot] [PATCH v4 02/12] toolchain: add support for the internal IBM s390x and Z toolchain Alexander Egorenkov
2020-09-17  4:07 ` [Buildroot] [PATCH v4 03/12] linux: add bzImage support for IBM s390x and Z arch Alexander Egorenkov
2020-09-17  4:07 ` [Buildroot] [PATCH v4 04/12] package/qemu: add IBM s390x and Z arch support Alexander Egorenkov
2020-09-17  4:07 ` [Buildroot] [PATCH v4 05/12] board/qemu: " Alexander Egorenkov
2020-09-24 21:49   ` Yann E. MORIN [this message]
2020-09-25  5:31     ` Alexander Egorenkov
2020-09-17  4:07 ` [Buildroot] [PATCH v4 06/12] package/systemd: add support for IBM s390x and Z arch Alexander Egorenkov
2020-09-17  4:07 ` [Buildroot] [PATCH v4 07/12] package/cmake: " Alexander Egorenkov
2020-09-17  4:07 ` [Buildroot] [PATCH v4 08/12] package/liburcu: " Alexander Egorenkov
2020-09-17  4:07 ` [Buildroot] [PATCH v4 09/12] package/kexec: " Alexander Egorenkov
2020-09-17  4:08 ` [Buildroot] [PATCH v4 10/12] package/go: " Alexander Egorenkov
2020-09-17  4:08 ` [Buildroot] [PATCH v4 11/12] package/makedumpfile: " Alexander Egorenkov
2020-09-17  4:08 ` [Buildroot] [PATCH v4 12/12] package/s390-tools: new package Alexander Egorenkov
2020-09-24 21:42 ` [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200924214901.GC11621@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox