Re: [PATCH 2.5] Retrieve configuration information from kernel

Padraig Brady (padraig.brady@corvil.com)
Wed, 30 Oct 2002 10:42:54 +0000


Khalid Aziz wrote:
> Paul Clements wrote:
>
>>Have you considered compressing the config info in order to reduce
>>the space wastage in the loaded kernel image? Could easily be 10's of KB
>>(not that that's a lot these days). The info would then be retrieved via
>>"gunzip -c", et al. instead of a simple "cat".
>
> I wanted to start with a simple implementation first. There are a couple
> of things that can be done in future to further improve meory usage: (1)
> Drop "CONFIG_" and "# CONFIG_" from each line and add it back when
> printing from /proc/ikconfig and extract-ikconfig script, (2) Compress
> the resulting configuration. Something to do in near future :)

$ wc -c /usr/src/linux-2.4/.config
38092 /usr/src/linux-2.4/.config
$ gzip -c /usr/src/linux-2.4/.config | wc -c
10305
$ sed '/^ *$/d;/^#/d;s/^CONFIG_//' /usr/src/linux-2.4/.config | wc -c
17267
$ sed '/^ *$/d;/^#/d;s/^CONFIG_//' /usr/src/linux-2.4/.config | gzip | wc -c
6155

Also it seems like it would be more useful to have the config in the
kernel image rather than (just) proc?

Pádraig.

-
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/