The only way (known to me) to have network in a qemu-system-s390x environment is with virtio drivers. The config of netboot-s390x-kernel-20150723 (Linux/s390 4.1.3-gentoo) is missing those: <snip 763-766> CONFIG_TUN=m # CONFIG_VETH is not set # CONFIG_VIRTIO_NET is not set # CONFIG_NLMON is not set <snap> <snip 671-674> CONFIG_SCM_BLOCK=m CONFIG_SCM_BLOCK_CLUSTER_WRITE=y # CONFIG_VIRTIO_BLK is not set # CONFIG_BLK_DEV_RBD is not set <snap> Is there any chance that the autobuilded netboot-s390x-kernel will have CONFIG_VIRTIO_NET and CONFIG_VIRTIO_BLK enabled (or as modules)?
could you give this a try and see if it works for you: https://wh0rd.org/dump/netboot-s390-20151113.tar.xz
(In reply to SpanKY from comment #1) > could you give this a try and see if it works for you: > https://wh0rd.org/dump/netboot-s390-20151113.tar.xz Network does work now, disk access still doesn't. Not surprising so: <zip> # zcat /proc/config.gz|grep VIRTIO # CONFIG_VIRTIO_BLK is not set CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_CONSOLE=y CONFIG_VIRTIO=y # CONFIG_VIRTIO_BALLOON is not set <zap> So far we need CONFIG_VIRTIO_BLK to use blockdevices with qemu on s390x. Could you please add also CONFIG_VIRTIO_BLK to kernel configuration?
(In reply to Benjamin Zimmermann from comment #2) try this one: https://wh0rd.org/dump/netboot-s390-20151116.tar.xz also how are you booting the image in qemu ? we probably want to add some automated testing to these steps so we know things work :).
(In reply to SpanKY from comment #3) Almost there, already got the device (after loading virtio-blk): <zip> # modprobe virtio-blk # ls -l /dev/vd* brw-rw---- 1 root root 254, 0 Nov 17 11:39 /dev/vda <zap> Testing the network (10.0.0.1 as gateway): <zip> # ifconfig eth0 10.0.0.10 netmask 255.255.255.0 # ping -c 1 10.0.0.1 <zap> fdisk and partx still have dependency problems: <zip> # fdisk /dev/vda fdisk: error while loading shared libraries: libfdisk.so.1: cannot open shared object file: No such file or directory # partx partx: error while loading shared libraries: libsmartcols.so.1: cannot open shared object file: No such file or directory <zap> Preparing and booting the system with minimal effort: <zip> # qemu-img create -f raw test.img 100M # sudo ip link add link enccw0.0.xxxx name macvtap0 type macvtap mode bridge # sudo ip link set macvtap0 up # sudo sh -c "qemu-system-s390x -runas qemu -enable-kvm -nographic -m 2048 -kernel netboot-s390-kernel -initrd netboot-s390-initramfs -hda test.img -net nic,model=virtio,macaddr=$(< /sys/class/net/macvtap0/address) -net tap,fd=3 3<>/dev/tap$(< /sys/class/net/macvtap0/ifindex)" <zap> Thanks for making my life easier! (:
(In reply to Benjamin Zimmermann from comment #4) i'll commit the kernel config then and close this bug once i do. the issue of dependency resolution is a bigger one and i think this code needs to be rewritten to use lddtree instead, and i'll create a new bug to track that.
(In reply to SpanKY from comment #5) Please note the bug # here for reference. I'll gladly do the testing...
(In reply to SpanKY from comment #5) missing libs turned out to be easy to hack around in the mean time: http://gitweb.gentoo.org/proj/releng.git/commit/?id=6cfbdd0570e2a35988e1a3e962e4de62c7cf147b
i've pushed the kernel config updates here: http://gitweb.gentoo.org/proj/releng.git/commit/?id=37ef518198b72c9f51c27987c97690c94046dd9b http://gitweb.gentoo.org/proj/genkernel.git/commit/?id=651bfd26e288fa7a3b21b3630bc32e1ed0db37e1