All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollis@penguinppc.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [Fwd: Re: [LinuxBIOS] grub2 as payload
Date: Thu, 16 Nov 2006 16:50:20 -0600	[thread overview]
Message-ID: <1163717420.26011.114.camel@basalt> (raw)
In-Reply-To: <20061116215744.GA5939@coresystems.de>

On Thu, 2006-11-16 at 22:57 +0100, Stefan Reinauer wrote:
> * Marco Gerards <mgerards@xs4all.nl> [061025 19:41]:
> > 
> > >> - add support for compiling grub2 as an elf image.
> > 
> > This is possible already.  If the ELF image has specific demands, it
> > will not be hard to make such changes.
> 
> How do I do this. Running configure and make on a checked out 
> grub2 tree leaves me with many many modules. Can you hit my head 
> to some documentation on how to do this?
> 
> * Is grub-mkimage the way to go? It produces a multiboot image, no ELF.
>   I understand the final image has to be composed from the modules.

I don't believe this is currently possible on x86. On PowerPC, the build
process creates kernel.elf and *.mod.
util/powerpc/ieee1275/grub-mkimage.c then adds the modules to the kernel
by creating a new PT_LOAD segment at a well-known address (I'd like that
address to be dynamic but don't want to try to rewrite a global in
the .data section, and linking twice sucks).

On x86, grub-mkimage creates an x86-bootable image, which of course is
not an ELF file.

> * which module contains the int13 disk code ? So I dont accidentially
>   use it.

disk/i386/pc/biosdisk.c . However, that's always built in to the core
kernel (kernel.img).

> * what modules are required to display a grub menu over a serial
>   console and boot a kernel (bzimage) and initrd from ext2? (assuming
>   there is no reiserfs driver yet)
>
>   What others do I need? Which ones dont I need?
>   - boot.mod
>   - ext2.mod
>   - elf.mod
>   - gzio.mod?
>   - (_)linux.mod
>   - normal.mod(?)
>   - pc.mod
>   - terminal.mod
>   - terminfo.mod

serial.mod

Helper modules like gzio.mod and fshelp.mod will be pulled in
automatically if needed (see moddep.lst, which is used by grub-mkimage).

You don't *need* normal.mod.

Of course you will need to provide your own disk module to replace
biosdisk.mod.

> *  What's the difference between _chain and chain?
>    multiboot and _multiboot?

This is really lame and I don't like it at all. _foo is where the real
work is done, and it's supposed to be built in to "rescue mode", i.e.
grub.img. foo is just a wrapper so you can access the same functionality
from "normal mode".

"Rescue mode" is the small image that can be loaded without needing any
modules. It includes the modules needed to load *.mod from a filesystem
on a disk, which gets you into "normal mode" with all the fancy menu and
tab-completion.

-Hollis




      reply	other threads:[~2006-11-16 22:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-25 17:13 [Fwd: Re: [LinuxBIOS] grub2 as payload [was: New wiki index page.]] Svante Signell
2006-10-25 17:41 ` [Fwd: Re: [LinuxBIOS] grub2 as payload Marco Gerards
2006-10-25 19:31   ` Tristan Gingold
2006-10-25 19:40     ` Andrei E. Warkentin
2006-10-25 23:41     ` Hollis Blanchard
2006-10-26  7:19       ` tgingold
2006-10-26 17:39     ` Stefan Reinauer
2006-11-16 21:57   ` Stefan Reinauer
2006-11-16 22:50     ` Hollis Blanchard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1163717420.26011.114.camel@basalt \
    --to=hollis@penguinppc.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.