From: Graeme Russ <graeme.russ@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Cc: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>,
"Pierre-Nicolas Clauss" <pini@tuxfamily.org>
Subject: Re: Contribution: a file loading module
Date: Sat, 25 Jun 2011 12:24:10 +1000 [thread overview]
Message-ID: <4E0546CA.9070704@gmail.com> (raw)
In-Reply-To: <4E035EF8.8050803@gmail.com>
On 24/06/11 01:42, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> On 17.06.2011 18:11, Pierre-Nicolas Clauss wrote:
>> Hi folks,
>>
>> I subscribed to this list in order to share with you a humble
>> contribution of mine to grub.
>>
>> As an OS developer enthusiastic, I needed to load a file to memory at
>> a given specific address.
I also have such a requirement - I am developing U-Boot for x86 systems and
I have real trouble getting documentation for the SDRAM initialisation
code. I figured I could leave that to BIOS for the time being and use GRUB
to load my U-Boot image into memory. This way, I do not have to flash the
BIOS chip until very late in the development cycle.
> While such a functionality would be a toy for loader developpers, it's
> completely useless for the end users. If the user has to know any single
> address or any single address figures in grub.cfg it's automatically a
> bad design. Also while it would be possible to write a loader in scripts
> using such kind of commands it's simply a wrong place for it. Loaders
> have to be written in C. Also people who really need such kind of
> functionality (devs) can quickly add such a kludge to the loader they
> are currently developping. As for the user the syntax has to be sth like
> loader_name <file> <args>
Well, I now have GRUB2 installed on a USB pen drive and have it run
memtestx86+. So from here I would like it to be a simple matter of copying
the U-Boot binary onto the USB pen drive and adding an entry in the
grub.cfg file - But I need the 'raw image loader' module to do this
> This allows for a much higher flexibility, portability and future-proof.
>> No command in grub 1.99 was fitting my needs (as my file as no
>> semantic known to grub: it's not a module, it's not an initrd, it's
>> not a multiboot kernel either), so I developed my own module.
>>
> What is it then? I'm willing to consider adding new loading as long as
> they are sane and make sense.
I think a command like:
exec_file file load_address [execute_address]
would fit my needs perfectly. The U-Boot images are raw (not ELF) with a
32-bit entry point at the first byte of the file but this may change (I may
put the version string at the start of the file) so the optional
execute_address could come in handy.
Regards,
Graeme
next prev parent reply other threads:[~2011-06-25 2:24 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 [this message]
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
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=4E0546CA.9070704@gmail.com \
--to=graeme.russ@gmail.com \
--cc=grub-devel@gnu.org \
--cc=phcoder@gmail.com \
--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.