2001-10-27 18:46:54

by Riley Williams

[permalink] [raw]
Subject: [PATCH] 2.4.13 default config

Hi Alan, Linus.

The enclosed patch (against the raw 2.4.13 tree) adds a `make defconfig`
option that configures Linux with the default options obtained by simply
pressing ENTER to every prompt that comes up.

On my ix86 system and against this kernel, it produces a config that is
identical to that in arch/i386/defconfig but this is NOT true of some of
the other kernel releases.

Please apply.

Best wishes from Riley.


Attachments:
defconfig.diff (316.00 B)
make defconfig

2001-10-27 18:55:04

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH] 2.4.13 default config

Riley Williams wrote:
>
> Hi Alan, Linus.
>
> The enclosed patch (against the raw 2.4.13 tree) adds a `make defconfig`
> option that configures Linux with the default options obtained by simply
> pressing ENTER to every prompt that comes up.

If someone wishes they can simply

cp arch/$arch/defconfig .config
make oldconfig

--
Jeff Garzik | Only so many songs can be sung
Building 1024 | with two lips, two lungs, and one tongue.
MandrakeSoft | - nomeansno

2001-10-27 19:09:26

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH] 2.4.13 default config


On Sat, 27 Oct 2001, Jeff Garzik wrote:

> Riley Williams wrote:
> >
> > Hi Alan, Linus.
> >
> > The enclosed patch (against the raw 2.4.13 tree) adds a `make defconfig`
> > option that configures Linux with the default options obtained by simply
> > pressing ENTER to every prompt that comes up.
>
> If someone wishes they can simply
>
> cp arch/$arch/defconfig .config
> make oldconfig

Why not just

rm .config (if you have an old one at all)
make oldconfig

That's what I always do (or you can copy the ".config" from somewhere
else, or you can edit your old ".config" in your favourite editor and
re-doing "make oldconfig").

I never _ever_ use any "real" configurator myself. The _only_ config maker
I ever use is "make oldconfig", after having possibly edited the .config
file by hand or done something else..

Linus

2001-10-27 22:06:00

by Riley Williams

[permalink] [raw]
Subject: Re: [PATCH] 2.4.13 default config

Hi Linus.

My reason for submitting this patch was that the default configuration
SHOULD meet the following criteria:

1. It's a sane configuration.

As part of maintaining the Linux Kernel Version History web pages,
I've gone through the various kernel tarballs and checked them
out. Amongst the ix86 defaults I've seen are the following:

a. Only MSDOS file system enabled, with no networking support
of any kind.

b. SLIP enabled with no serial support.

The above is as per the arch/i386/defconfig file distributed in
the kernel release tarball. I would presume at least some of the
above would be corrected by `make oldconfig` if that was run.

2. It's a compilable configuration.

In theory, any configurable configuration will compile, but even
if we can't guarantee that, we should be able to guarantee that
the default configuration will compile.

As far as I could tell, there was no simple means to test whether
these criteria were satisfied, and this patch adds such a means.

>>> The enclosed patch (against the raw 2.4.13 tree) adds a `make
>>> defconfig` option that configures Linux with the default options
>>> obtained by simply pressing ENTER to every prompt that comes up.

>> If someone wishes they can simply
>>
>> cp arch/$arch/defconfig .config
>> make oldconfig

Curiously enough, some of the kernel releases have a DIFFERENT config
in defconfig to what's created by the routine I added. With 2.4.13
they're the same, and I don't have any of the other kernel tarballs on
any of my systems at the moment, so can't look up one that's different
right now, but I will if you wish.

> Why not just
>
> rm .config (if you have an old one at all)
> make oldconfig

Is that guaranteed to produce the default configuration? It certainly
isn't obvious that such is the case.

> That's what I always do (or you can copy the ".config" from
> somewhere else, or you can edit your old ".config" in your
> favourite editor and re-doing "make oldconfig").

> I never _ever_ use any "real" configurator myself. The _only_
> config maker I ever use is "make oldconfig", after having
> possibly edited the .config file by hand or done something else..

I have to admit that the various interactions between the options are
beyond what I can follow with a text editor, and I generally use `make
menuconfig` to configure the kernel for precicely this reason.

I will also add that in my experience, most users are in exactly the
same situation, and will either...

A. Run one of the configurators to configure the kernel, then compile
it, or

B. Try to compile it without configuring it first.

If they do the former, we want them to get a compiled kernel. If they
do the latter, do we want to present a "This kernel needs to be
configured before it can be compiled" error, or to compile using the
default configuration?

Personally, I'd opt for the latter, and set the kernel up such that if
the .config file didn't exist when `make *Image` is run, then we
simply run `make defconfig` to create it, and then regard it as being
configured as the user desired.

Another possibility would be to run `make *config` in this situation,
but the question then is which one do we run?

Best wishes from Riley.

2001-10-28 01:09:21

by Keith Owens

[permalink] [raw]
Subject: Re: [PATCH] 2.4.13 default config

On Sat, 27 Oct 2001 18:52:23 +0100 (BST),
Riley Williams <[email protected]> wrote:
>The enclosed patch (against the raw 2.4.13 tree) adds a `make defconfig`
>option that configures Linux with the default options obtained by simply
>pressing ENTER to every prompt that comes up.
>
>Please apply.

Please don't. You cannot blindly reply 'y' to all new options, it will
hang on numbers and strings, the answer has to be context sensitive.
There is already a patch for make allyes, allno, allmod and random (but
valid) configs in kbuild 2.5. That patch is context sensitive and can
easily be extended with defconfig.

2001-10-28 08:41:56

by Mark Zealey

[permalink] [raw]
Subject: Re: [PATCH] 2.4.13 default config

On Sun, Oct 28, 2001 at 12:09:26PM +1100, Keith Owens wrote:

> On Sat, 27 Oct 2001 18:52:23 +0100 (BST),
> Riley Williams <[email protected]> wrote:
> >The enclosed patch (against the raw 2.4.13 tree) adds a `make defconfig`
> >option that configures Linux with the default options obtained by simply
> >pressing ENTER to every prompt that comes up.
> >
> >Please apply.
>
> Please don't. You cannot blindly reply 'y' to all new options, it will
> hang on numbers and strings, the answer has to be context sensitive.
> There is already a patch for make allyes, allno, allmod and random (but
> valid) configs in kbuild 2.5. That patch is context sensitive and can
> easily be extended with defconfig.

Pressing enter, not 'y'. There's a difference there, 'y' says yes and enter says
to accept the default

--

Mark Zealey (aka JALH on irc.openprojects.net: #zealos and many more)
[email protected]
[email protected]

UL++++>$ G!>(GCM/GCS/GS/GM) dpu? s:-@ a16! C++++>$ P++++>+++++$ L+++>+++++$
!E---? W+++>$ N- !o? !w--- O? !M? !V? !PS !PE--@ PGP+? r++ !t---?@ !X---?
!R- b+ !tv b+ DI+ D+? G+++ e>+++++ !h++* r!-- y--

(http://www.geekcode.com)

2001-10-28 10:38:34

by Riley Williams

[permalink] [raw]
Subject: Re: [PATCH] 2.4.13 default config

Hi Keith.

>> The enclosed patch (against the raw 2.4.13 tree) adds a `make
>> defconfig` option that configures Linux with the default options
>> obtained by simply pressing ENTER to every prompt that comes up.

>> Please apply.

> Please don't. You cannot blindly reply 'y' to all new options, it
> will hang on numbers and strings, the answer has to be context
> sensitive.

Who's replying 'y' to all options? My patch answered by just pressing
ENTER to all options, as you'd've seen if you'd bothered to read it.

> There is already a patch for make allyes, allno, allmod and random
> (but valid) configs in kbuild 2.5. That patch is context sensitive
> and can easily be extended with defconfig.

What does this have to do with my patch?

Best wishes from Riley.