2003-08-02 18:36:19

by Sean Estabrooks

[permalink] [raw]
Subject: .config in bzImage ?

There was some talk of the .config file being included
within bzImage. Did this ever happen? If so, how
does one extract the .config from the resulting image?

Cheers,
Sean


2003-08-02 18:49:27

by Herbert Poetzl

[permalink] [raw]
Subject: Re: .config in bzImage ?

On Sat, Aug 02, 2003 at 02:36:12PM -0400, Sean Estabrooks wrote:
> There was some talk of the .config file being included
> within bzImage. Did this ever happen? If so, how
> does one extract the .config from the resulting image?

hmm, since ages I use for 2.4.x a small patch, which
includes the .config in the kernel image (gzipped or
bzip2ed). this information can be retrieved from the
procfs by zcat /proc/config.gz or bzcat /proc/config.bz2
respectively ...

you can get the patch for recent 2.4.x kernels from
my pages http://www.13thfloor.at/VServer/Patches.shtml
(they are 03_kconfig* in the patchsets)

for example for 2.4.22-pre10, this would be ...
http://www.13thfloor.at/VServer/patches-2.4.22-p10c17/03_kconfig-2.4.22-pre3.patch.bz2

HTH,
Herbert

> Cheers,
> Sean
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2003-08-02 19:00:57

by Diego Calleja

[permalink] [raw]
Subject: Re: .config in bzImage ?

El Sat, 2 Aug 2003 20:49:32 +0200 Herbert P?tzl <[email protected]> escribi?:

> hmm, since ages I use for 2.4.x a small patch, which
> includes the .config in the kernel image (gzipped or
> bzip2ed). this information can be retrieved from the
> procfs by zcat /proc/config.gz or bzcat /proc/config.bz2
> respectively ...


There's something in -ac tree:

x CONFIG_IKCONFIG: x
x x
x This option enables the complete Linux kernel ".config" file x
x contents, information on compiler used to build the kernel, x
x kernel running when this kernel was built and kernel version x
x from Makefile to be saved in kernel. It provides documentation x
x of which kernel options are used in a running kernel or in an x
x on-disk kernel. This information can be extracted from the kernel x
x image file with the script scripts/extract-ikconfig and used as x
x input to rebuild the current kernel or to build another kernel. x
x It can also be extracted from a running kernel by reading x
x /proc/ikconfig/config and /proc/ikconfig/built_with, if enabled. x
x /proc/ikconfig/config will list the configuration that was used x
x to build the kernel and /proc/ikconfig/built_with will list x
x information on the compiler and host machine that was used to x
x build the kernel. x

2003-08-02 19:28:50

by William Lee Irwin III

[permalink] [raw]
Subject: Re: .config in bzImage ?

On Sat, Aug 02, 2003 at 09:00:55PM +0200, Diego Calleja Garc?a wrote:
> There's something in -ac tree:
> x CONFIG_IKCONFIG:

IIRC this hit current 2.6 bk recently, which probably helps _someone_
with administration (and may very well save me some reboots to get into
kernels with known .configs).


-- wli

2003-08-02 20:21:35

by Bernd Eckenfels

[permalink] [raw]
Subject: Re: .config in bzImage ?

In article <[email protected]> you wrote:
> IIRC this hit current 2.6 bk recently, which probably helps _someone_
> with administration (and may very well save me some reboots to get into
> kernels with known .configs).

Of course you can simply place the .config along the kernel and the
System.map in /boot, too.

Greetings
Bernd
--
eckes privat - http://www.eckes.org/
Project Freefire - http://www.freefire.org/

2003-08-02 20:26:47

by William Lee Irwin III

[permalink] [raw]
Subject: Re: .config in bzImage ?

In article <[email protected]> you wrote:
>> IIRC this hit current 2.6 bk recently, which probably helps _someone_
>> with administration (and may very well save me some reboots to get into
>> kernels with known .configs).

On Sat, Aug 02, 2003 at 10:21:31PM +0200, Bernd Eckenfels wrote:
> Of course you can simply place the .config along the kernel and the
> System.map in /boot, too.

Which requires having some way to associate the running kernel to those
files.


-- wli

2003-08-02 20:56:36

by Alan

[permalink] [raw]
Subject: Re: .config in bzImage ?

On Sad, 2003-08-02 at 19:36, Sean Estabrooks wrote:
> There was some talk of the .config file being included
> within bzImage. Did this ever happen? If so, how
> does one extract the .config from the resulting image?

Randy Dunlap's ikconfig has been in 2.4-ac for a while and was just
accepted for 2.6 proper. You can embed the config for /proc, attach
it to the binary, or just say no..

2003-08-02 21:12:47

by Randy.Dunlap

[permalink] [raw]
Subject: Re: .config in bzImage ?

> There was some talk of the .config file being included
> within bzImage. Did this ever happen? If so, how
> does one extract the .config from the resulting image?

Alan sent my ikconfig patch to Linus a couple of days ago and it's
in 2.6.0-test-current ... except for the Kconfig part of it,
which Alan or I will send soon (if Alan hasn't already done so).

The full was (which is partially merged) is at
http://developer.osdl.org/rddunlap/patches/ikconfig/ikconfig_260c.patch
It includes a script (extract-ikconfig) and a small C program
(binoffsets.c) that are used to extract the saved .config image.

The .config file is also available in /proc as a CONFIG option.

~Randy



2003-08-05 06:42:31

by Denis Vlasenko

[permalink] [raw]
Subject: Re: .config in bzImage ?

On 2 August 2003 23:28, William Lee Irwin III wrote:
> In article <[email protected]> you wrote:
> >> IIRC this hit current 2.6 bk recently, which probably helps _someone_
> >> with administration (and may very well save me some reboots to get into
> >> kernels with known .configs).
>
> On Sat, Aug 02, 2003 at 10:21:31PM +0200, Bernd Eckenfels wrote:
> > Of course you can simply place the .config along the kernel and the
> > System.map in /boot, too.
>
> Which requires having some way to associate the running kernel to those
> files.

bash-2.03# ls -l /boot
drwxr-xr-x 2 root root 1024 Jan 28 2003 2.4.20
drwxr-xr-x 2 root root 1024 Nov 2 2002 2.4.20-pre11csum_t
drwxr-xr-x 2 root root 1024 Oct 30 2002 2.4.20-pre11csumtest
drwxr-xr-x 2 root root 1024 Jul 17 08:10 2.4.21
drwxr-xr-x 2 root root 1024 Jul 17 15:15 2.4.21-ep

--
vda

2003-08-05 06:44:38

by William Lee Irwin III

[permalink] [raw]
Subject: Re: .config in bzImage ?

On 2 August 2003 23:28, William Lee Irwin III wrote:
>> Which requires having some way to associate the running kernel to those
>> files.

On Tue, Aug 05, 2003 at 09:41:35AM +0300, Denis Vlasenko wrote:
> bash-2.03# ls -l /boot
> drwxr-xr-x 2 root root 1024 Jan 28 2003 2.4.20
> drwxr-xr-x 2 root root 1024 Nov 2 2002 2.4.20-pre11csum_t
> drwxr-xr-x 2 root root 1024 Oct 30 2002 2.4.20-pre11csumtest
> drwxr-xr-x 2 root root 1024 Jul 17 08:10 2.4.21
> drwxr-xr-x 2 root root 1024 Jul 17 15:15 2.4.21-ep

Insufficient. That's what I do most of the time anyway; when I got
burned it was with a batch of kernels I'd built simultaneously.


-- wli

2003-08-05 11:56:09

by Denis Vlasenko

[permalink] [raw]
Subject: Re: .config in bzImage ?

On 5 August 2003 09:45, William Lee Irwin III wrote:
> >> Which requires having some way to associate the running kernel to those
> >> files.
>
> > bash-2.03# ls -l /boot
> > drwxr-xr-x 2 root root 1024 Jan 28 2003 2.4.20
> > drwxr-xr-x 2 root root 1024 Nov 2 2002 2.4.20-pre11csum_t
> > drwxr-xr-x 2 root root 1024 Oct 30 2002 2.4.20-pre11csumtest
> > drwxr-xr-x 2 root root 1024 Jul 17 08:10 2.4.21
> > drwxr-xr-x 2 root root 1024 Jul 17 15:15 2.4.21-ep
>
> Insufficient. That's what I do most of the time anyway; when I got
> burned it was with a batch of kernels I'd built simultaneously.

I never build kernels with same names.
Whenever I change .config, I change extraversion too.
--
vda

2003-08-05 14:54:52

by Jan-Benedict Glaw

[permalink] [raw]
Subject: Re: .config in bzImage ?

On Tue, 2003-08-05 14:54:45 +0300, Denis Vlasenko <[email protected]>
wrote in message <[email protected]>:
> On 5 August 2003 09:45, William Lee Irwin III wrote:
> > Insufficient. That's what I do most of the time anyway; when I got
> > burned it was with a batch of kernels I'd built simultaneously.
>
> I never build kernels with same names.
> Whenever I change .config, I change extraversion too.

...which implies that you need to do a full recompile. Not nice on slow
machines, or if you haven't got a cross-compiler handy...

MfG, JBG

--
Jan-Benedict Glaw [email protected] . +49-172-7608481
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg
fuer einen Freien Staat voll Freier B?rger" | im Internet! | im Irak!
ret = do_actions((curr | FREE_SPEECH) & ~(IRAQ_WAR_2 | DRM | TCPA));


Attachments:
(No filename) (898.00 B)
(No filename) (189.00 B)
Download all attachments