GRUB2: Difference between revisions

From coreboot
Jump to navigation Jump to search
mNo edit summary
(→‎How to build GRUB2 as a payload: More detailed instructions.)
Line 22: Line 22:
== How to build GRUB2 as a payload ==
== How to build GRUB2 as a payload ==


  $ # build lbgrub2:
First, get a recent snapshot of the [[http://www.coreboot.org/MonotoneRepository|GRUB2 monotone repository]] ('''allpatches''' branch):
  $ # target/target_alias assume that you use i386-elf-gcc
 
  $ autogen.sh # requires ruby
  $ wget 'http://coreboot.org:8889/revision/tar/ecf047ecf5555d7bcfac613877a565777bd81517' -O grub2.tar
  $ configure --with-platform=linuxbios --prefix=$PWD/installed  
  $ tar xfv grub2.tar
  $ make && make install
$ cd ecf047ecf5555d7bcfac613877a565777bd81517
  $ $PWD/installed/bin/grub-mkimage -o core.img normal fat iso9660 ext2 pc ata memdisk lar ls cat cmp hello help serial terminal test configfile multiboot boot loopback
  $ sh autogen.sh
  $ ./configure --with-platform=linuxbios --prefix=$PWD/installed
  $ make
$ chmod 755 mkinstalldirs
$ make install
  $ $PWD/installed/bin/grub-mkimage -o core.img normal fat iso9660 pc ata memdisk lar ls cat cmp hello help serial terminal test configfile multiboot boot loopback


== How to help? ==
== How to help? ==


Contact [mailto:stepan@coresystems.de Stefan Reinauer], [mailto:oxygene@coresystems.de Patrick Georgi] or the [[Mailinglist|coreboot mailing list]] for more information.
Contact [mailto:stepan@coresystems.de Stefan Reinauer], [mailto:oxygene@coresystems.de Patrick Georgi] or the [[Mailinglist|coreboot mailing list]] for more information.

Revision as of 15:20, 1 April 2008

GRUB2 is an ideal payload for coreboot. It's modular, extensible, supports booting off filesystems, and it has a scriptable shell. Our goal is to replace the common coreboot payload FILO with a coreboot-capable version of GRUB2.

History

Patrick Georgi has been working on GRUB2 for coreboot during the Google Summer of Code 2007. He made an original code submission on August 20th 2007. Please read GRUB2 on coreboot instructions for information on how to use it.

This work was subsequently rejected by the GRUB project, and was eventually re-implemented by Robert Millan, one of the GRUB project members. The re-implementation lacks a couple of fundamental features. From this new base, more work was done.

Status

As of the time of this writing, the official GRUB2 can not be loaded in coreboot v2 without a small patch. It works fine with coreboot v3.

TODO

  • Mainstream GRUB2's grub-mkimage needs to put the program headers right after the elf header (Fix available).
  • USB stack integration (in progress).
  • See more information in the "Porting GRUB2 to coreboot" milestone in the coreboot issue tracker.

How to build GRUB2 as a payload

First, get a recent snapshot of the [monotone repository] (allpatches branch):

$ wget 'http://coreboot.org:8889/revision/tar/ecf047ecf5555d7bcfac613877a565777bd81517' -O grub2.tar
$ tar xfv grub2.tar
$ cd ecf047ecf5555d7bcfac613877a565777bd81517
$ sh autogen.sh
$ ./configure --with-platform=linuxbios --prefix=$PWD/installed
$ make
$ chmod 755 mkinstalldirs
$ make install
$ $PWD/installed/bin/grub-mkimage -o core.img normal fat iso9660 pc ata memdisk lar ls cat cmp hello help serial terminal test configfile multiboot boot loopback

How to help?

Contact Stefan Reinauer, Patrick Georgi or the coreboot mailing list for more information.