[Top][All Lists]

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

Re: [PATCH] add a counter in grub_dprintf

From: Javier Martín
Subject: Re: [PATCH] add a counter in grub_dprintf
Date: Sat, 21 Jun 2008 16:35:07 +0200

El sáb, 21-06-2008 a las 16:19 +0200, Robert Millan escribió:
> But space in post-mbr area is precious, and if we can save a bit, it means
> less users who will run into trouble in first place.

Disclaimer: the following is just the product of brainstorming from a
mind tortured by hours of studying projective geometry. Use with care ^^

Why not modify the build system to create _two_ instances of kernel.img,
one with and another without debugging? grub_mkimage would create the
normal, smaller core.img (without dprintf) for installing and embedding;
and store a core_dbg.img in the /boot/grub folder, so that if
instrumentation is required the only thing the users needs to do is
chain that debug version of GRUB:

    grub> multiboot /boot/grub/core_dbg.img
    grub> boot

Another option would be to separate grub_dprintf into a module of its
own that could, or could not, go into core.img depending on space
pressure. We'd still need a "grub_dprintf" in the kernel, but it would
just reduce to "Is debug.mod loaded? Yes->call debug_grub_dprintf". This
would only result in a substantial reduction of kernel if grub_dprintf
is currently a big function (and I haven't even taken a look at it) with
format substitution and all. The downside is that we'd have no dprintf
at all until modules are loaded, though some logic can be hardcoded so
that debug.mod is loaded first, if present.

Attachment: signature.asc
Description: Esta parte del mensaje está firmada digitalmente

reply via email to

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