grub-devel
[Top][All Lists]
Advanced

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

Re: idea: library support for grub2


From: Pavel Roskin
Subject: Re: idea: library support for grub2
Date: Sat, 04 Jul 2009 00:26:43 -0400

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




reply via email to

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