lkml.org 
[lkml]   [2001]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Making vmlinux Multiboot compliant and grub capable of loading modules at boot time. (1 Part)
Date
Hi,

On Monday 10 December 2001 02:51, Richard Todd wrote:
> On Sat, Dec 08, 2001 at 02:59:18PM +0100, Christian Koenig wrote:
> > The patch is for 2.4.14 Kernel Source, but it should patch well on other
> > Versions (at least the module loader).
>
> It patched 2.5.1-pre8 cleanly, except for a makefile. I'm running
> 2.5.1-pre8 with this patch right now.
>
> > I know that vmlinux isn't compressed and contains unused elf-sections.
>
> Just 'gzip -9 vmlinux' Grub will uncompress it for you.
> This actually makes for a smaller file than bzImage (on
> my machine, anyway).
>
> Are the unused sections taking up space at runtime?

No, its only the .note & .comment section.

objcopy -R .note -R .comment -S vmlinux mImage
gzip -9 mImage

makes a very nice & small Kernel Image.

(This will always be smaller than bzImage,
because the compression / bsetup and bootsector code isn't inside the Kernel).

> > Tell me what you thing about it.
>
> It's a cool hack! I like grub's module loading mechanism
> better than the initrd solution.

:-)

>
> Unfortunately, grub doesn't run on all supported platforms.
> And the multiboot specification isn't an accepted standard.
> (grub docs just read like it is.....)

The Module loader isn't really grub specified,
at least do you know any bootloader who works on every platform
Linux supports ?

And what's wrong with the multiboot specification ?
OK it is highly i386 Specified, but it defines the minimal things a
boot-loader should do for the kernel (multiple Kernel Modules, a commandline,
a memorymap ....).

The main problem with my patch for the moment is that the code I have copied
from insmod is really ugly.
For example obj_load.c allocates memory without freeing it after an error
(i have fixed this, but i think it's only 1 of 100 memory leaks this code
have).

This works in an elf-program quiet well, but you can't do that inside the
Kernel.

Somebody with real god knowledge off elf-object files should take a look at
this

MfG, Christian König.

I can not promise you that this patch work, but i can promise you i will
do my best to make it working. (Sorry for my poor English).
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:18    [W:0.035 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site