From: Colin D Bennett <colin@gibibit.com>
To: grub-devel@gnu.org
Subject: Re: Encryption Support for GRUB
Date: Wed, 6 Aug 2008 10:11:35 -0700 [thread overview]
Message-ID: <20080806101135.762ec5dd@gibibit.com> (raw)
In-Reply-To: <e34e015f6dd4b2d4798cef96b3b96755.squirrel@mail.voxel.net>
On Wed, 6 Aug 2008 11:04:16 -0500 (CDT)
"W. Michael Petullo" <mike@flyn.org> wrote:
> 1. How do I know exactly what subset of libc is available to me as a
> GRUB developer? Obviously, system calls would not be expected to work
> because the operating system has not yet been loaded, but I would
> expect libmath routines to be usable by GRUB. What about other
> libraries?
No libc is available. Only functions implemented by GRUB itself are
available. See ``kern/misc.c`` and ``include/grub/misc.h`` in the GRUB
2 source tree for implementations of the most important things that are
normally provided by libc, such as strcpy (grub_strcpy), memcmp
(grub_memcmp), etc.
link to online svn for misc.c:
http://svn.savannah.gnu.org/viewvc/trunk/grub2/kern/misc.c?revision=1774&root=grub&view=markup
GRUB implements dynamic memory allocation through grub_malloc,
grub_free, grub_realloc. See ``kern/mm.c``.
No math library is available, but I think you could create a 'math'
module in GRUB and implement the required math functions there. The
main thing is to keep the GRUB core small. It needs to fit in 32 KB, I
think.
GRUB has its own file I/O api (no stdio -- instead use grub_file_open,
grub_file_read, etc.).
If you want to see how to use the GRUB library stuff, look at some of
the built in commands such as ``commands/ls.c``, etc.
Regards,
Colin
next prev parent reply other threads:[~2008-08-06 17:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-06 16:04 Encryption Support for GRUB W. Michael Petullo
2008-08-06 17:11 ` Colin D Bennett [this message]
2008-08-06 17:37 ` Javier Martín
2008-08-06 20:01 ` Robert Millan
2008-08-06 20:23 ` Michael Gorven
2008-08-06 20:19 ` Michael Gorven
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=20080806101135.762ec5dd@gibibit.com \
--to=colin@gibibit.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.