From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: grub-setup: error: Non-sector-aligned data is found in the core file
Date: Sun, 18 Nov 2007 07:02:59 +0100 [thread overview]
Message-ID: <20071118060259.GA20719@thorin> (raw)
In-Reply-To: <460f92b70711110447i6f43d50n5176bbc92d08c601@mail.gmail.com>
On Sun, Nov 11, 2007 at 02:47:21PM +0200, UrJiZ wrote:
>
> I just had the first success of loading grub from an Option ROM in
> qemu. I modified ROMOS code mostly just removing the disk emulation
> system and making it a simple core.img loader (the loading is a memory
> copy + setting dl to what the user has defined + jmp 0:8200h). I can
> post this code if someone is interested.
Might be useful for us, but in that case...
> It is written in assembler,
> x86 intel syntax, compiled using nasm
If you want that code in GRUB, it needs to be converted to AT&T syntax.
> and at the moment the rom
> checksum fixing is done by the same dos tool(romchk.exe) as for romos,
Is romchk.exe free software?
> Now i have both biosdisk and ata modules in the core, and the
> dl-register-based rootdisk detection just uses fd if dl < 80h or hd if
> dl > 80h. Having the possibility of selecting an ata drive via some
> special value of dl would be great, i was thinking of F0h = ata0 ...
> FFh = ata15 (although ata15 is not yet possible, but maybe possible in
> future).
I don't understand. Isn't setting rootdisk in %dl a BIOS task? Or you
changed that?
> Also, I'm not sure of this, but it seems that the ata driver blocks
> out the hd*-devices and i understand this, but it also blocks
> fd*-devices and this is something i don't really understand, I'd
> really like to access both cdrom's and floppy disks.
ata and biosdisk can't really coexist. The block is just there to prevent
undefined results. You probably just want to only load biosdisk and discard
the ata module for now.
> And for the including of files in core.img, all i really need is a way
> to include grub.cfg in there so that my ROM grub can display a menu
> even without a root disk. I would be willing to attempt to work on
> this, but i'd like to hear some suggestions/specification of how it
> should be done (eq in what layer of grub, whether to have only
> grub.cfg possible or to be able to have an entire filesystem (will
> propably take more time for me), etc..).
My idea is to allow grub-mkimage to include an image (at least one) with
arbitrary content, which will later be dumped in memory. Then make sure
the runtime module loader won't attempt to treat it as a module, and find
a way to locate it in memory.
At that point, it's as simple as writing a disk/ driver that just maps
accesses to that memory region.
Then of course, the image would normally contain a filesystem, with anything
grub might need (grub.cfg, unifont.pff, ...).
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
next prev parent reply other threads:[~2007-11-18 6:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 17:24 grub-setup: error: Non-sector-aligned data is found in the core file UrJiZ
2007-11-07 20:24 ` Robert Millan
2007-11-08 12:36 ` UrJiZ
2007-11-08 21:19 ` Robert Millan
2007-11-10 16:22 ` Marco Gerards
2007-11-11 12:47 ` UrJiZ
2007-11-18 6:02 ` Robert Millan [this message]
2007-11-18 6:10 ` Robert Millan
2007-11-18 15:04 ` UrJiZ
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=20071118060259.GA20719@thorin \
--to=rmh@aybabtu.com \
--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.