<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=GB2312">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    I am working hard at building coreboot with grub2 payload. Now  I
    can build a grub2 payload as follow:<br>
    1: Download the lastest grub2 source code.<br>
    2: ./autogen.sh<br>
        ./configure --with-platform=coreboot<br>
         make<br>
    3: Use grub-mkimage to generate a "payload.elf", detail:<br>
        ./grub-mkimage -d . -O i386-coreboot -o
    ../coreboot-v4/payload.elf <font color="#ff0000">--prefix='/boot/grub2'

    </font><br>
          memdisk cpio -m ../<font color="#ff0000">memdisk.tar</font><br>
            <br>
        Accoding the coreboot website(<a moz-do-not-send="true"
      class="moz-txt-link-freetext"
      href="http://www.coreboot.org/Talk:GRUB2">http://www.coreboot.org/Talk:GRUB2</a>),
    memdisk is a virtual disk<br>
        in grub image and it is suggested that grub.cfg is contained in
    a memdisk image. So I made <br>
        folders boot/grub2 in my work folder and add a new grub.cfg and
    some modules(such as <br>
        memdisk.mod cpio.mod ...) into the boot/grub2, then tar
    boot/grub2 to memdisk.tar(according<br>
        to the website tar can be used to build a memdisk image). <br>
    <br>
    <b>Problems:</b><br>
        1: I don't know wether grub2 can found my grub.cfg ,if I set  "
    <font color="#ff0000">--prefix='/boot/grub2'</font> " ?<br>
            On the coreboot website,a sample is  <font color="#ff0000">--prefix='(ata0)/boot/grub2'.</font>
    I think the ata0 is hard disk.<br>
            but I use the memdisk image, what should I do ?<br>
    <br>
        2: I want my grub.cfg in memdisk to load the grub.cfg from my
    hard disk. Because I have install the <br>
            ubuntu11.04 on my hard disk, a grub.cfg file should be in
    the /boot/grub. So my grub.cfg just like<br>
            this:<br>
                    search -f -s /boot/grub/grub.cfg<br>
                    configfile /boot/grub/grub.cfg <br>
             <br>
            Is this practicable?<br>
    <br>
        3: I want the gurb can boot into the grub-shell, how to ?<br>
    <br>
    BRs,<br>
    <br>
    Rock.C<br>
    <br>
  </body>
</html>