All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: Graeme Russ <graeme.russ@gmail.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>,
	Pierre-Nicolas Clauss <pini@tuxfamily.org>
Subject: Re: Contribution: a file loading module
Date: Sat, 25 Jun 2011 05:54:46 +0200	[thread overview]
Message-ID: <4E055C06.502@gmail.com> (raw)
In-Reply-To: <4E05578B.7070908@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

On 25.06.2011 05:35, Graeme Russ wrote:
> Hi Vladimir,
>
> On 25/06/11 13:23, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>> This is perfectly accomodated by multiboot specification. Just add a
>> small structure somewhere in the first 8K of the file and your image is
>> multiboot-compliant.
> Thanks for the advice, but I have a few questions (please excuse any that
> appear really 'newby')
>
>  - What GRUB command(s) would I use to load & run the image
multiboot+boot
>  - How do I specify where in memory the file is loaded?
It's part of this structure.
>  - Is there a 'quick and dirty' document on how to create a multiboot
>    header which GRUB can load?
>
http://bzr.savannah.gnu.org/lh/grub/trunk/multiboot/annotate/head:/doc/multiboot.texi

"Multiboot header must be contained completely within the first 8192
bytes of the OS image, and must be longword (32-bit) aligned."
In short your header should be (little-endian uint32_t):

/* magic */ 0x1BADB002,

/* flags */ 0x00010000,

/* checksum */ 0xe4514ffe,

header_offset+load_addr,
load_addr,
0,
0,
entry_addr


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

      reply	other threads:[~2011-06-25  3:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17 16:11 Contribution: a file loading module Pierre-Nicolas Clauss
2011-06-23 15:42 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-06-23 19:41   ` Pierre-Nicolas Clauss
2011-06-23 19:57     ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-06-23 21:45       ` Pierre-Nicolas Clauss
2011-06-23 22:01         ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-06-24  9:33           ` Pierre-Nicolas Clauss
2011-06-24 10:36             ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-06-24 11:31             ` Brendan Trotter
2011-06-25  2:24   ` Graeme Russ
2011-06-25  3:23     ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-06-25  3:35       ` Graeme Russ
2011-06-25  3:54         ` Vladimir 'φ-coder/phcoder' Serbinenko [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=4E055C06.502@gmail.com \
    --to=phcoder@gmail.com \
    --cc=graeme.russ@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=pini@tuxfamily.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.