grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Contribution: a file loading module


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: Contribution: a file loading module
Date: Sat, 25 Jun 2011 05:54:46 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110606 Iceowl/1.0b2 Icedove/3.1.10

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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]