All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support
@ 2020-09-17  4:07 Alexander Egorenkov
  2020-09-17  4:07 ` [Buildroot] [PATCH v4 01/12] arch: add the basic IBM s390x and Z arch support Alexander Egorenkov
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Alexander Egorenkov @ 2020-09-17  4:07 UTC (permalink / raw)
  To: buildroot

This series of patches adds support for IBM s390x and Z architectures
to buildroot.

v3 -> v4:
  * Addressed all review findings by Romain Naour
  * package/qemu
    - Added s390x support for host
  * qemu s390x board
    - Cleaned up defconfig
    - Enabled host qemu

v2 -> v3:
  * Addressed all review findings by Romain Naour
  * qemu s390x board
    - Linux kernel needs host OpenSSL
  * makedumpfile
    - Cosmetic improvement of dependencies
  * s390-tools
    - Clean up redundant dependencies which are brought in
      already by glibc

v1 -> v2:
  * Addressed all review findings by Yann E. Morin
  * Split up into smaller patches to ease further review process
  * qemu s390x board
    - Clean up of qemu_s390x_defconfig
    - Use fixed Linux kernel version
    - Use in-tree Linux kernel config
    - Add defconfig comment to readme.txt for CI testing
  * s390-tools package
    - Improve Makefile
    - Add dependency on C++ toolchain (due to libvmdump)
    - uClibc-ng is not supported

Alexander Egorenkov (12):
  arch: add the basic IBM s390x and Z arch support
  toolchain: add support for the internal IBM s390x and Z toolchain
  linux: add bzImage support for IBM s390x and Z arch
  package/qemu: add IBM s390x and Z arch support
  board/qemu: add IBM s390x and Z arch support
  package/systemd: add support for IBM s390x and Z arch
  package/cmake: add support for IBM s390x and Z arch
  package/liburcu: add support for IBM s390x and Z arch
  package/kexec: add support for IBM s390x and Z arch
  package/go: add support for IBM s390x and Z arch
  package/makedumpfile: add support for IBM s390x and Z arch
  package/s390-tools: new package

 DEVELOPERS                              |  6 ++
 Makefile                                |  1 +
 arch/Config.in                          | 13 ++++
 arch/Config.in.s390x                    | 34 +++++++++
 board/qemu/s390x/post-build.sh          | 11 +++
 board/qemu/s390x/readme.txt             |  8 +++
 configs/qemu_s390x_defconfig            | 24 +++++++
 linux/Config.in                         |  2 +-
 package/Config.in                       |  1 +
 package/cmake/Config.in                 |  3 +-
 package/gcc/gcc.mk                      |  5 ++
 package/go/Config.in.host               |  2 +-
 package/kexec/Config.in                 |  2 +-
 package/liburcu/Config.in               |  2 +-
 package/makedumpfile/Config.in          |  1 +
 package/qemu/Config.in.host             |  1 +
 package/s390-tools/Config.in            | 13 ++++
 package/s390-tools/s390-tools.hash      |  3 +
 package/s390-tools/s390-tools.mk        | 91 +++++++++++++++++++++++++
 package/systemd/Config.in               |  1 +
 toolchain/toolchain-buildroot/Config.in |  6 +-
 21 files changed, 222 insertions(+), 8 deletions(-)
 create mode 100644 arch/Config.in.s390x
 create mode 100755 board/qemu/s390x/post-build.sh
 create mode 100644 board/qemu/s390x/readme.txt
 create mode 100644 configs/qemu_s390x_defconfig
 create mode 100644 package/s390-tools/Config.in
 create mode 100644 package/s390-tools/s390-tools.hash
 create mode 100644 package/s390-tools/s390-tools.mk

-- 
2.26.2

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

* [Buildroot] [PATCH v4 01/12] arch: add the basic IBM s390x and Z arch support
  2020-09-17  4:07 [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support Alexander Egorenkov
@ 2020-09-17  4:07 ` 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
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 17+ messages in thread
From: Alexander Egorenkov @ 2020-09-17  4:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
---
 DEVELOPERS           |  3 +++
 Makefile             |  1 +
 arch/Config.in       | 14 ++++++++++++++
 arch/Config.in.s390x | 34 ++++++++++++++++++++++++++++++++++
 4 files changed, 52 insertions(+)
 create mode 100644 arch/Config.in.s390x

diff --git a/DEVELOPERS b/DEVELOPERS
index c5124f97ef..2285694f66 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -146,6 +146,9 @@ N:	Alexander Egorenkov <egorenar-dev@posteo.net>
 F:	package/makedumpfile/
 F:	package/multipath-tools/
 
+N:	Alexander Egorenkov <egorenar@linux.ibm.com>
+F:	arch/Config.in.s390x
+
 N:	Alexander Kurz <akurz@blala.de>
 F:	package/minimodem/
 
diff --git a/Makefile b/Makefile
index 9648fa58d8..384bfe3fe9 100644
--- a/Makefile
+++ b/Makefile
@@ -445,6 +445,7 @@ KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \
 	-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
 	-e s/riscv.*/riscv/ \
 	-e s/sh.*/sh/ \
+	-e s/s390x/s390/ \
 	-e s/microblazeel/microblaze/)
 
 ZCAT := $(call qstrip,$(BR2_ZCAT))
diff --git a/arch/Config.in b/arch/Config.in
index 0707c076e2..eb9b6007c9 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -219,6 +219,16 @@ config BR2_riscv
 	  https://riscv.org/
 	  https://en.wikipedia.org/wiki/RISC-V
 
+config BR2_s390x
+	bool "s390x"
+	select BR2_ARCH_IS_64
+	select BR2_ARCH_HAS_MMU_MANDATORY
+	select BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT
+	help
+	  s390x is a big-endian architecture made by IBM.
+	  http://www.ibm.com/
+	  http://en.wikipedia.org/wiki/IBM_System/390
+
 config BR2_sh
 	bool "SuperH"
 	select BR2_ARCH_HAS_MMU_OPTIONAL
@@ -457,6 +467,10 @@ if BR2_riscv
 source "arch/Config.in.riscv"
 endif
 
+if BR2_s390x
+source "arch/Config.in.s390x"
+endif
+
 if BR2_sh
 source "arch/Config.in.sh"
 endif
diff --git a/arch/Config.in.s390x b/arch/Config.in.s390x
new file mode 100644
index 0000000000..39d2f58aa9
--- /dev/null
+++ b/arch/Config.in.s390x
@@ -0,0 +1,34 @@
+
+choice
+	prompt "Target Architecture Variant"
+	depends on BR2_s390x
+	help
+	  Specific CPU variant to use
+
+config BR2_s390x_z13
+	bool "z13"
+	depends on BR2_s390x
+
+config BR2_s390x_z14
+	bool "z14"
+	depends on BR2_s390x
+
+config BR2_s390x_z15
+	bool "z15"
+	depends on BR2_s390x
+
+endchoice
+
+config BR2_ARCH
+	default "s390x"	if BR2_s390x
+
+config BR2_ENDIAN
+	default "BIG"
+
+config BR2_GCC_TARGET_ARCH
+	default "arch11" if BR2_s390x_z13
+	default "arch12" if BR2_s390x_z14
+	default "arch13" if BR2_s390x_z15
+
+config BR2_READELF_ARCH_NAME
+	default "IBM S/390"	if BR2_s390x
-- 
2.26.2

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

* [Buildroot] [PATCH v4 02/12] toolchain: add support for the internal IBM s390x and Z toolchain
  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-17  4:07 ` Alexander Egorenkov
  2020-09-17  4:07 ` [Buildroot] [PATCH v4 03/12] linux: add bzImage support for IBM s390x and Z arch Alexander Egorenkov
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Alexander Egorenkov @ 2020-09-17  4:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
---
 arch/Config.in                          | 1 -
 package/gcc/gcc.mk                      | 5 +++++
 toolchain/toolchain-buildroot/Config.in | 6 +++---
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/Config.in b/arch/Config.in
index eb9b6007c9..155403c363 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -223,7 +223,6 @@ config BR2_s390x
 	bool "s390x"
 	select BR2_ARCH_IS_64
 	select BR2_ARCH_HAS_MMU_MANDATORY
-	select BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT
 	help
 	  s390x is a big-endian architecture made by IBM.
 	  http://www.ibm.com/
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index b834269adc..0912c07a71 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -241,6 +241,11 @@ HOST_GCC_COMMON_CONF_OPTS += \
 	--with-long-double-128
 endif
 
+ifeq ($(BR2_s390x),y)
+HOST_GCC_COMMON_CONF_OPTS += \
+	--with-long-double-128
+endif
+
 HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS += -DBR_CROSS_PATH_SUFFIX='".br_real"'
 
 # For gcc-initial, we need to tell gcc that the C library will be
diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index 418d5cb387..1c4705600e 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -46,9 +46,9 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC
 		   BR2_aarch64_be  || BR2_i386       || BR2_mips    || \
 		   BR2_mipsel      || BR2_mips64     || BR2_mips64el|| \
 		   BR2_powerpc     || BR2_powerpc64  || BR2_powerpc64le || \
-		   BR2_riscv       || BR2_sh         || BR2_sparc64     || \
-		   BR2_x86_64      || BR2_microblaze || BR2_nios2       || \
-		   (BR2_arc && BR2_ARC_ATOMIC_EXT)   || BR2_csky
+		   BR2_riscv       || BR2_s390x      || BR2_sh          || \
+		   BR2_sparc64     || BR2_x86_64     || BR2_microblaze  || \
+		   BR2_nios2       || (BR2_arc && BR2_ARC_ATOMIC_EXT)   || BR2_csky
 	depends on BR2_USE_MMU
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
-- 
2.26.2

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

* [Buildroot] [PATCH v4 03/12] linux: add bzImage support for IBM s390x and Z arch
  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-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 ` Alexander Egorenkov
  2020-09-17  4:07 ` [Buildroot] [PATCH v4 04/12] package/qemu: add IBM s390x and Z arch support Alexander Egorenkov
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Alexander Egorenkov @ 2020-09-17  4:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
---
 linux/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux/Config.in b/linux/Config.in
index 49da2b81b2..ec74e1e65a 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -226,7 +226,7 @@ config BR2_LINUX_KERNEL_APPENDED_UIMAGE
 
 config BR2_LINUX_KERNEL_BZIMAGE
 	bool "bzImage"
-	depends on BR2_i386 || BR2_x86_64
+	depends on BR2_i386 || BR2_x86_64 || BR2_s390x
 
 config BR2_LINUX_KERNEL_ZIMAGE
 	bool "zImage"
-- 
2.26.2

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

* [Buildroot] [PATCH v4 04/12] package/qemu: add IBM s390x and Z arch support
  2020-09-17  4:07 [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support Alexander Egorenkov
                   ` (2 preceding siblings ...)
  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 ` Alexander Egorenkov
  2020-09-17  4:07 ` [Buildroot] [PATCH v4 05/12] board/qemu: " Alexander Egorenkov
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Alexander Egorenkov @ 2020-09-17  4:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
---
 package/qemu/Config.in.host | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/qemu/Config.in.host b/package/qemu/Config.in.host
index 7ccf768d15..a7c0f7bf59 100644
--- a/package/qemu/Config.in.host
+++ b/package/qemu/Config.in.host
@@ -15,6 +15,7 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
 	default y if BR2_powerpc64
 	default y if BR2_powerpc64le
 	default y if BR2_riscv
+	default y if BR2_s390x
 	default y if BR2_sh
 	default y if BR2_sparc
 	default y if BR2_sparc64
-- 
2.26.2

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

* [Buildroot] [PATCH v4 05/12] board/qemu: add IBM s390x and Z arch support
  2020-09-17  4:07 [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support Alexander Egorenkov
                   ` (3 preceding siblings ...)
  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 ` Alexander Egorenkov
  2020-09-24 21:49   ` Yann E. MORIN
  2020-09-17  4:07 ` [Buildroot] [PATCH v4 06/12] package/systemd: add support for IBM s390x and Z arch Alexander Egorenkov
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 17+ messages in thread
From: Alexander Egorenkov @ 2020-09-17  4:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
---
 DEVELOPERS                     |  2 ++
 board/qemu/s390x/post-build.sh | 11 +++++++++++
 board/qemu/s390x/readme.txt    |  8 ++++++++
 configs/qemu_s390x_defconfig   | 24 ++++++++++++++++++++++++
 4 files changed, 45 insertions(+)
 create mode 100755 board/qemu/s390x/post-build.sh
 create mode 100644 board/qemu/s390x/readme.txt
 create mode 100644 configs/qemu_s390x_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index 2285694f66..2c6cc45d45 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -148,6 +148,8 @@ F:	package/multipath-tools/
 
 N:	Alexander Egorenkov <egorenar@linux.ibm.com>
 F:	arch/Config.in.s390x
+F:	board/qemu/s390x/
+F:	configs/qemu_s390x_defconfig
 
 N:	Alexander Kurz <akurz@blala.de>
 F:	package/minimodem/
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
+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
+
+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

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

* [Buildroot] [PATCH v4 06/12] package/systemd: add support for IBM s390x and Z arch
  2020-09-17  4:07 [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support Alexander Egorenkov
                   ` (4 preceding siblings ...)
  2020-09-17  4:07 ` [Buildroot] [PATCH v4 05/12] board/qemu: " Alexander Egorenkov
@ 2020-09-17  4:07 ` Alexander Egorenkov
  2020-09-17  4:07 ` [Buildroot] [PATCH v4 07/12] package/cmake: " Alexander Egorenkov
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Alexander Egorenkov @ 2020-09-17  4:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
---
 package/systemd/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/systemd/Config.in b/package/systemd/Config.in
index 74029aff05..7956370b83 100644
--- a/package/systemd/Config.in
+++ b/package/systemd/Config.in
@@ -12,6 +12,7 @@ config BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS
 	default y if BR2_riscv
 	default y if BR2_sh4 || BR2_sh4eb || BR2_sh4a || BR2_sh4aeb
 	default y if BR2_sparc || BR2_sparc64
+	default y if BR2_s390x
 
 menuconfig BR2_PACKAGE_SYSTEMD
 	bool "systemd"
-- 
2.26.2

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

* [Buildroot] [PATCH v4 07/12] package/cmake: add support for IBM s390x and Z arch
  2020-09-17  4:07 [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support Alexander Egorenkov
                   ` (5 preceding siblings ...)
  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 ` Alexander Egorenkov
  2020-09-17  4:07 ` [Buildroot] [PATCH v4 08/12] package/liburcu: " Alexander Egorenkov
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Alexander Egorenkov @ 2020-09-17  4:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
---
 package/cmake/Config.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/cmake/Config.in b/package/cmake/Config.in
index e7bd14e69a..3c47fdcb49 100644
--- a/package/cmake/Config.in
+++ b/package/cmake/Config.in
@@ -5,7 +5,8 @@ config BR2_PACKAGE_CMAKE_ARCH_SUPPORTS
 		BR2_m68k      || BR2_mips        || BR2_mips64   || \
 		BR2_mipsel    || BR2_mips64el    || BR2_powerpc  || \
 		BR2_powerpc64 || BR2_powerpc64le || BR2_sparc    || \
-		BR2_i386      || BR2_x86_64      || BR2_xtensa
+		BR2_i386      || BR2_x86_64      || BR2_xtensa   || \
+		BR2_s390x
 
 config BR2_PACKAGE_CMAKE
 	bool
-- 
2.26.2

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

* [Buildroot] [PATCH v4 08/12] package/liburcu: add support for IBM s390x and Z arch
  2020-09-17  4:07 [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support Alexander Egorenkov
                   ` (6 preceding siblings ...)
  2020-09-17  4:07 ` [Buildroot] [PATCH v4 07/12] package/cmake: " Alexander Egorenkov
@ 2020-09-17  4:07 ` Alexander Egorenkov
  2020-09-17  4:07 ` [Buildroot] [PATCH v4 09/12] package/kexec: " Alexander Egorenkov
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Alexander Egorenkov @ 2020-09-17  4:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
---
 package/liburcu/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/liburcu/Config.in b/package/liburcu/Config.in
index 7d29642084..5dc8528971 100644
--- a/package/liburcu/Config.in
+++ b/package/liburcu/Config.in
@@ -4,7 +4,7 @@ config BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS
 	depends on BR2_arm || BR2_armeb || BR2_aarch64 || BR2_aarch64_be || \
 		BR2_i386 || BR2_mips || BR2_mips64 || BR2_mipsel || \
 		BR2_mips64el || BR2_nios2 || BR2_powerpc || BR2_powerpc64 || \
-		BR2_powerpc64le || BR2_riscv || BR2_sparc64 || BR2_x86_64
+		BR2_powerpc64le || BR2_riscv || BR2_sparc64 || BR2_s390x || BR2_x86_64
 	depends on BR2_USE_MMU # fork() in test
 
 config BR2_PACKAGE_LIBURCU
-- 
2.26.2

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

* [Buildroot] [PATCH v4 09/12] package/kexec: add support for IBM s390x and Z arch
  2020-09-17  4:07 [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support Alexander Egorenkov
                   ` (7 preceding siblings ...)
  2020-09-17  4:07 ` [Buildroot] [PATCH v4 08/12] package/liburcu: " Alexander Egorenkov
@ 2020-09-17  4:07 ` Alexander Egorenkov
  2020-09-17  4:08 ` [Buildroot] [PATCH v4 10/12] package/go: " Alexander Egorenkov
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Alexander Egorenkov @ 2020-09-17  4:07 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
---
 package/kexec/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kexec/Config.in b/package/kexec/Config.in
index 410e503d9e..90a7bc2672 100644
--- a/package/kexec/Config.in
+++ b/package/kexec/Config.in
@@ -3,7 +3,7 @@ config BR2_PACKAGE_KEXEC
 	depends on BR2_i386 || BR2_x86_64 || BR2_arm || BR2_armeb || \
 		BR2_mips || BR2_mips64 || BR2_mipsel || BR2_mips64el || \
 		BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \
-		BR2_sh4 || BR2_sh4a || BR2_aarch64
+		BR2_sh4 || BR2_sh4a || BR2_aarch64 || BR2_s390x
 	help
 	  Kexec is a user space utility for loading another kernel
 	  and asking the currently running kernel to do something with
-- 
2.26.2

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

* [Buildroot] [PATCH v4 10/12] package/go: add support for IBM s390x and Z arch
  2020-09-17  4:07 [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support Alexander Egorenkov
                   ` (8 preceding siblings ...)
  2020-09-17  4:07 ` [Buildroot] [PATCH v4 09/12] package/kexec: " Alexander Egorenkov
@ 2020-09-17  4:08 ` Alexander Egorenkov
  2020-09-17  4:08 ` [Buildroot] [PATCH v4 11/12] package/makedumpfile: " Alexander Egorenkov
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Alexander Egorenkov @ 2020-09-17  4:08 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
---
 package/go/Config.in.host | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/go/Config.in.host b/package/go/Config.in.host
index 3f16dbaec3..87942c7a1e 100644
--- a/package/go/Config.in.host
+++ b/package/go/Config.in.host
@@ -6,7 +6,7 @@ config BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
 	depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_ARCH_SUPPORTS
 	depends on (BR2_arm && BR2_TOOLCHAIN_SUPPORTS_PIE) || BR2_aarch64 \
 		|| BR2_i386 || BR2_x86_64 || BR2_powerpc64le \
-		|| BR2_mips64 || BR2_mips64el
+		|| BR2_mips64 || BR2_mips64el || BR2_s390x
 	depends on !BR2_ARM_CPU_ARMV4
 	# MIPS R6 support in Go has not yet been developed.
 	depends on !BR2_MIPS_CPU_MIPS64R6
-- 
2.26.2

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

* [Buildroot] [PATCH v4 11/12] package/makedumpfile: add support for IBM s390x and Z arch
  2020-09-17  4:07 [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support Alexander Egorenkov
                   ` (9 preceding siblings ...)
  2020-09-17  4:08 ` [Buildroot] [PATCH v4 10/12] package/go: " Alexander Egorenkov
@ 2020-09-17  4:08 ` 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
  12 siblings, 0 replies; 17+ messages in thread
From: Alexander Egorenkov @ 2020-09-17  4:08 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
---
 package/makedumpfile/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/makedumpfile/Config.in b/package/makedumpfile/Config.in
index a90ccbdf3c..e41c4641a2 100644
--- a/package/makedumpfile/Config.in
+++ b/package/makedumpfile/Config.in
@@ -4,6 +4,7 @@ config BR2_PACKAGE_MAKEDUMPFILE_ARCH_SUPPORTS
 	default y if BR2_arm || BR2_armeb
 	default y if BR2_i386 || BR2_x86_64
 	default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+	default y if BR2_s390x
 	default y if BR2_sparc64
 
 comment "makedumpfile needs a uClibc or glibc toolchain w/ wchar, dynamic library"
-- 
2.26.2

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

* [Buildroot] [PATCH v4 12/12] package/s390-tools: new package
  2020-09-17  4:07 [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support Alexander Egorenkov
                   ` (10 preceding siblings ...)
  2020-09-17  4:08 ` [Buildroot] [PATCH v4 11/12] package/makedumpfile: " Alexander Egorenkov
@ 2020-09-17  4:08 ` Alexander Egorenkov
  2020-09-24 21:42 ` [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support Yann E. MORIN
  12 siblings, 0 replies; 17+ messages in thread
From: Alexander Egorenkov @ 2020-09-17  4:08 UTC (permalink / raw)
  To: buildroot

Collection of tools for the IBM s390x and Z architectures.

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
---
 DEVELOPERS                         |  1 +
 package/Config.in                  |  1 +
 package/s390-tools/Config.in       | 13 +++++
 package/s390-tools/s390-tools.hash |  3 +
 package/s390-tools/s390-tools.mk   | 91 ++++++++++++++++++++++++++++++
 5 files changed, 109 insertions(+)
 create mode 100644 package/s390-tools/Config.in
 create mode 100644 package/s390-tools/s390-tools.hash
 create mode 100644 package/s390-tools/s390-tools.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 2c6cc45d45..ed315e80d7 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -150,6 +150,7 @@ N:	Alexander Egorenkov <egorenar@linux.ibm.com>
 F:	arch/Config.in.s390x
 F:	board/qemu/s390x/
 F:	configs/qemu_s390x_defconfig
+F:	package/s390-tools/
 
 N:	Alexander Kurz <akurz@blala.de>
 F:	package/minimodem/
diff --git a/package/Config.in b/package/Config.in
index 7783c26dc6..3907978365 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2427,6 +2427,7 @@ menu "System tools"
 	source "package/rauc/Config.in"
 	source "package/rsyslog/Config.in"
 	source "package/runc/Config.in"
+	source "package/s390-tools/Config.in"
 	source "package/s6/Config.in"
 	source "package/s6-linux-init/Config.in"
 	source "package/s6-linux-utils/Config.in"
diff --git a/package/s390-tools/Config.in b/package/s390-tools/Config.in
new file mode 100644
index 0000000000..a553b5eeab
--- /dev/null
+++ b/package/s390-tools/Config.in
@@ -0,0 +1,13 @@
+comment "s390-tools needs a glibc toolchain w/ C++, wchar, dynamic library"
+	depends on BR2_s390x
+	depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP
+
+config BR2_PACKAGE_S390_TOOLS
+	bool "s390-tools"
+	depends on BR2_s390x
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	help
+	  Tools for use with the s390 Linux kernel and device drivers.
+
+	  https://github.com/ibm-s390-tools/s390-tools
diff --git a/package/s390-tools/s390-tools.hash b/package/s390-tools/s390-tools.hash
new file mode 100644
index 0000000000..38c2431c25
--- /dev/null
+++ b/package/s390-tools/s390-tools.hash
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  02171161c3f858e413f777dac542d37328b7b882a7919cfb966ea554bb6ac0b2  s390-tools-2.14.0.tar.gz
+sha256  cca17a9a944ebec769adee4aebd805c912c357785ff2705a99ffe68563021f75  COPYING
diff --git a/package/s390-tools/s390-tools.mk b/package/s390-tools/s390-tools.mk
new file mode 100644
index 0000000000..4d4c8188fe
--- /dev/null
+++ b/package/s390-tools/s390-tools.mk
@@ -0,0 +1,91 @@
+################################################################################
+#
+# s390-tools
+#
+################################################################################
+
+S390_TOOLS_VERSION = 2.14.0
+S390_TOOLS_SITE = $(call github,ibm-s390-tools,s390-tools,v$(S390_TOOLS_VERSION))
+S390_TOOLS_LICENSE = MIT
+S390_TOOLS_LICENSE_FILES = LICENSE
+
+S390_TOOLS_MAKE_OPTS = \
+	ARCH=$(BR2_ARCH) \
+	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
+	LINK="$(TARGET_CC)" \
+	LINKXX="$(TARGET_CXX)"
+
+ifeq ($(BR2_PACKAGE_LIBCURL),y)
+S390_TOOLS_DEPENDENCIES += libcurl
+S390_TOOLS_MAKE_OPTS += HAVE_CURL=1
+else
+S390_TOOLS_MAKE_OPTS += HAVE_CURL=0
+endif
+
+ifeq ($(BR2_PACKAGE_JSON_C),y)
+S390_TOOLS_DEPENDENCIES += json-c
+S390_TOOLS_MAKE_OPTS += HAVE_JSONC=1
+else
+S390_TOOLS_MAKE_OPTS += HAVE_JSONC=0
+endif
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+S390_TOOLS_DEPENDENCIES += openssl
+S390_TOOLS_MAKE_OPTS += HAVE_OPENSSL=1
+else
+S390_TOOLS_MAKE_OPTS += HAVE_OPENSSL=0
+endif
+
+ifeq ($(BR2_PACKAGE_CRYPTSETUP),y)
+S390_TOOLS_DEPENDENCIES += cryptsetup
+S390_TOOLS_MAKE_OPTS += HAVE_CRYPTSETUP2=1
+else
+S390_TOOLS_MAKE_OPTS += HAVE_CRYPTSETUP2=0
+endif
+
+ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
+S390_TOOLS_DEPENDENCIES += libglib2
+S390_TOOLS_MAKE_OPTS += HAVE_GLIB2=1
+else
+S390_TOOLS_MAKE_OPTS += HAVE_GLIB2=0
+endif
+
+ifeq ($(BR2_PACKAGE_NCURSES),y)
+S390_TOOLS_DEPENDENCIES += ncurses
+S390_TOOLS_MAKE_OPTS += HAVE_NCURSES=1
+else
+S390_TOOLS_MAKE_OPTS += HAVE_NCURSES=0
+endif
+
+ifeq ($(BR2_PACKAGE_LIBPFM4),y)
+S390_TOOLS_DEPENDENCIES += libpfm4
+S390_TOOLS_MAKE_OPTS += HAVE_PFM=1
+else
+S390_TOOLS_MAKE_OPTS += HAVE_PFM=0
+endif
+
+ifeq ($(BR2_PACKAGE_LIBFUSE),y)
+S390_TOOLS_DEPENDENCIES += libfuse
+S390_TOOLS_MAKE_OPTS += HAVE_FUSE=1
+else
+S390_TOOLS_MAKE_OPTS += HAVE_FUSE=0
+endif
+
+ifeq ($(BR2_PACKAGE_PERL_NET_SNMP),y)
+S390_TOOLS_DEPENDENCIES += perl-net-snmp
+S390_TOOLS_MAKE_OPTS += HAVE_SNMP=1
+else
+S390_TOOLS_MAKE_OPTS += HAVE_SNMP=0
+endif
+
+define S390_TOOLS_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
+		$(S390_TOOLS_MAKE_OPTS)
+endef
+
+define S390_TOOLS_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) install \
+		$(S390_TOOLS_MAKE_OPTS) DESTDIR="$(TARGET_DIR)"
+endef
+
+$(eval $(generic-package))
-- 
2.26.2

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

* [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support
  2020-09-17  4:07 [Buildroot] [PATCH v4 00/12] IBM s390x and Z architecture support Alexander Egorenkov
                   ` (11 preceding siblings ...)
  2020-09-17  4:08 ` [Buildroot] [PATCH v4 12/12] package/s390-tools: new package Alexander Egorenkov
@ 2020-09-24 21:42 ` Yann E. MORIN
  12 siblings, 0 replies; 17+ messages in thread
From: Yann E. MORIN @ 2020-09-24 21:42 UTC (permalink / raw)
  To: buildroot

Alexander, All,

On 2020-09-17 06:07 +0200, Alexander Egorenkov spake thusly:
> This series of patches adds support for IBM s390x and Z architectures
> to buildroot.
> 
> Alexander Egorenkov (12):
>   arch: add the basic IBM s390x and Z arch support
>   toolchain: add support for the internal IBM s390x and Z toolchain
>   linux: add bzImage support for IBM s390x and Z arch
>   package/qemu: add IBM s390x and Z arch support
>   board/qemu: add IBM s390x and Z arch support
>   package/systemd: add support for IBM s390x and Z arch
>   package/cmake: add support for IBM s390x and Z arch
>   package/liburcu: add support for IBM s390x and Z arch
>   package/kexec: add support for IBM s390x and Z arch
>   package/go: add support for IBM s390x and Z arch
>   package/makedumpfile: add support for IBM s390x and Z arch
>   package/s390-tools: new package

Thanks for the sustained iterations. :-)

Ive now applied the series to master, with a few changes to some
patches; I'll individually reply to the impacted ones.

Thanks!

Regards,
Yann E. MORIN.

>  DEVELOPERS                              |  6 ++
>  Makefile                                |  1 +
>  arch/Config.in                          | 13 ++++
>  arch/Config.in.s390x                    | 34 +++++++++
>  board/qemu/s390x/post-build.sh          | 11 +++
>  board/qemu/s390x/readme.txt             |  8 +++
>  configs/qemu_s390x_defconfig            | 24 +++++++
>  linux/Config.in                         |  2 +-
>  package/Config.in                       |  1 +
>  package/cmake/Config.in                 |  3 +-
>  package/gcc/gcc.mk                      |  5 ++
>  package/go/Config.in.host               |  2 +-
>  package/kexec/Config.in                 |  2 +-
>  package/liburcu/Config.in               |  2 +-
>  package/makedumpfile/Config.in          |  1 +
>  package/qemu/Config.in.host             |  1 +
>  package/s390-tools/Config.in            | 13 ++++
>  package/s390-tools/s390-tools.hash      |  3 +
>  package/s390-tools/s390-tools.mk        | 91 +++++++++++++++++++++++++
>  package/systemd/Config.in               |  1 +
>  toolchain/toolchain-buildroot/Config.in |  6 +-
>  21 files changed, 222 insertions(+), 8 deletions(-)
>  create mode 100644 arch/Config.in.s390x
>  create mode 100755 board/qemu/s390x/post-build.sh
>  create mode 100644 board/qemu/s390x/readme.txt
>  create mode 100644 configs/qemu_s390x_defconfig
>  create mode 100644 package/s390-tools/Config.in
>  create mode 100644 package/s390-tools/s390-tools.hash
>  create mode 100644 package/s390-tools/s390-tools.mk
> 
> -- 
> 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.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v4 01/12] arch: add the basic IBM s390x and Z arch support
  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
  0 siblings, 0 replies; 17+ messages in thread
From: Yann E. MORIN @ 2020-09-24 21:44 UTC (permalink / raw)
  To: buildroot

Alexander, All,

On 2020-09-17 06:07 +0200, Alexander Egorenkov spake thusly:
> Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
> ---
[--SNIP--]
> index 0707c076e2..eb9b6007c9 100644
> --- a/arch/Config.in
> +++ b/arch/Config.in
[--SNIP--]
> @@ -457,6 +467,10 @@ if BR2_riscv
>  source "arch/Config.in.riscv"
>  endif
>  
> +if BR2_s390x
> +source "arch/Config.in.s390x"
> +endif

Here, we already have a dependency on s390x, by way of the if-block
condition, so...

> diff --git a/arch/Config.in.s390x b/arch/Config.in.s390x
> new file mode 100644
> index 0000000000..39d2f58aa9
> --- /dev/null
> +++ b/arch/Config.in.s390x
> @@ -0,0 +1,34 @@
> +
> +choice
> +	prompt "Target Architecture Variant"
> +	depends on BR2_s390x

...here we do not need the dependency on s390x, so I dropped it and
applied to master. Thanks!

Regards,
Yann E. MORIN.

> +	help
> +	  Specific CPU variant to use
> +
> +config BR2_s390x_z13
> +	bool "z13"
> +	depends on BR2_s390x
> +
> +config BR2_s390x_z14
> +	bool "z14"
> +	depends on BR2_s390x
> +
> +config BR2_s390x_z15
> +	bool "z15"
> +	depends on BR2_s390x
> +
> +endchoice
> +
> +config BR2_ARCH
> +	default "s390x"	if BR2_s390x
> +
> +config BR2_ENDIAN
> +	default "BIG"
> +
> +config BR2_GCC_TARGET_ARCH
> +	default "arch11" if BR2_s390x_z13
> +	default "arch12" if BR2_s390x_z14
> +	default "arch13" if BR2_s390x_z15
> +
> +config BR2_READELF_ARCH_NAME
> +	default "IBM S/390"	if BR2_s390x
> -- 
> 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.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v4 05/12] board/qemu: add IBM s390x and Z arch support
  2020-09-17  4:07 ` [Buildroot] [PATCH v4 05/12] board/qemu: " Alexander Egorenkov
@ 2020-09-24 21:49   ` Yann E. MORIN
  2020-09-25  5:31     ` Alexander Egorenkov
  0 siblings, 1 reply; 17+ messages in thread
From: Yann E. MORIN @ 2020-09-24 21:49 UTC (permalink / raw)
  To: buildroot

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.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v4 05/12] board/qemu: add IBM s390x and Z arch support
  2020-09-24 21:49   ` Yann E. MORIN
@ 2020-09-25  5:31     ` Alexander Egorenkov
  0 siblings, 0 replies; 17+ messages in thread
From: Alexander Egorenkov @ 2020-09-25  5:31 UTC (permalink / raw)
  To: buildroot

Hi Yann,

"Yann E. MORIN" <yann.morin.1998@free.fr> writes:

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

Tested, works great :)
Thank you very much.

Regards
Alex

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

end of thread, other threads:[~2020-09-25  5:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.