[SLOF] [PATCH 0/4] Block write support for SCSI and virtio-block disks

Thomas Huth thuth at redhat.com
Thu Nov 10 02:43:34 AEDT 2016


GRUB2 uses a file called grubenv in the boot partition to store certain
information like which kernel should be booted the next time (see
https://www.gnu.org/software/grub/manual/html_node/Environment-block.html
for details). If the user set the "next_entry" variable here, e.g. with
the "grub2-reboot" command under Linux, the corresponding kernel should
only be booted once, so the GRUB2 bootloader has to update the grubenv
file on the boot partition to avoid that it is booted again after the next
reboot. That means GRUB2 needs write support at the firmware layer!
This patch series implements this block write support in SLOF, so that
the "grub2-reboot" command now works with SLOF as with other firmware
implementations (i.e. the grubenv file is updated after the kernel that
should be booted only once has been selected).

Thomas Huth (4):
  deblocker: Add a 'write' function
  scsi: Add SCSI block write support
  virtio: Implement block write support
  Provide "write" function in the disk-label package

 board-qemu/slof/virtio-block.fs |  8 ++++++
 lib/libvirtio/virtio-blk.c      | 24 +++++++++--------
 lib/libvirtio/virtio-blk.h      |  3 ++-
 lib/libvirtio/virtio.code       | 11 +++++++-
 lib/libvirtio/virtio.in         |  1 +
 slof/fs/packages/deblocker.fs   | 21 +++++++++++++++
 slof/fs/packages/disk-label.fs  |  5 ++++
 slof/fs/scsi-disk.fs            | 32 +++++++++++++++++++++++
 slof/fs/scsi-support.fs         | 58 +++++++++++++++++++++++++++++++++++++++++
 9 files changed, 150 insertions(+), 13 deletions(-)

-- 
1.8.3.1



More information about the SLOF mailing list