diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2015-10-28 22:09:03 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-10-28 22:09:20 +0100 |
commit | 09cd046e6cc65ab7bf044503b6404a2ba912bf85 (patch) | |
tree | 2a42565c988b0c36798b9021af601f86a7a9dc19 /target/s390 | |
parent | 87eac2992b7dacd9c4d6e2cf7a5bb51f0bbdca15 (diff) |
qemu-system-s390: add basic support, only virtio-net does not work as expected.
Diffstat (limited to 'target/s390')
-rw-r--r-- | target/s390/Makefile | 61 | ||||
-rw-r--r-- | target/s390/kernel/qemu-s390 | 13 | ||||
-rw-r--r-- | target/s390/systems/qemu-s390 | 7 | ||||
-rw-r--r-- | target/s390/systems/toolchain-s390 | 2 |
4 files changed, 82 insertions, 1 deletions
diff --git a/target/s390/Makefile b/target/s390/Makefile index 03afae8f0..93373aaa8 100644 --- a/target/s390/Makefile +++ b/target/s390/Makefile @@ -5,3 +5,64 @@ include $(ADK_TOPDIR)/rules.mk include $(ADK_TOPDIR)/mk/kernel-build.mk include $(ADK_TOPDIR)/mk/image.mk +KERNEL:=$(LINUX_DIR)/vmlinux + +QEMU_ARGS:=-monitor null -M s390-ccw-virtio-2.4 +QEMU_ARGS+=${ADK_QEMU_ARGS} +QEMU_ARGS+=-netdev user,id=eth0 -device virtio-net-ccw,netdev=eth0 + +# target helper text +ifeq ($(ADK_TARGET_FS),archive) +targethelp: + @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)" +ifeq ($(ADK_TARGET_QEMU),y) + @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}' + @echo "Use following command to create a QEMU Image:" + @echo "./scripts/create.sh qemu-${ADK_TARGET_CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)" + @echo "Start qemu with following options:" + @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img' +endif +endif +ifeq ($(ADK_TARGET_FS),initramfs) +targethelp: + @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}' + @echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}' +ifeq ($(ADK_TARGET_QEMU),y) + @echo "Start qemu with following command line:" + @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}' +endif +endif +ifeq ($(ADK_TARGET_FS),initramfsarchive) +targethelp: + @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}' + @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)" +endif +ifeq ($(ADK_TARGET_FS),initramfspiggyback) +targethelp: + @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}' +ifeq ($(ADK_TARGET_QEMU),y) + @echo "Start qemu with following command line:" + @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)' +endif +endif + +# image creation and kernel install +kernel-strip: + $(TARGET_CROSS)objcopy $(OSTRIP) -S $(KERNEL) $(BUILD_DIR)/$(TARGET_KERNEL) + +kernel-install: kernel-strip + @cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL} + +# filesystem specific targets +ifeq ($(ADK_TARGET_FS),archive) +imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp +endif +ifeq ($(ADK_TARGET_FS),initramfs) +imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp +endif +ifeq ($(ADK_TARGET_FS),initramfsarchive) +imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp +endif +ifeq ($(ADK_TARGET_FS),initramfspiggyback) +imageinstall: createinitramfs targethelp +endif diff --git a/target/s390/kernel/qemu-s390 b/target/s390/kernel/qemu-s390 new file mode 100644 index 000000000..00a86e58b --- /dev/null +++ b/target/s390/kernel/qemu-s390 @@ -0,0 +1,13 @@ +CONFIG_S390=y +CONFIG_MARCH_Z900=y +CONFIG_TN3270=y +CONFIG_TN3270_TTY=y +CONFIG_TN3270_FS=m +CONFIG_TN3270_CONSOLE=y +CONFIG_TN3215=y +CONFIG_TN3215_CONSOLE=y +CONFIG_CCW_CONSOLE=y +CONFIG_SCLP_TTY=y +CONFIG_SCLP_CONSOLE=y +CONFIG_SCLP_VT220_TTY=y +CONFIG_SCLP_VT220_CONSOLE=y diff --git a/target/s390/systems/qemu-s390 b/target/s390/systems/qemu-s390 new file mode 100644 index 000000000..c04dfad31 --- /dev/null +++ b/target/s390/systems/qemu-s390 @@ -0,0 +1,7 @@ +config ADK_TARGET_SYSTEM_QEMU_S390 + bool "Qemu Emulator" + select ADK_CPU_Z900 + select ADK_TARGET_QEMU + help + Support for Qemu Emulator S/390 architecture. + diff --git a/target/s390/systems/toolchain-s390 b/target/s390/systems/toolchain-s390 index e1b520a83..d441dfd94 100644 --- a/target/s390/systems/toolchain-s390 +++ b/target/s390/systems/toolchain-s390 @@ -1,6 +1,6 @@ config ADK_TARGET_SYSTEM_TOOLCHAIN_S390 bool "Toolchain only" - select ADK_CPU_S390 + select ADK_CPU_Z900 select ADK_TARGET_TOOLCHAIN select ADK_TARGET_PACKAGE_TXZ help |