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

@@ -161,7 +161,8 @@ proc build_boot_image_x86 {binaries} {
puts $fh "timeout 0"
puts $fh "default 0"
puts $fh "\ntitle Genode on Fiasco.OC"
puts $fh " kernel /fiasco/bootstrap -modaddr=0x01100000"
puts $fh " kernel /boot/bender"
puts $fh " module /fiasco/bootstrap -modaddr=0x01100000"
puts $fh " module /fiasco/fiasco $fiasco_serial_esc_arg"
puts $fh " module /fiasco/sigma0"
puts $fh " module /genode/core"
@@ -174,6 +175,7 @@ proc build_boot_image_x86 {binaries} {
install_pxe_bootloader_to_run_dir
create_iso_image_from_run_dir
create_disk_image_from_run_dir
#
# Generate pulsar config file