[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/5] s390x: network boot

From: Cornelia Huck
Subject: [Qemu-devel] [PATCH 0/5] s390x: network boot
Date: Mon, 20 Feb 2017 15:19:38 +0100

This patchset implements network boot for s390x. You need to build
a s390-netboot.img to actually perform the work (not included).

Basically, we add support for virtio-net devices into the ipl code
and update the ccw bios to handle this as well.

For the first patch (elf loading) I'd like to get an ack.

A s390-netboot.img can be built by bundling some shell scripts, busybox
and the kexec binary bundled into an initial ramdisk and append that to
a kernel image. An existing s390 system can be used as source.

The init process can be a simple shell script that mounts a few
essential filesystems, like /dev, /proc, /sys, ..., starts a DHCP client
(busybox udchpc) and then invokes another script to do the actual
network boot.

udchpc will invoke the script /usr/share/udhcpc/default.script in
response to DHCP server messages to configure interfaces. The sample
busybox default.script can be used for that, but needs to also extract
the DHCP options like the tftp server address and pass that on to the
boot script.

The boot script itself has to retrieve the PXELINUX configuration from
the tftp server as in [1], then retrieve the remote kernel and initial
ramdisk and finally use kexec to boot the network kernel.

In a nutshell:

1. Create a skeleton initramfs directory structure
2. Create the init script, the PXE boot scripts and the DHCP default
3. Copy kexec and its dependencies from the source system into the
4. Copy virtio network and block modules from the source system into
   the initramfs
5. Copy the busybox binaries into the initramfs
6. Build the ramdisk (in compressed CPIO format)
7. Concatenate the kernel image and the initial ramdisk
8. Update the 8 bytes at location 66568 with the offset value of the
   ramdisk in the new binary, and the 8 bytes at location 66576 with the
   size of the ramdisk. Both values need to be updated in binary, big
   endian format.


Cornelia Huck (1):
  pc-bios/s390-ccw.img: rebuild image

Farhan Ali (4):
  elf-loader: Allow late loading of elf
  s390x/ipl: Extend S390IPLState to support network boot
  s390x/ipl: Load network boot image
  pc-bios/s390-ccw: Use the ccw bios to start the network boot

 hw/core/loader.c           |  17 +++++++--
 hw/s390x/ipl.c             |  87 +++++++++++++++++++++++++++++++++++++++++++++
 hw/s390x/ipl.h             |   5 ++-
 hw/s390x/s390-virtio-ccw.c |   3 +-
 hw/s390x/s390-virtio.c     |   2 ++
 hw/s390x/s390-virtio.h     |   1 +
 include/hw/elf_ops.h       |  13 ++++---
 include/hw/loader.h        |  13 ++++++-
 pc-bios/s390-ccw.img       | Bin 26392 -> 26456 bytes
 pc-bios/s390-ccw/bootmap.c |   8 ++++-
 pc-bios/s390-ccw/iplb.h    |   3 +-
 pc-bios/s390-ccw/main.c    |  20 +++++++----
 pc-bios/s390-ccw/virtio.c  |   1 +
 pc-bios/s390-ccw/virtio.h  |   1 +
 14 files changed, 157 insertions(+), 17 deletions(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]