Bootable GRUB2 disk image with ext2 partition

This provides bootable disk images for x86 platforms via

! RUN_OPT="--target disk"

The resulting disk image contains one ext2 partition with binaries from
the GRUB2 boot loader and the run scenario. The default disk size fits
all binaries, but is configurable via

! --disk-size <size in MiB>

in RUN_OPT.

The feature depends on an grub2-head.img, which is part of the commit,
but may also be generated by executing tool/create_grub2. The script
generates a disk image prepared for one partition, which contains files
for GRUB2. All image preparation steps that need superuser privileges
are conducted by this script.

The final step of writing the entire image to a disk must be executed
later by

  sudo dd if=<image file> of=<device> bs=8M conv=fsync

Fixes #1203.
This commit is contained in:
Christian Helmuth
2014-07-11 15:43:47 +02:00
committed by Norman Feske
parent f442e64eaf
commit dc2961338d
10 changed files with 147 additions and 7 deletions

View File

@@ -23,6 +23,19 @@ of Genode.
This simple tool helps to build bootable ISO images from your build of
Genode. For getting usage information, start the tool without arguments.
:'create_grub2':
This tool prepares a partitioned disk image with GRUB2 as boot
loader.
:'grub2-head.img':
This file is the head part of a partioned disk image including an
installation of GRUB2 as boot loader. GRUB2 is available from
http://www.gnu.org/software/grub/ and in major Linux distributions.
Steps to reproduce the image creation can be found in
'create_grub2'.
:'beautify':
Beautify is a coding-style checking tool that analyzes source code for its