From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: idea: library support for grub2
Date: Sat, 04 Jul 2009 00:26:43 -0400 [thread overview]
Message-ID: <1246681603.2544.15.camel@mj> (raw)
In-Reply-To: <ca0f59980907031848w249e1f4o3c790c13648c3216@mail.gmail.com>
On Sat, 2009-07-04 at 09:48 +0800, Bean wrote:
> Hi,
>
> Library is an archive file that contains unlinked object files. We can
> use library function both statically or dynamically. In the former
> case, we link the objects together to form an executable image, in the
> later case, we load the object at runtime and resolve symbols, much
> like the modules.
>
> With library, the size of kernel can be reduced dramatically. Now, the
> kernel only contains platform specific function. To build a kernel
> image, we link the kernel and other required module, then link any
> unresolved function from the library, this way, only the function that
> are actually used is in the kernel.
What matters is the size of the linked and compressed kernel image
(core.img) and not the bare kernel (kernel.img). Yes, we can have some
savings, but I don't expect anything dramatic.
We would only gain size reduction for the code that is in the kernel,
but is not used by any module linked into the kernel image. I don't
think there will be a lot of such code. Whatever modules we link, the
image will need to output formatted strings, handle filesystems,
partitions, disks.
> As native library format of the building os could vary, we should use
> a format that's specific to grub, perhaps something similar to cpio.
The price will be a greatly increased complexity of the build system. I
think it would be better to simplify it first.
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2009-07-04 4:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-04 1:48 idea: library support for grub2 Bean
2009-07-04 4:26 ` Pavel Roskin [this message]
2009-07-04 7:04 ` Bean
2009-07-04 14:27 ` Pavel Roskin
2009-07-04 14:46 ` Bean
2009-07-04 15:59 ` Bean
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=1246681603.2544.15.camel@mj \
--to=proski@gnu.org \
--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.