public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Automatic Configuration of a Kernel
@ 2005-09-14 22:38 Ahmad Reza Cheraghi
  2005-09-14 22:53 ` Michal Piotrowski
                   ` (2 more replies)
  0 siblings, 3 replies; 47+ messages in thread
From: Ahmad Reza Cheraghi @ 2005-09-14 22:38 UTC (permalink / raw)
  To: linux-kernel

Hi

I wrote this Framework for making a .config based on
the System Hardwares. It would be a great help if some
people would give me their opinion about it.

Regards

A.R.Cheraghi

The readme:
http://www.energyparty.de/ahmad/readme

The Kernel Patch:
www.energyparty.de/ahmad/autoconfig_0_1_patch.tgz

The sources:
http://www.energyparty.de/ahmad/autoconfig_0_1.tgz





		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-14 22:38 Ahmad Reza Cheraghi
@ 2005-09-14 22:53 ` Michal Piotrowski
  2005-09-14 23:49   ` Daniel Thaler
                     ` (2 more replies)
  2005-09-15 11:21 ` Roman Zippel
  2005-09-16  8:11 ` Coywolf Qi Hunt
  2 siblings, 3 replies; 47+ messages in thread
From: Michal Piotrowski @ 2005-09-14 22:53 UTC (permalink / raw)
  To: Ahmad Reza Cheraghi; +Cc: LKML

Hi,

On 15/09/05, Ahmad Reza Cheraghi <a_r_cheraghi@yahoo.com> wrote:
> Hi
> 
> I wrote this Framework for making a .config based on
> the System Hardwares. It would be a great help if some
> people would give me their opinion about it.
> 
> Regards

It's for new linux users? They should use distributions kernels.
It's for "power users"? They just do make menuconfig...
It's for kernel developers? They just do vi .config.

I'll try it later, but I'm a bit sceptical.

How about networking options? It can detect what protocols are needed?
Filesystems?

Regards,
Michal Piotrowski

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-14 22:53 ` Michal Piotrowski
@ 2005-09-14 23:49   ` Daniel Thaler
  2005-09-15  0:09     ` Marek W
  2005-09-15  9:12     ` Emmanuel Fleury
  2005-09-15  9:56   ` Ahmad Reza Cheraghi
  2005-09-16 17:38   ` Pavel Machek
  2 siblings, 2 replies; 47+ messages in thread
From: Daniel Thaler @ 2005-09-14 23:49 UTC (permalink / raw)
  To: michal.k.k.piotrowski; +Cc: Ahmad Reza Cheraghi, LKML

Michal Piotrowski wrote:
> Hi,
> 
> On 15/09/05, Ahmad Reza Cheraghi <a_r_cheraghi@yahoo.com> wrote:
> 
>>Hi
>>
>>I wrote this Framework for making a .config based on
>>the System Hardwares. It would be a great help if some
>>people would give me their opinion about it.
>>
>>Regards
> 
> 
> It's for new linux users? They should use distributions kernels.
> It's for "power users"? They just do make menuconfig...
> It's for kernel developers? They just do vi .config.

I like the idea.
I'm a power user and of course I can do make menuconfig, but it would be
useful when building a kernel for new hardware for example.

Currently that involves looking at dmesg output to figure out the correct
options; this would provide a nice base config to work with and reduce the
amount of effort.

Daniel

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-14 23:49   ` Daniel Thaler
@ 2005-09-15  0:09     ` Marek W
  2005-09-15  0:37       ` Hua Zhong
  2005-09-15  8:53       ` Chris White
  2005-09-15  9:12     ` Emmanuel Fleury
  1 sibling, 2 replies; 47+ messages in thread
From: Marek W @ 2005-09-15  0:09 UTC (permalink / raw)
  To: linux-kernel

On Thu, 15 Sep 2005 09:49, Daniel Thaler wrote:
> Michal Piotrowski wrote:
> > Hi,
> >
> > On 15/09/05, Ahmad Reza Cheraghi <a_r_cheraghi@yahoo.com> wrote:
> >>Hi
> >>
> >>I wrote this Framework for making a .config based on
> >>the System Hardwares. It would be a great help if some
> >>people would give me their opinion about it.
> >>
> >>Regards
> >
> > It's for new linux users? They should use distributions kernels.
> > It's for "power users"? They just do make menuconfig...
> > It's for kernel developers? They just do vi .config.
>
> I like the idea.
> I'm a power user and of course I can do make menuconfig, but it would be
> useful when building a kernel for new hardware for example.
>
> Currently that involves looking at dmesg output to figure out the correct
> options; this would provide a nice base config to work with and reduce the
> amount of effort.

I second that. Unlike majority of users I suppose, I upgrade the kernel often 
and I am on the bleeding edge (laptop user with some drivers still being in 
development). Even with oldconfig it's easy to miss a useful driver 
(sometimes there's no help or the volume of new options is too large).

Something that can do the hardware detection, then maps that to drivers would 
be very useful.


--

Marek W
Send instant messages to your online friends http://au.messenger.yahoo.com 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  0:09     ` Marek W
@ 2005-09-15  0:37       ` Hua Zhong
  2005-09-15  2:03         ` David Lang
  2005-09-15  8:53       ` Chris White
  1 sibling, 1 reply; 47+ messages in thread
From: Hua Zhong @ 2005-09-15  0:37 UTC (permalink / raw)
  To: marekw1977; +Cc: linux-kernel

I concur.

There seems to be a trend that discourages normal users from running
kernel.org kernels, but I rarely find myself agree with such mind set.
Do we want more people to test vanilla kernels or not?

On 9/14/05, Marek W <marekw1977@yahoo.com.au> wrote:
> On Thu, 15 Sep 2005 09:49, Daniel Thaler wrote:
> > Michal Piotrowski wrote:
> > > Hi,
> > >
> > > On 15/09/05, Ahmad Reza Cheraghi <a_r_cheraghi@yahoo.com> wrote:
> > >>Hi
> > >>
> > >>I wrote this Framework for making a .config based on
> > >>the System Hardwares. It would be a great help if some
> > >>people would give me their opinion about it.
> > >>
> > >>Regards
> > >
> > > It's for new linux users? They should use distributions kernels.
> > > It's for "power users"? They just do make menuconfig...
> > > It's for kernel developers? They just do vi .config.
> >
> > I like the idea.
> > I'm a power user and of course I can do make menuconfig, but it would be
> > useful when building a kernel for new hardware for example.
> >
> > Currently that involves looking at dmesg output to figure out the correct
> > options; this would provide a nice base config to work with and reduce the
> > amount of effort.
> 
> I second that. Unlike majority of users I suppose, I upgrade the kernel often
> and I am on the bleeding edge (laptop user with some drivers still being in
> development). Even with oldconfig it's easy to miss a useful driver
> (sometimes there's no help or the volume of new options is too large).
> 
> Something that can do the hardware detection, then maps that to drivers would
> be very useful.
> 
> 
> --
> 
> Marek W
> Send instant messages to your online friends http://au.messenger.yahoo.com
> 
> -
> 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/
>

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  0:37       ` Hua Zhong
@ 2005-09-15  2:03         ` David Lang
  2005-09-15  3:04           ` Lee Revell
  0 siblings, 1 reply; 47+ messages in thread
From: David Lang @ 2005-09-15  2:03 UTC (permalink / raw)
  To: Hua Zhong; +Cc: marekw1977, linux-kernel

another advantage of having an auto-config for the kernel is that people 
who are experimenting may have the auto-config find hardware that they 
didn't realize they had (or they didn't realize that support had been 
added)

I know that most of my kernels don't have support for everything the 
motherboards have on them (mostly I don't care much about the other 
features, but in some cases they weren't supported, or weren't worth the 
hassle of figureing the correct config for when I started, and I've never 
gone back to try and figure it out)

and while I'm not a kernel hacker, I've been compiling my own kernels 
since about '94 so I'm not exactly a newbe :-)

David Lang

  On Wed, 14 Sep 2005, Hua Zhong wrote:

> Date: Wed, 14 Sep 2005 17:37:41 -0700
> From: Hua Zhong <hzhong@gmail.com>
> To: marekw1977@yahoo.com.au
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: Automatic Configuration of a Kernel
> 
> I concur.
>
> There seems to be a trend that discourages normal users from running
> kernel.org kernels, but I rarely find myself agree with such mind set.
> Do we want more people to test vanilla kernels or not?
>
> On 9/14/05, Marek W <marekw1977@yahoo.com.au> wrote:
>> On Thu, 15 Sep 2005 09:49, Daniel Thaler wrote:
>>> Michal Piotrowski wrote:
>>>> Hi,
>>>>
>>>> On 15/09/05, Ahmad Reza Cheraghi <a_r_cheraghi@yahoo.com> wrote:
>>>>> Hi
>>>>>
>>>>> I wrote this Framework for making a .config based on
>>>>> the System Hardwares. It would be a great help if some
>>>>> people would give me their opinion about it.
>>>>>
>>>>> Regards
>>>>
>>>> It's for new linux users? They should use distributions kernels.
>>>> It's for "power users"? They just do make menuconfig...
>>>> It's for kernel developers? They just do vi .config.
>>>
>>> I like the idea.
>>> I'm a power user and of course I can do make menuconfig, but it would be
>>> useful when building a kernel for new hardware for example.
>>>
>>> Currently that involves looking at dmesg output to figure out the correct
>>> options; this would provide a nice base config to work with and reduce the
>>> amount of effort.
>>
>> I second that. Unlike majority of users I suppose, I upgrade the kernel often
>> and I am on the bleeding edge (laptop user with some drivers still being in
>> development). Even with oldconfig it's easy to miss a useful driver
>> (sometimes there's no help or the volume of new options is too large).
>>
>> Something that can do the hardware detection, then maps that to drivers would
>> be very useful.
>>
>>
>> --
>>
>> Marek W
>> Send instant messages to your online friends http://au.messenger.yahoo.com
>>
>> -
>> 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/
>>
> -
> 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/
>

-- 
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
  -- C.A.R. Hoare

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  2:03         ` David Lang
@ 2005-09-15  3:04           ` Lee Revell
  2005-09-15  3:37             ` Daniel Thaler
                               ` (2 more replies)
  0 siblings, 3 replies; 47+ messages in thread
From: Lee Revell @ 2005-09-15  3:04 UTC (permalink / raw)
  To: David Lang; +Cc: Hua Zhong, marekw1977, linux-kernel

On Wed, 2005-09-14 at 19:03 -0700, David Lang wrote:
> another advantage of having an auto-config for the kernel is that people 
> who are experimenting may have the auto-config find hardware that they 
> didn't realize they had (or they didn't realize that support had been 
> added)
> 
> I know that most of my kernels don't have support for everything the 
> motherboards have on them (mostly I don't care much about the other 
> features, but in some cases they weren't supported, or weren't worth the 
> hassle of figureing the correct config for when I started, and I've never 
> gone back to try and figure it out)

Why does this have to be in the kernel again?  Isn't this exactly what
you get with a fully modular config and hotplug?

Lee


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  3:04           ` Lee Revell
@ 2005-09-15  3:37             ` Daniel Thaler
  2005-09-15  4:16               ` Lee Revell
  2005-09-15 20:58               ` Ahmad Reza Cheraghi
  2005-09-15  4:18             ` Marek W
  2005-09-15 10:26             ` David Lang
  2 siblings, 2 replies; 47+ messages in thread
From: Daniel Thaler @ 2005-09-15  3:37 UTC (permalink / raw)
  To: Lee Revell; +Cc: David Lang, Hua Zhong, marekw1977, linux-kernel

Lee Revell wrote:
> Why does this have to be in the kernel again?  Isn't this exactly what
> you get with a fully modular config and hotplug?

It doesn't go in the kernel. If I understand correctly, it's a script that is 
invoked by 'make autoconfig'. Note that I didn't read the patch, because it's a 
.tgz on a website and I couldn't be bothered to download it.

Daniel

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  3:37             ` Daniel Thaler
@ 2005-09-15  4:16               ` Lee Revell
  2005-09-15  8:12                 ` Ahmad Reza Cheraghi
  2005-09-15 20:58               ` Ahmad Reza Cheraghi
  1 sibling, 1 reply; 47+ messages in thread
From: Lee Revell @ 2005-09-15  4:16 UTC (permalink / raw)
  To: Daniel Thaler; +Cc: David Lang, Hua Zhong, marekw1977, linux-kernel

On Thu, 2005-09-15 at 05:37 +0200, Daniel Thaler wrote:
> Lee Revell wrote:
> > Why does this have to be in the kernel again?  Isn't this exactly what
> > you get with a fully modular config and hotplug?
> 
> It doesn't go in the kernel. If I understand correctly, it's a script that is 
> invoked by 'make autoconfig'. Note that I didn't read the patch, because it's a 
> .tgz on a website and I couldn't be bothered to download it.

Oh, sorry.  Then read that as "what's the point"?

Lee


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  3:04           ` Lee Revell
  2005-09-15  3:37             ` Daniel Thaler
@ 2005-09-15  4:18             ` Marek W
  2005-09-15  6:18               ` Valdis.Kletnieks
  2005-09-15 10:26             ` David Lang
  2 siblings, 1 reply; 47+ messages in thread
From: Marek W @ 2005-09-15  4:18 UTC (permalink / raw)
  To: linux-kernel

On Thu, 15 Sep 2005 13:04, Lee Revell wrote:
> On Wed, 2005-09-14 at 19:03 -0700, David Lang wrote:
> > another advantage of having an auto-config for the kernel is that people
> > who are experimenting may have the auto-config find hardware that they
> > didn't realize they had (or they didn't realize that support had been
> > added)
> >
> > I know that most of my kernels don't have support for everything the
> > motherboards have on them (mostly I don't care much about the other
> > features, but in some cases they weren't supported, or weren't worth the
> > hassle of figureing the correct config for when I started, and I've never
> > gone back to try and figure it out)
>
> Why does this have to be in the kernel again?  Isn't this exactly what
> you get with a fully modular config and hotplug?

Not so much the kernel. When compiling the kernel I'd prefer not to waste time 
and space compiling the 100+ modules I will never ever use on my laptop. I'd 
prefer for something to select the modules necessary for my hardware. I can't 
afford the time to keep up to date with that's new and what isn't, what has 
changed, what has been superseded, which module works with which device, 
chipset even, etc...


-- 
-
Marek W

--
2b | !2b
Send instant messages to your online friends http://au.messenger.yahoo.com 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  4:18             ` Marek W
@ 2005-09-15  6:18               ` Valdis.Kletnieks
  2005-09-15  7:33                 ` Marek W
  2005-09-15 10:44                 ` David Lang
  0 siblings, 2 replies; 47+ messages in thread
From: Valdis.Kletnieks @ 2005-09-15  6:18 UTC (permalink / raw)
  To: marekw1977; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1629 bytes --]

On Thu, 15 Sep 2005 14:18:13 +1000, Marek W said:

> Not so much the kernel. When compiling the kernel I'd prefer not to waste time 
> and space compiling the 100+ modules I will never ever use on my laptop.

It's actually  a lot worse than that - here's my minimized custom kernel that
drives everything on my laptop and then some, and a recent Fedora kernel:

[/lib/modules]2 find 2.6.13-mm1/kernel/drivers -name '*.ko' | wc -l
37
[/lib/modules]2 find 2.6.12-1.1400_FC5/kernel/drivers/ -name '*.ko' | wc -l
832

(OK, so I *do* have a few builtins that Fedora builds as modules. That's gonna
change the numbers by half a dozen or so...)

>                                                                          I'd
> prefer for something to select the modules necessary for my hardware. I can't 
> afford the time to keep up to date with that's new and what isn't, what has 
> changed, what has been superseded, which module works with which device, 
> chipset even, etc...

I'm of the opinion that if you don't have that much time, you should be using a
distro kernel where somebody *else* is taking the time.  If you're the type
that builds their own kernel, the *last* thing you want is a tool glossing over
the fact that a module has been superceded.  Who's going to take care of the
matching changes for /etc/modprobe.conf and similar userspace changes, and
other stuff like that? (I figure if 'make oldconfig' asks a question, I should
take notice, and any userspace changes that don't get made are my fault - and
if 'make oldconfig' switches drivers on me without asking, that's a *bug* that
lkml will hear about.. ;)


[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  6:18               ` Valdis.Kletnieks
@ 2005-09-15  7:33                 ` Marek W
  2005-09-15  9:48                   ` Ahmad Reza Cheraghi
  2005-09-15 10:44                 ` David Lang
  1 sibling, 1 reply; 47+ messages in thread
From: Marek W @ 2005-09-15  7:33 UTC (permalink / raw)
  To: linux-kernel

On Thu, 15 Sep 2005 16:18, Valdis.Kletnieks@vt.edu wrote:

Wasn't I being optimistic :) but hey, it's good to see that many modules.

> > I'd prefer for something to select the modules necessary for my hardware.
> > I can't afford the time to keep up to date with that's new and what
> > isn't, what has changed, what has been superseded, which module works
> > with which device, chipset even, etc...
>
> I'm of the opinion that if you don't have that much time, you should be
> using a distro kernel where somebody *else* is taking the time.  If you're
> the type that builds their own kernel, the *last* thing you want is a tool
> glossing over the fact that a module has been superceded.  Who's going to
> take care of the matching changes for /etc/modprobe.conf and similar
> userspace changes, and other stuff like that? (I figure if 'make oldconfig'
> asks a question, I should take notice, and any userspace changes that don't
> get made are my fault - and if 'make oldconfig' switches drivers on me
> without asking, that's a *bug* that lkml will hear about.. ;)

This is exactly why I switched to Gentoo and use gentoo-sources kernel.

However, keep in mind that when I do 'make oldconfig', more often then now the 
help on new options is insufficient to make a decision on whether or not 
something should be included.

Secondly, I'd love to know exactly what sort of hardware is inside my laptop, 
but funnily enough I find out the chipsets and vendors by running lspci.


-- 
-
Marek W

--
2b | !2b
Send instant messages to your online friends http://au.messenger.yahoo.com 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  8:53       ` Chris White
@ 2005-09-15  7:58         ` Ahmad Reza Cheraghi
  0 siblings, 0 replies; 47+ messages in thread
From: Ahmad Reza Cheraghi @ 2005-09-15  7:58 UTC (permalink / raw)
  To: chriswhite, marekw1977; +Cc: linux-kernel



> > Something that can do the hardware detection, then
> maps that to drivers
> > would be very useful.
> 
> well, in theory this works as well.  If you do this
> in the kernel source 

> directory:
> 
> make allmodconfig
> 
> that makes a kernel with all possible configure
> options that can be built as 
> modules enabled.
> 
> make install
> 
> and you have a couple of nice files in
> /lib/modules/(version)/modules.*map
> 
> -rw-r--r--  1 root root    73 Sep 14 23:15
> modules.ieee1394map
> -rw-r--r--  1 root root   132 Sep 14 23:15
> modules.inputmap
> -rw-r--r--  1 root root    81 Sep 14 23:15
> modules.isapnpmap
> -rw-r--r--  1 root root  7834 Sep 14 23:15
> modules.pcimap
> -rw-r--r--  1 root root    43 Sep 14 23:15
> modules.seriomap
> -rw-r--r--  1 root root 80010 Sep 14 23:15
> modules.usbmap
> 
> the usual favorite of mine is modules.pcimap, which,
> when compined with lspci 
> can give you the proper module for your pci device. 
> Granted it has the fault 
> of a) how to figure out the configure option. 
> Sometimes it's CONFIG_[name], 
> sometimes it's not (grepping maybe?)

For that reason I thought the best way is: using the
option-name given out, by make menuconfig or make
config... And you can even easily upgraded it if the
option-name(for the same Hardware) is changed by a new
Kernel. By only putting this new option-name in the
rules_list with the same rule.   

 b) sometimes
> two drivers do the same 
> thing, but if enabled together will cause kittens to
> cry and babies to pull 
> flowers.  Therein lies one of the main issues.  I'm
> going to assume by seeing 
> the rules_file bit that you address it in that way. 
> However, seeing the 
> development model of the kernel, trying to keep that
> updated may get a little 
> weird.  

Yes your right. The idea(eventhuogh it is a dream) is
that, this Framework might be hopefully in the future,
a part of the Kernel. So it can be updated everytime
before a new Kernel will be releases. 

> My 1.5 $denomination
> Chris White
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  4:16               ` Lee Revell
@ 2005-09-15  8:12                 ` Ahmad Reza Cheraghi
  2005-09-15 11:20                   ` Masoud Sharbiani
  0 siblings, 1 reply; 47+ messages in thread
From: Ahmad Reza Cheraghi @ 2005-09-15  8:12 UTC (permalink / raw)
  To: Lee Revell, Daniel Thaler; +Cc: David Lang, Hua Zhong, marekw1977, linux-kernel



--- Lee Revell <rlrevell@joe-job.com> wrote:

> On Thu, 2005-09-15 at 05:37 +0200, Daniel Thaler
> wrote:
> > Lee Revell wrote:
> > > Why does this have to be in the kernel again? 
> Isn't this exactly what
> > > you get with a fully modular config and hotplug?
> > 
> > It doesn't go in the kernel. If I understand
> correctly, it's a script that is 
> > invoked by 'make autoconfig'. Note that I didn't
> read the patch, because it's a 
> > .tgz on a website and I couldn't be bothered to
> download it.
> 
> Oh, sorry.  Then read that as "what's the point"?
> 
> Lee
> 
It does go in the Kernel. The files are all kept in
the directory <KERNEL>/scripts/kconfig/.
And I changed a little bit the Makefile and the conf.c
in the <KERNEl>/scrips/kconfig. 




		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  0:09     ` Marek W
  2005-09-15  0:37       ` Hua Zhong
@ 2005-09-15  8:53       ` Chris White
  2005-09-15  7:58         ` Ahmad Reza Cheraghi
  1 sibling, 1 reply; 47+ messages in thread
From: Chris White @ 2005-09-15  8:53 UTC (permalink / raw)
  To: marekw1977; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1888 bytes --]

On Thursday 15 September 2005 09:09, Marek W wrote:
> On Thu, 15 Sep 2005 09:49, Daniel Thaler wrote:
> > Michal Piotrowski wrote:
> > > Hi,
> > >
> > > On 15/09/05, Ahmad Reza Cheraghi <a_r_cheraghi@yahoo.com> wrote:
> > >>Hi
> > >>
> > >>I wrote this Framework for making a .config based on
> > >>the System Hardwares. It would be a great help if some
> > >>people would give me their opinion about it.

[tons of snipping]

> Something that can do the hardware detection, then maps that to drivers
> would be very useful.

well, in theory this works as well.  If you do this in the kernel source 
directory:

make allmodconfig

that makes a kernel with all possible configure options that can be built as 
modules enabled.

make install

and you have a couple of nice files in /lib/modules/(version)/modules.*map

-rw-r--r--  1 root root    73 Sep 14 23:15 modules.ieee1394map
-rw-r--r--  1 root root   132 Sep 14 23:15 modules.inputmap
-rw-r--r--  1 root root    81 Sep 14 23:15 modules.isapnpmap
-rw-r--r--  1 root root  7834 Sep 14 23:15 modules.pcimap
-rw-r--r--  1 root root    43 Sep 14 23:15 modules.seriomap
-rw-r--r--  1 root root 80010 Sep 14 23:15 modules.usbmap

the usual favorite of mine is modules.pcimap, which, when compined with lspci 
can give you the proper module for your pci device.  Granted it has the fault 
of a) how to figure out the configure option.  Sometimes it's CONFIG_[name], 
sometimes it's not (grepping maybe?) b) sometimes two drivers do the same 
thing, but if enabled together will cause kittens to cry and babies to pull 
flowers.  Therein lies one of the main issues.  I'm going to assume by seeing 
the rules_file bit that you address it in that way.  However, seeing the 
development model of the kernel, trying to keep that updated may get a little 
weird.  

My 1.5 $denomination
Chris White

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-14 23:49   ` Daniel Thaler
  2005-09-15  0:09     ` Marek W
@ 2005-09-15  9:12     ` Emmanuel Fleury
  1 sibling, 0 replies; 47+ messages in thread
From: Emmanuel Fleury @ 2005-09-15  9:12 UTC (permalink / raw)
  To: Linux Kernel ML

Daniel Thaler wrote:
> 
> I like the idea.
> I'm a power user and of course I can do make menuconfig, but it would be
> useful when building a kernel for new hardware for example.

I agree ! When compiling for a new platform you would like to have at
least a minimal skeleton of the .config which is working for your
machine and then add stuff like NFS, netfilter, and other stuff.

Something like:

make autoconfig ---> generate a skeleton (compile and run)
make menuconfig ---> add the stuff you want (file systems, firewall, ...)

However, if the "make autoconfig" target generate nothing but a bare
minimal .config which is fitting exactly your hardware, which would
compile and run on your platform (with a stripped down network layer,
only one file system, etc). Then I would like to have this.

> Currently that involves looking at dmesg output to figure out the correct
> options; this would provide a nice base config to work with and reduce the
> amount of effort.

Yes. Especially for strange platforms where you usually end-up with a
try and error methodology... (yes, I got a Transmeta Crusoe Sony Vaio
C1-MZX once ! :)).

Regards
-- 
Emmanuel Fleury

Assistant Professor          | Office: B1-201
Computer Science Department, | Phone:  +45 96 35 72 23
Aalborg University,          | Mobile: +45 26 22 98 03
Fredriks Bajersvej 7E,       | E-mail: fleury@cs.aau.dk
9220 Aalborg East, Denmark   | URL: www.cs.aau.dk/~fleury


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  7:33                 ` Marek W
@ 2005-09-15  9:48                   ` Ahmad Reza Cheraghi
  0 siblings, 0 replies; 47+ messages in thread
From: Ahmad Reza Cheraghi @ 2005-09-15  9:48 UTC (permalink / raw)
  To: marekw1977, linux-kernel



--- Marek W <marekw1977@yahoo.com.au> wrote:

> On Thu, 15 Sep 2005 16:18, Valdis.Kletnieks@vt.edu
> wrote:
> 
> Wasn't I being optimistic :) but hey, it's good to
> see that many modules.
> 
> > > I'd prefer for something to select the modules
> necessary for my hardware.
> > > I can't afford the time to keep up to date with
> that's new and what
> > > isn't, what has changed, what has been
> superseded, which module works
> > > with which device, chipset even, etc...
> >
> > I'm of the opinion that if you don't have that
> much time, you should be
> > using a distro kernel where somebody *else* is
> taking the time.  If you're
> > the type that builds their own kernel, the *last*
> thing you want is a tool
> > glossing over the fact that a module has been
> superceded.  Who's going to
> > take care of the matching changes for
> /etc/modprobe.conf and similar
> > userspace changes, and other stuff like that? (I
> figure if 'make oldconfig'
> > asks a question, I should take notice, and any
> userspace changes that don't
> > get made are my fault - and if 'make oldconfig'
> switches drivers on me
> > without asking, that's a *bug* that lkml will hear
> about.. ;)
> 
> This is exactly why I switched to Gentoo and use
> gentoo-sources kernel.
>
As far as I know uses Gentoo the configuration that
will be on the live-Cd. So 
1. they might be alot of not needed modules 
2. Some Hardware might be undetected.

> However, keep in mind that when I do 'make
> oldconfig', more often then now the 
> help on new options is insufficient to make a
> decision on whether or not 
> something should be included.
> 
> Secondly, I'd love to know exactly what sort of
> hardware is inside my laptop, 
> but funnily enough I find out the chipsets and
> vendors by running lspci.

The good thing about lspci (comparing to the others
Hardware detection like kudzu or discovery) it not
only uses the /proc files for getting the Hardware
information it also grabs its information directly
from the I/O of the Hardwares. But it lacks of getting
alls the Hardwares e.g. CD-Rom, floppy... 
It would be great if there is a Programm that gets all
the Hardware information directyl from the I/O
independent from the Kernel-installation.    


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-14 22:53 ` Michal Piotrowski
  2005-09-14 23:49   ` Daniel Thaler
@ 2005-09-15  9:56   ` Ahmad Reza Cheraghi
  2005-09-16  4:02     ` Chris White
  2005-09-16 17:38   ` Pavel Machek
  2 siblings, 1 reply; 47+ messages in thread
From: Ahmad Reza Cheraghi @ 2005-09-15  9:56 UTC (permalink / raw)
  To: michal.k.k.piotrowski; +Cc: LKML



--- Michal Piotrowski
<michal.k.k.piotrowski@gmail.com> wrote:

> Hi,
> 
> On 15/09/05, Ahmad Reza Cheraghi
> <a_r_cheraghi@yahoo.com> wrote:
> > Hi
> > 
> > I wrote this Framework for making a .config based
> on
> > the System Hardwares. It would be a great help if
> some
> > people would give me their opinion about it.
> > 
> > Regards
> 
> It's for new linux users? They should use
> distributions kernels.
> It's for "power users"? They just do make
> menuconfig...
> It's for kernel developers? They just do vi .config.
> 
> I'll try it later, but I'm a bit sceptical.
> 
> How about networking options? It can detect what
> protocols are needed?
> Filesystems?

The Network option or the Filesystes are choosen as a
Standard. So it will be there without checking if they
needed or not. Because I think Protocols like TCP-IP
or Filesystems like NTFS or expt2 has to be installed
on the now days Systems. But if they are any
suggestion or ideas of detecting those thing. No
problem just send me rule that does that and I will
updated easily on the Framework.Thats the benefit of
this Framework.;-)

> Regards,
> Michal Piotrowski
> 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  3:04           ` Lee Revell
  2005-09-15  3:37             ` Daniel Thaler
  2005-09-15  4:18             ` Marek W
@ 2005-09-15 10:26             ` David Lang
  2005-09-15 14:58               ` Nix
  2 siblings, 1 reply; 47+ messages in thread
From: David Lang @ 2005-09-15 10:26 UTC (permalink / raw)
  To: Lee Revell; +Cc: Hua Zhong, marekw1977, linux-kernel

On Wed, 14 Sep 2005, Lee Revell wrote:

> On Wed, 2005-09-14 at 19:03 -0700, David Lang wrote:
>> another advantage of having an auto-config for the kernel is that people
>> who are experimenting may have the auto-config find hardware that they
>> didn't realize they had (or they didn't realize that support had been
>> added)
>>
>> I know that most of my kernels don't have support for everything the
>> motherboards have on them (mostly I don't care much about the other
>> features, but in some cases they weren't supported, or weren't worth the
>> hassle of figureing the correct config for when I started, and I've never
>> gone back to try and figure it out)
>
> Why does this have to be in the kernel again?  Isn't this exactly what
> you get with a fully modular config and hotplug?

I happen to be one of those crazy people who believe that there are 
advantages to building non-modular kernels.

1. they compile faster

2. they use less memory (if tightly configured) as each module loaded will 
average a 1/2 page of wasted memory

3. it's far easier to moveone file around then a file and a directory tree 
of modules

4. the non-modular kernel will be slightly faster (all calls to modules 
must be far calls, if it's not modular the compiler can optimize some of 
the calls)

5. once kmem and mem can be made read-only there is a security advantage 
in not having kernel modules available (yes the machine can be rebooted 
into a new kernel, but that's easier to detect then a module getting 
loaded)

6. the kernel takes less space on disk (matters in embedded devices and 
other places where your media is small)

none of this matters if you're dealing with a large desktop system that 
you are installing from a series of CD/DVD disks from a top-5 distro, but 
that's not the entire world

note that a good autodetect routine will have no impact on the kernel once 
it's compiled, it just generates a .config file.

I believe it makes more sense to have this be part of the kernel source 
distro then a seperate project as it needs to have a lot of knowledge 
about what a particular kernel supports and that's going to change from 
release to release.

David Lang

-- 
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
  -- C.A.R. Hoare

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  6:18               ` Valdis.Kletnieks
  2005-09-15  7:33                 ` Marek W
@ 2005-09-15 10:44                 ` David Lang
  1 sibling, 0 replies; 47+ messages in thread
From: David Lang @ 2005-09-15 10:44 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: marekw1977, linux-kernel

On Thu, 15 Sep 2005 Valdis.Kletnieks@vt.edu wrote:

> On Thu, 15 Sep 2005 14:18:13 +1000, Marek W said:
>
>> Not so much the kernel. When compiling the kernel I'd prefer not to waste time
>> and space compiling the 100+ modules I will never ever use on my laptop.
>
> It's actually  a lot worse than that - here's my minimized custom kernel that
> drives everything on my laptop and then some, and a recent Fedora kernel:
>
> [/lib/modules]2 find 2.6.13-mm1/kernel/drivers -name '*.ko' | wc -l
> 37
> [/lib/modules]2 find 2.6.12-1.1400_FC5/kernel/drivers/ -name '*.ko' | wc -l
> 832
>
> (OK, so I *do* have a few builtins that Fedora builds as modules. That's gonna
> change the numbers by half a dozen or so...)
>
>>                                                                          I'd
>> prefer for something to select the modules necessary for my hardware. I can't
>> afford the time to keep up to date with that's new and what isn't, what has
>> changed, what has been superseded, which module works with which device,
>> chipset even, etc...
>
> I'm of the opinion that if you don't have that much time, you should be using a
> distro kernel where somebody *else* is taking the time.  If you're the type
> that builds their own kernel, the *last* thing you want is a tool glossing over
> the fact that a module has been superceded.  Who's going to take care of the
> matching changes for /etc/modprobe.conf and similar userspace changes, and
> other stuff like that? (I figure if 'make oldconfig' asks a question, I should
> take notice, and any userspace changes that don't get made are my fault - and
> if 'make oldconfig' switches drivers on me without asking, that's a *bug* that
> lkml will hear about.. ;)

sometimes tracking down exactly what options need to be enabled to let you 
at other options that apply to your system can be quite a chore, a tool to 
start from no .config file and get you one that is tailered to your system 
could be useful.

I agree that make oldconfig shouldn't do this type of thing, but that 
requires that youhave an existing .config for the box. if you do a make 
autoconfig you are explicitly asking the software to do this for you.

David Lang


-- 
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
  -- C.A.R. Hoare

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  8:12                 ` Ahmad Reza Cheraghi
@ 2005-09-15 11:20                   ` Masoud Sharbiani
  0 siblings, 0 replies; 47+ messages in thread
From: Masoud Sharbiani @ 2005-09-15 11:20 UTC (permalink / raw)
  To: Ahmad Reza Cheraghi
  Cc: Lee Revell, Daniel Thaler, David Lang, Hua Zhong, marekw1977,
	linux-kernel

On Thu, Sep 15, 2005 at 01:12:14AM -0700, Ahmad Reza Cheraghi wrote:
> 
> 
> --- Lee Revell <rlrevell@joe-job.com> wrote:
> 
> > On Thu, 2005-09-15 at 05:37 +0200, Daniel Thaler
> > wrote:
> > > Lee Revell wrote:
> > > > Why does this have to be in the kernel again? 
> > Isn't this exactly what
> > > > you get with a fully modular config and hotplug?
> > > 
> > > It doesn't go in the kernel. If I understand
> > correctly, it's a script that is 
> > > invoked by 'make autoconfig'. Note that I didn't
> > read the patch, because it's a 
> > > .tgz on a website and I couldn't be bothered to
> > download it.
> > 
> > Oh, sorry.  Then read that as "what's the point"?
> > 
> > Lee
> > 
> It does go in the Kernel. The files are all kept in
> the directory <KERNEL>/scripts/kconfig/.
> And I changed a little bit the Makefile and the conf.c
> in the <KERNEl>/scrips/kconfig. 
> 
> 
OK, What he meant was: "Make it a as patch to, say, 2.6.14-rc1 and distribute it so that people can download and apply more easily, compared to a bigger tarbala"
cheers,
Masoud

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-14 22:38 Ahmad Reza Cheraghi
  2005-09-14 22:53 ` Michal Piotrowski
@ 2005-09-15 11:21 ` Roman Zippel
  2005-09-15 12:01   ` Emmanuel Fleury
  2005-09-16  8:11 ` Coywolf Qi Hunt
  2 siblings, 1 reply; 47+ messages in thread
From: Roman Zippel @ 2005-09-15 11:21 UTC (permalink / raw)
  To: Ahmad Reza Cheraghi; +Cc: linux-kernel

Hi,

On Wed, 14 Sep 2005, Ahmad Reza Cheraghi wrote:

> I wrote this Framework for making a .config based on
> the System Hardwares. It would be a great help if some
> people would give me their opinion about it.

How interested are you in finishing this project?
I'm asking because the major part is still ahead of you and I'm not sure 
how much further you want to take it take it beyond your university 
project.

The basic problem is that maintaining the bulk of autoconfig information 
in a separate file is not feasible, it would be a nightmare to maintain.
This means it would be better to integrate this information into Kconfig 
and define interface so that external program/scripts (preferably shell 
instead of perl) can use that to configure the kernel.

A simple example could look like this:

config FOO
	bool "foo"
	def_auto y

Internally this would become:

config FOO
	bool "foo" if !AUTO_CONFIG
	default y if AUTO_CONFIG

AUTO_CONFIG could also be used to ask some simple questions for things 
that can't be automatically configured and these answers can be used to 
adjust other parameters, e.g.:

config AUTO_SERVER
	bool "Configure for a server"
	depends on AUTO_CONFIG

config BAR
	bool "blah"
	def_auto AUTO_SERVER

Driver configuration might look something like this:

module foo
	tristate "foo support"

Kconfig would generate a config symbol FOO and a Makefile entry for this.
Autoconfiguration could now either look like this:

module foo
	pci_map VENDOR DEVICE [...]

or we just an option and extract the data from the source:

module foo 
	option pci

In either case Kconfig would feed this data an to external program which 
matches it with the existing data and returns the matching config symbols 
(the matching process would be pretty much like what hotplug already 
does).

As you can see a proper integration would require a bit of work, I can 
help with Kconfig related parts, but it needs integration into several 
systems. The end result would be much more useful. Instead of maintaining 
another file, the data is shared and automatically updated by the relevant 
system.

bye, Roman

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15 11:21 ` Roman Zippel
@ 2005-09-15 12:01   ` Emmanuel Fleury
  2005-09-15 13:02     ` Ahmad Reza Cheraghi
                       ` (2 more replies)
  0 siblings, 3 replies; 47+ messages in thread
From: Emmanuel Fleury @ 2005-09-15 12:01 UTC (permalink / raw)
  Cc: linux-kernel

Hi,

Roman Zippel wrote:
> 
> The basic problem is that maintaining the bulk of autoconfig information 
> in a separate file is not feasible, it would be a nightmare to maintain.
> This means it would be better to integrate this information into Kconfig 
> and define interface so that external program/scripts (preferably shell 
> instead of perl) can use that to configure the kernel.
> 
> A simple example could look like this:
> 
> config FOO
> 	bool "foo"
> 	def_auto y

Why not directly having a direct reference to the name of the script ?

config FOO
	bool "foo"
	auto "detect-foo-script"

Where you have a specific directory in scripts/autoconfig/ where you
store the scripts. Each script output y, n or m.

But, it means a hell of scripts (except if we can pass arguments in the
auto field: auto "detect-foo-script card-XYZ release-32-or-higher").

This scheme seems much simpler to me (and yet not restrictive at all).
Of course, each script might have to ask few questions to the user as:
Do you want this FOO support ? [y/m/n]:

Or (when no module option):
Do you want this FOO support ? [y/n]:

When the feature is not detected or no field "auto" is found, the
feature is simply skipped silently.

I think this way is minimizing the foot print on the code and yet is
quite powerful. Moreover, you can add the auto-detection scripts without
interfering with the rest of the building system. The target autoconfig
will just be more and more efficient as long as more scripts are added.

Regards
-- 
Emmanuel Fleury

Assistant Professor          | Office: B1-201
Computer Science Department, | Phone:  +45 96 35 72 23
Aalborg University,          | Mobile: +45 26 22 98 03
Fredriks Bajersvej 7E,       | E-mail: fleury@cs.aau.dk
9220 Aalborg East, Denmark   | URL: www.cs.aau.dk/~fleury

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15 12:01   ` Emmanuel Fleury
@ 2005-09-15 13:02     ` Ahmad Reza Cheraghi
  2005-09-15 13:28       ` Emmanuel Fleury
  2005-09-15 13:03     ` Ahmad Reza Cheraghi
  2005-09-17  1:27     ` Roman Zippel
  2 siblings, 1 reply; 47+ messages in thread
From: Ahmad Reza Cheraghi @ 2005-09-15 13:02 UTC (permalink / raw)
  To: Emmanuel Fleury; +Cc: linux-kernel



--- Emmanuel Fleury <fleury@cs.aau.dk> wrote:

> Hi,
> 
> Roman Zippel wrote:
> > 
> > The basic problem is that maintaining the bulk of
> autoconfig information 
> > in a separate file is not feasible, it would be a
> nightmare to maintain.
> > This means it would be better to integrate this
> information into Kconfig 
> > and define interface so that external
> program/scripts (preferably shell 
> > instead of perl) can use that to configure the
> kernel.
> > 
> > A simple example could look like this:
> > 
> > config FOO
> > 	bool "foo"
> > 	def_auto y
> 
> Why not directly having a direct reference to the
> name of the script ?
> 
> config FOO
> 	bool "foo"
> 	auto "detect-foo-script"
> 
> Where you have a specific directory in
> scripts/autoconfig/ where you
> store the scripts. Each script output y, n or m.
> 
> But, it means a hell of scripts (except if we can
> pass arguments in the
> auto field: auto "detect-foo-script card-XYZ
> release-32-or-higher").

To pass argument it is not a problem we do it like we
passed the rules in the rules_list(see the function
exec_rule in auto_conf.c ). The lex parser has to be
expanded in that way that it gives everything written
after "auto" to the autoconfig.

 config FOO
 	bool "foo"
 	auto "detect-foo-script" 

So the new programm will work like that:

It goes through are the Kconfig as usual. For any
Option that doesn't have any "auto" a '\n' will be
given. If there is an "auto" it will execute the
script that is written after it. I think it might work
like that. Any suggestion?? 




> This scheme seems much simpler to me (and yet not
> restrictive at all).
> Of course, each script might have to ask few
> questions to the user as:
> Do you want this FOO support ? [y/m/n]:
> 
> Or (when no module option):
> Do you want this FOO support ? [y/n]:

If the script want to ask some question, what will be
the difference if we write make config.



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15 12:01   ` Emmanuel Fleury
  2005-09-15 13:02     ` Ahmad Reza Cheraghi
@ 2005-09-15 13:03     ` Ahmad Reza Cheraghi
  2005-09-17  1:27     ` Roman Zippel
  2 siblings, 0 replies; 47+ messages in thread
From: Ahmad Reza Cheraghi @ 2005-09-15 13:03 UTC (permalink / raw)
  To: Emmanuel Fleury; +Cc: linux-kernel



--- Emmanuel Fleury <fleury@cs.aau.dk> wrote:

> Hi,
> 
> Roman Zippel wrote:
> > 
> > The basic problem is that maintaining the bulk of
> autoconfig information 
> > in a separate file is not feasible, it would be a
> nightmare to maintain.
> > This means it would be better to integrate this
> information into Kconfig 
> > and define interface so that external
> program/scripts (preferably shell 
> > instead of perl) can use that to configure the
> kernel.
> > 
> > A simple example could look like this:
> > 
> > config FOO
> > 	bool "foo"
> > 	def_auto y
> 
> Why not directly having a direct reference to the
> name of the script ?
> 
> config FOO
> 	bool "foo"
> 	auto "detect-foo-script"
> 
> Where you have a specific directory in
> scripts/autoconfig/ where you
> store the scripts. Each script output y, n or m.
> 
> But, it means a hell of scripts (except if we can
> pass arguments in the
> auto field: auto "detect-foo-script card-XYZ
> release-32-or-higher").


To pass argument it is not a problem we do it like we
passed the rules in the rules_list(see the function
exec_rule in auto_conf.c ). The lex parser has to be
expanded in that way that it gives everything written
after "auto" to the autoconfig.

 config FOO
 	bool "foo"
 	auto "detect-foo-script" 

So the new programm will work like that:

It goes through are the Kconfig as usual. For any
Option that doesn't have any "auto" a '\n' will be
given. If there is an "auto" it will execute the
script that is written after it. I think it might work
like that. Any suggestion?? 





> This scheme seems much simpler to me (and yet not
> restrictive at all).
> Of course, each script might have to ask few
> questions to the user as:
> Do you want this FOO support ? [y/m/n]:
> 
> Or (when no module option):
> Do you want this FOO support ? [y/n]:

If the script want to ask some question, what will be
the difference if we write make config.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15 13:02     ` Ahmad Reza Cheraghi
@ 2005-09-15 13:28       ` Emmanuel Fleury
  0 siblings, 0 replies; 47+ messages in thread
From: Emmanuel Fleury @ 2005-09-15 13:28 UTC (permalink / raw)
  To: Linux Kernel ML

Ahmad Reza Cheraghi wrote:
> 
> If the script want to ask some question, what will be
> the difference if we write make config.

The main difference will be that the options without "auto" flag
or where the script said "n" will be skipped.

It will reduce quite considerably the number of questions.

The algorithm is quite simple:

If (no "auto" field) ---> go for the default

If ("auto" field) --->
	script gives n  --->  go for "n"
	script gives y  --->  ask for [y/n]
	script gives y/m -->  ask for [y/m/n]

That's all folks...

Regards
-- 
Emmanuel Fleury

Assistant Professor          | Office: B1-201
Computer Science Department, | Phone:  +45 96 35 72 23
Aalborg University,          | Mobile: +45 26 22 98 03
Fredriks Bajersvej 7E,       | E-mail: fleury@cs.aau.dk
9220 Aalborg East, Denmark   | URL: www.cs.aau.dk/~fleury

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15 10:26             ` David Lang
@ 2005-09-15 14:58               ` Nix
  2005-09-15 17:08                 ` David Lang
  2005-09-15 20:36                 ` Valdis.Kletnieks
  0 siblings, 2 replies; 47+ messages in thread
From: Nix @ 2005-09-15 14:58 UTC (permalink / raw)
  To: David Lang; +Cc: Lee Revell, Hua Zhong, marekw1977, linux-kernel

On 15 Sep 2005, David Lang yowled:
> 5. once kmem and mem can be made read-only there is a security
> advantage in not having kernel modules available (yes the machine can
> be rebooted into a new kernel, but that's easier to detect then a
> module getting loaded)

Here, have a small patch (against 2.6.12.x, but easily forward-portable)
that eliminates that advantage:

diff -durN linux-2.6.12.1-seal-orig/include/linux/kernel.h linux-2.6.12.1-seal/include/linux/kernel.h
--- linux-2.6.12.1-seal-orig/include/linux/kernel.h	2005-06-27 19:28:54.000000000 +0100
+++ linux-2.6.12.1-seal/include/linux/kernel.h	2005-06-27 22:21:48.000000000 +0100
@@ -165,6 +165,9 @@
 extern int tainted;
 extern const char *print_tainted(void);
 extern void add_taint(unsigned);
+#ifdef CONFIG_MODULE_SEAL
+extern int module_seal;
+#endif
 
 /* Values used for system_state */
 extern enum system_states {
diff -durN linux-2.6.12.1-seal-orig/include/linux/sysctl.h linux-2.6.12.1-seal/include/linux/sysctl.h
--- linux-2.6.12.1-seal-orig/include/linux/sysctl.h	2005-06-27 19:28:57.000000000 +0100
+++ linux-2.6.12.1-seal/include/linux/sysctl.h	2005-06-27 22:26:12.000000000 +0100
@@ -136,6 +136,7 @@
 	KERN_UNKNOWN_NMI_PANIC=66, /* int: unknown nmi panic flag */
 	KERN_BOOTLOADER_TYPE=67, /* int: boot loader type */
 	KERN_RANDOMIZE=68, /* int: randomize virtual address space */
+	KERN_MODULE_SEAL=69,	/* int: module loading forbidden */
 };
 
 
@@ -801,6 +802,8 @@
 			 void __user *, size_t *, loff_t *);
 extern int proc_dointvec_bset(ctl_table *, int, struct file *,
 			      void __user *, size_t *, loff_t *);
+extern int proc_dointvec_seal(ctl_table *table, int write, struct file *filp,
+			      void __user *buffer, size_t *lenp, loff_t *ppos);
 extern int proc_dointvec_minmax(ctl_table *, int, struct file *,
 				void __user *, size_t *, loff_t *);
 extern int proc_dointvec_jiffies(ctl_table *, int, struct file *,
diff -durN linux-2.6.12.1-seal-orig/init/Kconfig linux-2.6.12.1-seal/init/Kconfig
--- linux-2.6.12.1-seal-orig/init/Kconfig	2005-06-27 19:28:59.000000000 +0100
+++ linux-2.6.12.1-seal/init/Kconfig	2005-06-27 22:21:49.000000000 +0100
@@ -463,6 +463,16 @@
 	  the version).  With this option, such a "srcversion" field
 	  will be created for all modules.  If unsure, say N.
 
+config MODULE_SEAL
+	bool "Module sealing support"
+	depends on MODULES && PROC_FS
+	help
+	  This option provides a file /proc/sys/kernel/module_seal,
+	  initially containing the value 0. If it is set to a non-zero
+	  value, all module loading and unloading will be prohibited
+	  until the next reboot: further changes to the flag will be
+	  ignored.
+
 config KMOD
 	bool "Automatic kernel module loading"
 	depends on MODULES
diff -durN linux-2.6.12.1-seal-orig/kernel/module.c linux-2.6.12.1-seal/kernel/module.c
--- linux-2.6.12.1-seal-orig/kernel/module.c	2005-06-27 19:28:59.000000000 +0100
+++ linux-2.6.12.1-seal/kernel/module.c	2005-06-27 22:21:49.000000000 +0100
@@ -49,6 +49,10 @@
 #define ARCH_SHF_SMALL 0
 #endif
 
+#ifdef CONFIG_MODULE_SEAL
+int module_seal = 0;
+#endif
+
 /* If this is set, the section belongs in the init part of the module */
 #define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG-1))
 
@@ -1765,6 +1769,12 @@
 	if (!capable(CAP_SYS_MODULE))
 		return -EPERM;
 
+#ifdef CONFIG_MODULE_SEAL
+	/* Must not be sealed */
+	if (module_seal)
+		return -EPERM;
+#endif
+
 	/* Only one module load at a time, please */
 	if (down_interruptible(&module_mutex) != 0)
 		return -EINTR;
diff -durN linux-2.6.12.1-seal-orig/kernel/sysctl.c linux-2.6.12.1-seal/kernel/sysctl.c
--- linux-2.6.12.1-seal-orig/kernel/sysctl.c	2005-06-27 19:29:00.000000000 +0100
+++ linux-2.6.12.1-seal/kernel/sysctl.c	2005-06-27 22:21:49.000000000 +0100
@@ -589,6 +589,16 @@
 		.mode		= 0644,
 		.proc_handler	= &proc_dointvec,
 	},
+#ifdef CONFIG_MODULE_SEAL
+        {
+		.ctl_name	= KERN_MODULE_SEAL,
+		.procname	= "module_seal",
+		.data		= &module_seal,
+		.maxlen		= sizeof(int),
+		.mode		= 0600,
+		.proc_handler	= &proc_dointvec_seal,
+	},
+#endif
 	{
 		.ctl_name	= KERN_PRINTK_RATELIMIT,
 		.procname	= "printk_ratelimit",
@@ -1663,6 +1673,22 @@
 				do_proc_dointvec_bset_conv,&op);
 }
 
+#ifdef CONFIG_MODULE_SEAL
+/*
+ *	You can't change the seal unless it's zero.
+ */
+
+int proc_dointvec_seal(ctl_table *table, int write, struct file *filp,
+		       void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+	if (module_seal != 0) {
+		return -EPERM;
+	}
+
+	return do_proc_dointvec(table,write,filp,buffer,lenp,ppos,NULL,NULL);
+}
+#endif
+
 struct do_proc_dointvec_minmax_conv_param {
 	int *min;
 	int *max;


-- 
`One cannot, after all, be expected to read every single word
 of a book whose author one wishes to insult.' --- Richard Dawkins

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15 14:58               ` Nix
@ 2005-09-15 17:08                 ` David Lang
  2005-09-15 20:36                 ` Valdis.Kletnieks
  1 sibling, 0 replies; 47+ messages in thread
From: David Lang @ 2005-09-15 17:08 UTC (permalink / raw)
  To: Nix; +Cc: Lee Revell, Hua Zhong, marekw1977, linux-kernel

On Thu, 15 Sep 2005, Nix wrote:

> On 15 Sep 2005, David Lang yowled:
>> 5. once kmem and mem can be made read-only there is a security
>> advantage in not having kernel modules available (yes the machine can
>> be rebooted into a new kernel, but that's easier to detect then a
>> module getting loaded)
>
> Here, have a small patch (against 2.6.12.x, but easily forward-portable)
> that eliminates that advantage:

it's still easier to say 'don't use modules' then it is to make sure you 
wait until the right time to seal the modules (remember that the current 
hotplug is asyncronous so you don't have any good way to know that it's 
finished detecting everything and loading all the modules it will need to)

David Lang

> diff -durN linux-2.6.12.1-seal-orig/include/linux/kernel.h linux-2.6.12.1-seal/include/linux/kernel.h
> --- linux-2.6.12.1-seal-orig/include/linux/kernel.h	2005-06-27 19:28:54.000000000 +0100
> +++ linux-2.6.12.1-seal/include/linux/kernel.h	2005-06-27 22:21:48.000000000 +0100
> @@ -165,6 +165,9 @@
> extern int tainted;
> extern const char *print_tainted(void);
> extern void add_taint(unsigned);
> +#ifdef CONFIG_MODULE_SEAL
> +extern int module_seal;
> +#endif
>
> /* Values used for system_state */
> extern enum system_states {
> diff -durN linux-2.6.12.1-seal-orig/include/linux/sysctl.h linux-2.6.12.1-seal/include/linux/sysctl.h
> --- linux-2.6.12.1-seal-orig/include/linux/sysctl.h	2005-06-27 19:28:57.000000000 +0100
> +++ linux-2.6.12.1-seal/include/linux/sysctl.h	2005-06-27 22:26:12.000000000 +0100
> @@ -136,6 +136,7 @@
> 	KERN_UNKNOWN_NMI_PANIC=66, /* int: unknown nmi panic flag */
> 	KERN_BOOTLOADER_TYPE=67, /* int: boot loader type */
> 	KERN_RANDOMIZE=68, /* int: randomize virtual address space */
> +	KERN_MODULE_SEAL=69,	/* int: module loading forbidden */
> };
>
>
> @@ -801,6 +802,8 @@
> 			 void __user *, size_t *, loff_t *);
> extern int proc_dointvec_bset(ctl_table *, int, struct file *,
> 			      void __user *, size_t *, loff_t *);
> +extern int proc_dointvec_seal(ctl_table *table, int write, struct file *filp,
> +			      void __user *buffer, size_t *lenp, loff_t *ppos);
> extern int proc_dointvec_minmax(ctl_table *, int, struct file *,
> 				void __user *, size_t *, loff_t *);
> extern int proc_dointvec_jiffies(ctl_table *, int, struct file *,
> diff -durN linux-2.6.12.1-seal-orig/init/Kconfig linux-2.6.12.1-seal/init/Kconfig
> --- linux-2.6.12.1-seal-orig/init/Kconfig	2005-06-27 19:28:59.000000000 +0100
> +++ linux-2.6.12.1-seal/init/Kconfig	2005-06-27 22:21:49.000000000 +0100
> @@ -463,6 +463,16 @@
> 	  the version).  With this option, such a "srcversion" field
> 	  will be created for all modules.  If unsure, say N.
>
> +config MODULE_SEAL
> +	bool "Module sealing support"
> +	depends on MODULES && PROC_FS
> +	help
> +	  This option provides a file /proc/sys/kernel/module_seal,
> +	  initially containing the value 0. If it is set to a non-zero
> +	  value, all module loading and unloading will be prohibited
> +	  until the next reboot: further changes to the flag will be
> +	  ignored.
> +
> config KMOD
> 	bool "Automatic kernel module loading"
> 	depends on MODULES
> diff -durN linux-2.6.12.1-seal-orig/kernel/module.c linux-2.6.12.1-seal/kernel/module.c
> --- linux-2.6.12.1-seal-orig/kernel/module.c	2005-06-27 19:28:59.000000000 +0100
> +++ linux-2.6.12.1-seal/kernel/module.c	2005-06-27 22:21:49.000000000 +0100
> @@ -49,6 +49,10 @@
> #define ARCH_SHF_SMALL 0
> #endif
>
> +#ifdef CONFIG_MODULE_SEAL
> +int module_seal = 0;
> +#endif
> +
> /* If this is set, the section belongs in the init part of the module */
> #define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG-1))
>
> @@ -1765,6 +1769,12 @@
> 	if (!capable(CAP_SYS_MODULE))
> 		return -EPERM;
>
> +#ifdef CONFIG_MODULE_SEAL
> +	/* Must not be sealed */
> +	if (module_seal)
> +		return -EPERM;
> +#endif
> +
> 	/* Only one module load at a time, please */
> 	if (down_interruptible(&module_mutex) != 0)
> 		return -EINTR;
> diff -durN linux-2.6.12.1-seal-orig/kernel/sysctl.c linux-2.6.12.1-seal/kernel/sysctl.c
> --- linux-2.6.12.1-seal-orig/kernel/sysctl.c	2005-06-27 19:29:00.000000000 +0100
> +++ linux-2.6.12.1-seal/kernel/sysctl.c	2005-06-27 22:21:49.000000000 +0100
> @@ -589,6 +589,16 @@
> 		.mode		= 0644,
> 		.proc_handler	= &proc_dointvec,
> 	},
> +#ifdef CONFIG_MODULE_SEAL
> +        {
> +		.ctl_name	= KERN_MODULE_SEAL,
> +		.procname	= "module_seal",
> +		.data		= &module_seal,
> +		.maxlen		= sizeof(int),
> +		.mode		= 0600,
> +		.proc_handler	= &proc_dointvec_seal,
> +	},
> +#endif
> 	{
> 		.ctl_name	= KERN_PRINTK_RATELIMIT,
> 		.procname	= "printk_ratelimit",
> @@ -1663,6 +1673,22 @@
> 				do_proc_dointvec_bset_conv,&op);
> }
>
> +#ifdef CONFIG_MODULE_SEAL
> +/*
> + *	You can't change the seal unless it's zero.
> + */
> +
> +int proc_dointvec_seal(ctl_table *table, int write, struct file *filp,
> +		       void __user *buffer, size_t *lenp, loff_t *ppos)
> +{
> +	if (module_seal != 0) {
> +		return -EPERM;
> +	}
> +
> +	return do_proc_dointvec(table,write,filp,buffer,lenp,ppos,NULL,NULL);
> +}
> +#endif
> +
> struct do_proc_dointvec_minmax_conv_param {
> 	int *min;
> 	int *max;
>
>
> -- 
> `One cannot, after all, be expected to read every single word
> of a book whose author one wishes to insult.' --- Richard Dawkins
>

-- 
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
  -- C.A.R. Hoare

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15 14:58               ` Nix
  2005-09-15 17:08                 ` David Lang
@ 2005-09-15 20:36                 ` Valdis.Kletnieks
  2005-09-15 20:50                   ` Nix
  1 sibling, 1 reply; 47+ messages in thread
From: Valdis.Kletnieks @ 2005-09-15 20:36 UTC (permalink / raw)
  To: Nix; +Cc: David Lang, Lee Revell, Hua Zhong, marekw1977, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 4231 bytes --]

On Thu, 15 Sep 2005 15:58:38 BST, Nix said:
> On 15 Sep 2005, David Lang yowled:
> > 5. once kmem and mem can be made read-only there is a security
> > advantage in not having kernel modules available (yes the machine can
> > be rebooted into a new kernel, but that's easier to detect then a
> > module getting loaded)
> 
> Here, have a small patch (against 2.6.12.x, but easily forward-portable)
> that eliminates that advantage:

Two comments:

1) This patch is pointless without other kernel magic to guarantee that
even root can't open /dev/kmem - either SELinux and/or the 'devmem.patch'
that's in current Fedora kernels.  There's well-known ways to do the equivalent of
an insmod even if the kernel is built with 'CONFIG_MODULES=n'.

2) Guess it's time to re-post my sysctl patch to provide a general-purpose
one-shot... (Diffed against 2.6.11-mm4, but applies cleanly to 2.6.13-mm1 as well).

--- cut here for patch

Quite often, we see re-inventions of "allow a sysctl until/unless a given
flag is set to zero/one".  The following code implements a general-purpose
one-shot facility to assist in building such "lockdown/jail" modes.

Usage: In a sysctl definition, we use something like:

int security_enable = 1;
int security_myflag = 0;

	{
	.ctl_name	= ,
	.procname	= "myflag",
	.data           = &security_myflag,
	.maxlen         = sizeof(security_myflag),
	.mode           = 0644,
	.proc_handler   = &proc_dointvec_gated,
	.extra1         = &security_enable,
	},
	{
	.ctl_name	= ,
	.procname	= "security_lock",
	.data		= &security_enable,
	.maxlen		= sizeof(security_enable),
	.mode		= 0644,
	.proc_handler	= &proc_dointvec_gated,
	.extra1		= &security_enable,
	}

Writes to myflag are allowed until a 0 is written to security_lock, at
which point both myflag and security_lock go read-only...

Signed-off-by:  <valdis.kletnieks@vt.edu>

--- linux-2.6.11-mm4/include/linux/sysctl.h.sysctl	2005-03-17 02:16:12.000000000 -0500
+++ linux-2.6.11-mm4/include/linux/sysctl.h	2005-03-17 02:17:02.000000000 -0500
@@ -798,6 +798,8 @@ extern int proc_dointvec(ctl_table *, in
 			 void __user *, size_t *, loff_t *);
 extern int proc_dointvec_bset(ctl_table *, int, struct file *,
 			      void __user *, size_t *, loff_t *);
+extern int proc_dointvec_gated(ctl_table *, int, struct file *,
+			void __user *, size_t *, loff_t *);
 extern int proc_dointvec_minmax(ctl_table *, int, struct file *,
 				void __user *, size_t *, loff_t *);
 extern int proc_dointvec_jiffies(ctl_table *, int, struct file *,
--- linux-2.6.11-mm4/kernel/sysctl.c.sysctl	2005-03-17 02:16:14.000000000 -0500
+++ linux-2.6.11-mm4/kernel/sysctl.c	2005-03-17 02:17:02.000000000 -0500
@@ -16,6 +16,7 @@
  *  Wendling.
  * The list_for_each() macro wasn't appropriate for the sysctl loop.
  *  Removed it and replaced it with older style, 03/23/00, Bill Wendling
+ * Added proc_dointvec_gated, 06/14/04, Valdis Kletnieks
  */
 
 #include <linux/config.h>
@@ -1693,6 +1694,37 @@ static int do_proc_dointvec_minmax_conv(
 }
 
 /**
+ * proc_dointvec_gated - read a vector of integers only if a specified flag
+ *		word is non-zero
+ * @table: the sysctl table
+ * @write: %TRUE if this is a write to the sysctl file
+ * @filp: the file structure
+ * @buffer: the user buffer
+ * @lenp: the size of the user buffer
+ *
+ * Reads/writes up to table->maxlen/sizeof(unsigned int) integer
+ * values from/to the user buffer, treated as an ASCII string.
+ *
+ * This is identical to proc_dointvec, except that we additionally
+ * check that the location pointed to by table->extra1 is non-zero
+ * (useful for creating a 'lockdown' sysctl that allows setting of
+ * the variable only until some specified condition is fulfilled).
+ *
+ * Returns 0 on success.
+ */
+int proc_dointvec_gated(ctl_table *table, int write, struct file *filp,
+		  void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+	int *flag = (int *) (table->extra1);
+	if (write && flag && !(*flag)) {
+		return -EPERM;
+	}
+	return do_proc_dointvec(table, write, filp, buffer, lenp, ppos,
+				do_proc_dointvec_conv, NULL);
+}
+
+
+/**
  * proc_dointvec_minmax - read a vector of integers with min/max values
  * @table: the sysctl table
  * @write: %TRUE if this is a write to the sysctl file


[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15 20:36                 ` Valdis.Kletnieks
@ 2005-09-15 20:50                   ` Nix
  0 siblings, 0 replies; 47+ messages in thread
From: Nix @ 2005-09-15 20:50 UTC (permalink / raw)
  To: Valdis.Kletnieks
  Cc: David Lang, Lee Revell, Hua Zhong, marekw1977, linux-kernel

On Thu, 15 Sep 2005, Valdis Kletnieks murmured woefully:
> 1) This patch is pointless without other kernel magic to guarantee that
> even root can't open /dev/kmem - either SELinux and/or the 'devmem.patch'
> that's in current Fedora kernels.  There's well-known ways to do the equivalent of
> an insmod even if the kernel is built with 'CONFIG_MODULES=n'.

Agreed; I use it in conjunction with a one-liner to remove CAP_RAWIO
from the capability bounding set.

> 2) Guess it's time to re-post my sysctl patch to provide a general-purpose
> one-shot... (Diffed against 2.6.11-mm4, but applies cleanly to 2.6.13-mm1 as well).

Yes, much nicer. (My goal, to get a better patch by posting my ugly one,
is achieved! ;) )

-- 
`One cannot, after all, be expected to read every single word
 of a book whose author one wishes to insult.' --- Richard Dawkins

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  3:37             ` Daniel Thaler
  2005-09-15  4:16               ` Lee Revell
@ 2005-09-15 20:58               ` Ahmad Reza Cheraghi
  2005-09-15 21:04                 ` Jesper Juhl
  1 sibling, 1 reply; 47+ messages in thread
From: Ahmad Reza Cheraghi @ 2005-09-15 20:58 UTC (permalink / raw)
  To: Daniel Thaler, Lee Revell; +Cc: David Lang, Hua Zhong, marekw1977, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 751 bytes --]

--- Daniel Thaler <thalerd@in.tum.de> wrote:

> Lee Revell wrote:
> > Why does this have to be in the kernel again? 
> Isn't this exactly what
> > you get with a fully modular config and hotplug?
> 
> It doesn't go in the kernel. If I understand
> correctly, it's a script that is 
> invoked by 'make autoconfig'. Note that I didn't
> read the patch, because it's a 
> .tgz on a website and I couldn't be bothered to
> download it.

Since im a new Bee, I didn't know that I patched
shouldnt be tgz. So here is a new patch as URL and
attachment.
The URL :
www.energyparty.de/ahmad/autoconfig.patch

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[-- Attachment #2: 1146041466-autoconfig.patch --]
[-- Type: application/octet-stream, Size: 71135 bytes --]

diff -urN linux.org/Documentation/autoconf.txt linux-2.6.13/Documentation/autoconf.txt
--- linux.org/Documentation/autoconf.txt	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/Documentation/autoconf.txt	2005-09-15 15:36:35.000000000 +0200
@@ -0,0 +1,161 @@
+
+Constist:
+********
+
+The Linux Auto-Config consist of Files, auto_conf.c, an upgraded conf.c and Makefile, a directory
+(rules) which contains a rules_list and the scripts, and a xmlparser written by Tim Hockin.
+
+
+
+
+How does it work:
+*****************
+
+The trick of all is a framworking program, that means adding binaries or scripts without 
+touching the real program. The program starts like if you are starting a  make config, but at that point 
+where it wants an input from you, the function auto_conf gets called with that option-question
+as a parameter. We are comparing this option with in a list manual-written
+Kconfig option. Each of those options in the list has its own script which will be 
+executed in parallel by accordance. For putting an option in the rules_list you need
+the Option and a script that does the work for the option and then gives a value
+to the stout. This value will be redirected through a pipe to our main program which will
+write the config-name for the option into the .config file. 
+
+
+
+
+How to add a rule:
+*******************
+
+
+The basic of the script is that it must give an answer to stdout. 
+Since the rules_list is written in xml there are some conditions for adding rules.
+To add a rule (for the specified option), you have to know first the option name
+and the name of the menu that contains it. 
+The easiest way, to do this, is to run make menuconfig, and see in which menu or submenu your option belongs to. 
+Each of those has its own XML-Tag:
+
+
+<rules>: beginnging of the list.
+
+<menu name="menu name" must_have=" number ">:
+	    Has the attribute "name" and "must_have". In attribute "name" the name of the menu should be written.
+	    Attribute "must_have" shows the min. number of option, that in a menu should be choosen for a proper Kernel. 
+	    <menu> can contains options or submenus(the same as <menu>). 
+
+<option name="option name"> rule </option>
+ 	    In the attribut name the option name should be written. And the contain of the Option Tag 
+	    is the name of rule that belongs to that option.
+
+example:
+
+<rules>
+      <menu name="Networking support" must_have="1">
+         <option name="Networking support">egrep1.pm "Network|Ethernet"</option>
+         <menu name="Networking menus">
+            <option name="Packet socket">yes1.pm</option>
+            <option name="Packet socket: mmapped IO">yes1.pm</option>
+	</menu>
+      </menu>
+</rules>
+
+
+How to make a rule
+*******************
+
+A rule can be either a script or binary or... The main job is to 
+give out an answer to stout for the actually option-question, it doesn't matter
+how.
+ 
+We have three types of answer:
+
+sym-answers:     either y, n, m or \n.
+
+string-answer:   can be maximal 128 characters
+
+option-answer: 	 By the manual configuration normally you have to type an number
+		 but a rule for an option should give out an y, if it want to be choosen. 
+		
+
+
+
+
+For example:    the option is "Networking Support"
+		the program looks in the our list (which is called rules_list)
+		to find the "Networking Support" and if this option is in there,
+		a certain script (which we call it a rule)  will be executed. 
+		In this example the script name is hw_grep1.pm which 
+		reads a given Parameter and searches for this Parameter,
+		lspci and dmesg with the help of grep. In this Case the Parameter 
+		will be "Ethernet|Network".
+		
+		hw_grep1.pm:
+
+		$found='';
+		$found=`lspci | grep "@ARGV"`;
+		if($found ne '') {
+        		print("y\n");
+		}
+		else {
+        		$found=`grep -E "@ARGV" /var/log/dmesg `;
+        		if($found ne ''){
+                		print("y\n");
+        		}
+        		else {
+		                print("n\n");
+        		}
+		}
+		1;
+
+		
+			    
+
+		
+		This script checks if there is an Ethernet or 
+		a Network card  on the target System.
+		If it is true, it gives  in this case a 'y' to stdout. 
+		And for some options there can't be any script-rules, for instance software such as FTP or TCPIP etc...,
+		those question either get answered as 'build in' or as 'module'.
+		!! the answers must always have a '\n' at the end
+
+The rule-binary should be copied in the directory <KERNELVERSION>/scripts/kconfig/rules/
+
+
+
+Messages:
+*******************
+
+When the amount of needed Options in some menus are not choosen,
+messages will be given out in the stdout, at the end of the configuration.
+Containig Name of the menus.
+
+This can be happen:
+
+1. if for some options they rules are not applied. The reason for that is for some Hardware Option there is no rule.
+
+2. if your System doesn't support the Hardware i.e. you don't have an ethernet Card.
+
+In this case either your upgrade the autoconfig with rules or your contact me. 
+
+If you are getting messages please include the following information:
+
+1. a copy of your lspci, /proc/cpuinfo and /var/log/dmesg
+
+2. a copy of your messages
+
+
+
+TO DO:
+*******************
+
+1. The Framework has to be extend for the Systems that aren't supported.
+
+2 .A way to ask for the Hardware-Devices directly from the I/O.
+ 
+
+Contact:
+*******************
+
+Suggestion and comments are welcome. 
+
+Email: Ahmad Reza Cheraghi <a_r_cheraghi@yahoo.com>
diff -urN linux.org/scripts/kconfig/auto_conf.c linux-2.6.13/scripts/kconfig/auto_conf.c
--- linux.org/scripts/kconfig/auto_conf.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/auto_conf.c	2005-09-15 15:39:40.000000000 +0200
@@ -0,0 +1,302 @@
+/**************************************************************************************
+*										      *
+*	auto_conf.c:  Framework for autogeneration a Kernel Configuration	      * 
+*									   	      *
+*	This project was done in the Niederrhein University of Applied Sciences	      *  
+*  										      *
+*	Copyright (C) 2005  Ahmad Reza Cheraghi  <a_r_cheraghi@yahoo.com>   	      *
+*	This is free software, see GNU General Public License 2 for details.	      *
+*										      *
+*										      *
+*	This Framework autogenerate a Configuration based on the given rules	      *	
+*	It does not guaranty that a Kernel can work after this generation since	      *
+*	it is in his test-stage.						      *
+*										      *
+*										      *
+*	Report errors, bugs, additions, wishes and comments to me:		      * 	
+*	<a_r_cheraghi@yahoo.com>						      *
+*										      *
+*	For futher information please refer to the README.txt			      *
+*  										      *
+*    										      *
+**************************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <sys/wait.h>
+
+#include "xmlparser.h"
+
+static struct xml_element *ret;
+signed char answerbuf[128];  
+int error_flag = 0;  
+
+static int reading_xml_tree(struct xml_element* element, const char * option);
+
+enum {
+	read_tree,
+	check_tree
+} tree_mode = read_tree;
+
+
+
+/************************************************************************
+ * 			exec_rule()					*
+ * 									*
+ * 	calls a child process, that redirect stout to the pipe		*
+ * 	and execute the rule-script throught the Unix Process		*
+ * 	system().							*
+ * 	The parent reads from the pipe, and copied in the variable	*
+ * 	answer.								*
+ ***********************************************************************/
+
+static int exec_rule(const char* rule)
+{
+	int pd[2];
+	pid_t childpid;
+	char directory[128];
+	
+ 	/* 
+	 * reading the dirctory where the rules are 
+	 */
+	strncpy(directory,"scripts/kconfig/rules/", 128);
+	
+	strcat(directory, rule);    
+	
+	pipe(pd);
+	
+	if (( childpid = fork() ) == 0) { 
+		dup2(pd[1], STDOUT_FILENO);
+
+		close(pd[0]);		     
+		close(pd[1]);		  
+	 	 /* 
+		  *  calling the rule 
+		  */ 
+		system(directory);
+		exit(0);
+	}
+	close(pd[1]);
+	/*
+	 *  waiting for the child process to complete
+	 */  
+	 while ( wait ((int *) 0) != childpid)
+			 continue; 		
+	/* 
+	 * reading from the pipe, that is the answer from the rule
+	 */
+	read( pd[0], answerbuf, 128 );
+	close(pd[0]);
+	return 0;
+}
+
+
+/************************************************************************
+* 			get_rule()					*
+* 									*
+* 	compares the option from the rules_list with the actual 	*
+* 	option, if they are the same, the rule that is containing	*
+* 	int the list will be read and give to the function exec_rule	*
+* 									*		
+* 	After that, it will be checked if the answer is positive and it	*
+* 	so and if the menu has a priority for arising the must_have	*
+* 	counter.							*
+* 									*
+***********************************************************************/
+
+static int get_rule (struct xml_element* child, const char * option)
+{
+	struct xml_prop *attribute;
+	char content[128];
+	attribute = NULL;
+	
+	attribute = get_next_attribute(child, attribute);
+	
+	if (attribute==NULL) {
+		return 0;
+	}	
+	
+	if (strcmp(get_attribute_name(attribute),"name") != 0) {
+		printf("error in rules_list by Tag <option>\n");
+		exit(1);
+	}	
+	/*
+	* comparing actual option with attribute
+	*/
+	if (( strcmp(get_attribute_value(attribute),option)) != 0) {
+		return 0;
+	}
+	
+	/*
+	* reading in the rule(script-)-namei from list
+	*/
+	strcpy(content, get_element_content(child));
+	/*
+	* executing the script
+	*/
+	exec_rule(content);
+	if (child->parent->m_h_prior == 1) { 
+		/*
+		* if answer is positive
+		*/
+		if(answerbuf[0] == 'y' && answerbuf[1] == '\n') {
+			/* 
+			* then arise the must_have
+			* counter
+			*/
+			child->parent->m_h_cnt++;
+		}
+	}
+	return 0;	
+}
+
+
+/************************************************************************
+*      			init_must_have()				*
+* 									*
+* 	if there is any must_have attribute in the <menu> tag 		*
+* 	it will be initialised, here.					*
+* 									*
+***********************************************************************/
+
+
+
+static int init_must_have(struct xml_element* child){
+
+	struct xml_prop *attribute;	
+	attribute = NULL;
+	while ( (attribute = get_next_attribute(child, attribute))) {
+		if (strcmp(get_attribute_name(attribute),"must_have") == 0) {
+			if ( child->m_h_prior != 1) { 
+				child->m_h_prior = 1;
+				if (attribute->prev) {
+					strncpy(child->option_name,
+					get_attribute_value(attribute->prev)
+					,128);
+				} else {
+					printf("error in"
+						"rules_list by Tag <menu>\n");
+					exit(1);
+				}
+				child->m_h_value = 
+					atoi(get_attribute_value(attribute));
+				child->m_h_cnt = 0;
+			}
+		}
+	}
+	return 0;				
+}
+
+
+/************************************************************************
+*      			reading_xml_tag()				*
+* 									*
+* 	This function reads the needed xml tags, they are the <option>	*
+* 	and <menu> tag.						 	*
+* 									*
+***********************************************************************/
+
+
+static int reading_xml_tag(struct xml_element* child,  const char * option)
+{
+	switch (tree_mode) {
+	case read_tree:
+		if (strcmp(get_element_name(child), "menu") == 0) {
+			init_must_have(child);
+		} else if ((strcmp(get_element_name(child), "option")) == 0) {
+			get_rule(child, option);
+		}	
+		break;
+		
+	case check_tree:
+		if (strcmp(get_element_name(child), "menu") == 0) {
+			if (child->m_h_prior==0) {
+				return 0;
+			}
+			if ((child->m_h_cnt) < (child->m_h_value) ) {
+				error_flag = 1;
+				printf("\n\n*********************error**"
+					"*******************\n");
+				printf("from %i needed options are %i" 
+					" choosen in menu \" %s \"\n"
+				, child->m_h_value,child->m_h_cnt,
+				child->option_name);
+			}	
+		}
+		break;
+	}
+	return 0;
+}
+
+
+/************************************************************************
+*      			reading_xml_tree()				*
+* 									*
+* 	the xml list is copied in struct variable, which conist of	* 
+* 	childs and nodes.						*
+* 	The reading of this variable will be done by recursive		*
+* 	 calling the raeding_xml_tree()					*
+* 									*
+***********************************************************************/
+
+
+int
+reading_xml_tree(struct xml_element* element,  const char * option)
+{
+	struct xml_element *child;	
+	child = NULL;
+	/*
+	 * Asking for a child
+	 */
+	if((child = get_first_child(element))) {
+		reading_xml_tag(child, option);
+		reading_xml_tree(child, option);
+	}
+
+	if( (child = get_next_node(element)) ) {
+		reading_xml_tag(child, option);
+		reading_xml_tree(child, option);
+	}
+	return 0;
+}
+
+
+int
+auto_conf(char *option,  char answer[128])
+{
+	static int flag = 0;
+	struct xml_buffer buffer;
+	tree_mode = read_tree;
+	answerbuf[0] = '\n';
+	answerbuf[1] = 0;
+	answerbuf[2] = 0;
+
+	if (flag == 0) {
+		buffer = load_xml_file("scripts/kconfig/rules/rules_list.xml");
+		if ( xml_parse_buffer(buffer, &ret) ) {
+			printf("error by parsing \n");
+		}
+		free(buffer.text);
+		flag = 1;
+	}
+	reading_xml_tree(ret,  option);
+	strncpy(answer,answerbuf,128);
+	printf("%s", answer);
+	return 0;
+}
+
+void must_have(void)
+{
+	tree_mode = check_tree;
+	reading_xml_tree(ret, NULL);
+	if(error_flag)
+		printf("\nIf messages are shown above it is not guarantied\n"
+			"that the Kernel will  work properly after installing\n"
+			"or your System does't support the above HW\n "
+			"for further help please refer to the Documentation/autoconf.txt\n");
+}
diff -urN linux.org/scripts/kconfig/conf.c linux-2.6.13/scripts/kconfig/conf.c
--- linux.org/scripts/kconfig/conf.c	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.13/scripts/kconfig/conf.c	2005-09-06 11:07:42.000000000 +0200
@@ -12,7 +12,8 @@
 
 #define LKC_DIRECT_LINK
 #include "lkc.h"
-
+int auto_conf(const char *option, char line[128]);
+void must_have(void);
 static void conf(struct menu *menu);
 static void check_conf(struct menu *menu);
 
@@ -24,21 +25,22 @@
 	set_yes,
 	set_mod,
 	set_no,
-	set_random
+	set_random,
+	set_auto
 } input_mode = ask_all;
 char *defconfig_file;
 
 static int indent = 1;
 static int valid_stdin = 1;
 static int conf_cnt;
-static char line[128];
+static signed char line[128];
 static struct menu *rootEntry;
 
 static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
 
-static void strip(char *str)
+static void strip(signed char *str)
 {
-	char *p = str;
+	signed char *p = str;
 	int l;
 
 	while ((isspace(*p)))
@@ -63,7 +65,7 @@
 	}
 }
 
-static void conf_askvalue(struct symbol *sym, const char *def)
+static void conf_askvalue(struct symbol *sym, const char *def, const char *option)
 {
 	enum symbol_type type = sym_get_type(sym);
 	tristate val;
@@ -80,7 +82,6 @@
 		line[1] = 0;
 		return;
 	}
-
 	switch (input_mode) {
 	case ask_new:
 	case ask_silent:
@@ -89,6 +90,24 @@
 			return;
 		}
 		check_stdin();
+	case set_auto:
+		fflush(stdout);
+		auto_conf(option, line);
+		if(line[0]=='y'){
+			if (!(sym_tristate_within_range(sym, yes))){
+				line[0] = 'm';
+				line[1] = '\n';
+				line[2] = 0;
+			}
+		}
+		if(line[0]=='m'){
+			if (!(sym_tristate_within_range(sym, mod))){
+				line[0] = 'y';
+				line[1] = '\n';
+				line[2] = 0;
+			}
+		}
+		return;
 	case ask_all:
 		fflush(stdout);
 		fgets(line, 128, stdin);
@@ -169,7 +188,7 @@
 		def = sym_get_string_value(sym);
 		if (sym_get_string_value(sym))
 			printf("[%s] ", def);
-		conf_askvalue(sym, def);
+		conf_askvalue(sym, def,  menu_get_prompt(menu));
 		switch (line[0]) {
 		case '\n':
 			break;
@@ -226,9 +245,10 @@
 		if (sym->help)
 			printf("/?");
 		printf("] ");
-		conf_askvalue(sym, sym_get_string_value(sym));
+		conf_askvalue(sym, sym_get_string_value(sym), menu_get_prompt(menu));
+		if(input_mode==set_auto)
+			line[1]=0;
 		strip(line);
-
 		switch (line[0]) {
 		case 'n':
 		case 'N':
@@ -326,6 +346,23 @@
 			if (!sym_has_value(child->sym))
 				printf(" (NEW)");
 			printf("\n");
+/***************{****************** NEW  ***********************************************/
+#if 1
+			if(input_mode==set_auto){
+                        auto_conf(menu_get_prompt(child), line);
+                        if(line[0]=='y'){
+				    sprintf(line, "%i", cnt);
+				break;
+			}
+			else {
+				line[0] = '\n';
+				line[1] = 0;
+			}	
+			}
+#endif
+/*************************************************************************************/
+
+ 
 		}
 		printf("%*schoice", indent - 1, "");
 		if (cnt == 1) {
@@ -348,6 +385,7 @@
 		case ask_all:
 			fflush(stdout);
 			fgets(line, 128, stdin);
+		case set_auto:
 			strip(line);
 			if (line[0] == '?') {
 				printf("\n%s\n", menu->sym->help ?
@@ -484,7 +522,7 @@
 
 int main(int ac, char **av)
 {
-	int i = 1;
+	 int i = 1;
 	const char *name;
 	struct stat tmpstat;
 
@@ -493,6 +531,9 @@
 		case 'o':
 			input_mode = ask_new;
 			break;
+		case 'a':
+			input_mode = set_auto;
+			break;
 		case 's':
 			input_mode = ask_silent;
 			valid_stdin = isatty(0) && isatty(1) && isatty(2);
@@ -557,6 +598,7 @@
 		}
 	case ask_all:
 	case ask_new:
+	case set_auto:
 		conf_read(NULL);
 		break;
 	default:
@@ -566,7 +608,7 @@
 	if (input_mode != ask_silent) {
 		rootEntry = &rootmenu;
 		conf(&rootmenu);
-		if (input_mode == ask_all) {
+		if (input_mode == ask_all || input_mode == set_auto) {
 			input_mode = ask_silent;
 			valid_stdin = 1;
 		}
@@ -575,6 +617,8 @@
 		conf_cnt = 0;
 		check_conf(&rootmenu);
 	} while (conf_cnt);
+		if(av[1][1]=='a')
+			must_have();
 	if (conf_write(NULL)) {
 		fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
 		return 1;
diff -urN linux.org/scripts/kconfig/Makefile linux-2.6.13/scripts/kconfig/Makefile
--- linux.org/scripts/kconfig/Makefile	2005-08-29 01:41:01.000000000 +0200
+++ linux-2.6.13/scripts/kconfig/Makefile	2005-09-06 11:07:42.000000000 +0200
@@ -2,7 +2,7 @@
 # Kernel configuration targets
 # These targets are used from top-level makefile
 
-.PHONY: oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config
+.PHONY: oldconfig xconfig gconfig menuconfig config silentoldconfig
 
 xconfig: $(obj)/qconf
 	$< arch/$(ARCH)/Kconfig
@@ -17,19 +17,16 @@
 config: $(obj)/conf
 	$< arch/$(ARCH)/Kconfig
 
+autoconfig: $(obj)/conf
+	@if [ -f .config ]; then  rm .config; fi;
+	$< -a arch/$(ARCH)/Kconfig
+	
 oldconfig: $(obj)/conf
 	$< -o arch/$(ARCH)/Kconfig
 
 silentoldconfig: $(obj)/conf
 	$< -s arch/$(ARCH)/Kconfig
 
-update-po-config: $(obj)/kxgettext
-	xgettext --default-domain=linux \
-          --add-comments --keyword=_ --keyword=N_ \
-          --files-from=scripts/kconfig/POTFILES.in \
-	-o scripts/kconfig/linux.pot
-	scripts/kconfig/kxgettext arch/$(ARCH)/Kconfig >> scripts/kconfig/linux.pot
-
 .PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig
 
 randconfig: $(obj)/conf
@@ -57,12 +54,10 @@
 
 # Help text used by make help
 help:
-	@echo  '  config	  - Update current config utilising a line-oriented program'
+	@echo  '  oldconfig	  - Update current config utilising a line-oriented program'
 	@echo  '  menuconfig	  - Update current config utilising a menu based program'
 	@echo  '  xconfig	  - Update current config utilising a QT based front-end'
 	@echo  '  gconfig	  - Update current config utilising a GTK based front-end'
-	@echo  '  oldconfig	  - Update current config utilising a provided .config as base'
-	@echo  '  randconfig	  - New config with random answer to all options'
 	@echo  '  defconfig	  - New config with default answer to all options'
 	@echo  '  allmodconfig	  - New config selecting modules when possible'
 	@echo  '  allyesconfig	  - New config where all options are accepted with yes'
@@ -79,11 +74,9 @@
 #         Based on GTK which needs to be installed to compile it
 # object files used by all kconfig flavours
 
-hostprogs-y	:= conf mconf qconf gconf kxgettext
-conf-objs	:= conf.o  zconf.tab.o
+hostprogs-y	:= conf mconf qconf gconf
+conf-objs	:= conf.o auto_conf.o xmlparser.o xmlutil.o zconf.tab.o
 mconf-objs	:= mconf.o zconf.tab.o
-kxgettext-objs	:= kxgettext.o zconf.tab.o
-
 ifeq ($(MAKECMDGOALS),xconfig)
 	qconf-target := 1
 endif
@@ -115,11 +108,7 @@
 HOSTCFLAGS_gconf.o	= `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` \
                           -D LKC_DIRECT_LINK
 
-$(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o $(obj)/gconf.o $(obj)/kxgettext: $(obj)/zconf.tab.h
-
-$(obj)/zconf.tab.h: $(src)/zconf.tab.h_shipped
-$(obj)/zconf.tab.c: $(src)/zconf.tab.c_shipped
-$(obj)/lex.zconf.c: $(src)/lex.zconf.c_shipped
+$(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o $(obj)/gconf.o: $(obj)/zconf.tab.h
 
 $(obj)/qconf.o: $(obj)/.tmp_qtcheck
 
diff -urN linux.org/scripts/kconfig/rules/4gbmem.pm linux-2.6.13/scripts/kconfig/rules/4gbmem.pm
--- linux.org/scripts/kconfig/rules/4gbmem.pm	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/rules/4gbmem.pm	2005-09-06 11:07:42.000000000 +0200
@@ -0,0 +1,14 @@
+#!/usr/bin/perl
+
+$mem_var=`cat /proc/meminfo | grep MemTotal`;
+chop($mem_var);
+$mem_var=~/['0-9']+/g;
+$mem_var=$&;
+
+if(4290000 < $mem_var && $mem_var < 640000000) {
+	print("y\n");
+}
+
+else {
+	print("n\n");
+}
diff -urN linux.org/scripts/kconfig/rules/arch.pm linux-2.6.13/scripts/kconfig/rules/arch.pm
--- linux.org/scripts/kconfig/rules/arch.pm	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/rules/arch.pm	2005-09-15 12:16:19.000000000 +0200
@@ -0,0 +1,9 @@
+#!/usr/bin/perl
+
+$test='';
+$test=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/`;
+chop($test);
+if($test eq "@ARGV"){ print("y\n");}
+else{print("n\n");}
+1;
+
diff -urN linux.org/scripts/kconfig/rules/cpugrep.pm linux-2.6.13/scripts/kconfig/rules/cpugrep.pm
--- linux.org/scripts/kconfig/rules/cpugrep.pm	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/rules/cpugrep.pm	2005-09-06 11:07:42.000000000 +0200
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+
+#########################################################################
+#									#
+#	cpugrep can be used with a Parameter.				#
+#	It searches after the name of the cpu. 				#
+#	If there is a success it gives a y to stout.			#
+#									#
+#########################################################################
+
+
+$found='';
+$found=`grep "@ARGV" /proc/cpuinfo`;
+
+if ($found ne '') {
+	 print("y\n");
+}
+
+else {
+	print("n\n");
+}
+1;
+
diff -urN linux.org/scripts/kconfig/rules/getchar.pm linux-2.6.13/scripts/kconfig/rules/getchar.pm
--- linux.org/scripts/kconfig/rules/getchar.pm	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/rules/getchar.pm	2005-09-06 11:07:42.000000000 +0200
@@ -0,0 +1,3 @@
+#!/usr/bin/perl
+
+getc();
diff -urN linux.org/scripts/kconfig/rules/highmem.pm linux-2.6.13/scripts/kconfig/rules/highmem.pm
--- linux.org/scripts/kconfig/rules/highmem.pm	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/rules/highmem.pm	2005-09-06 11:07:42.000000000 +0200
@@ -0,0 +1,12 @@
+#!/usr/bin/perl
+
+$mem_var=`cat /proc/meminfo | grep MemTotal`;
+chop($mem_var);
+$mem_var=~/['0-9']+/g;
+$mem_var=$&;
+
+if($mem_var > 640000000){
+	print("y\n");
+	}
+
+else{print("n\n");}
diff -urN linux.org/scripts/kconfig/rules/hw_egrep.pm linux-2.6.13/scripts/kconfig/rules/hw_egrep.pm
--- linux.org/scripts/kconfig/rules/hw_egrep.pm	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/rules/hw_egrep.pm	2005-09-06 11:07:42.000000000 +0200
@@ -0,0 +1,17 @@
+#!/usr/bin/perl
+
+$found='';
+$found=`lspci | grep -E "@ARGV" `;
+if($found ne '') {
+	print("y\n");
+}
+else {
+	$found=`grep -E "@ARGV" /var/log/dmesg `;
+	if($found ne '') {
+		 print("y\n");
+	}
+	else {
+		print("n\n");
+	}
+}
+1;
diff -urN linux.org/scripts/kconfig/rules/hw_grep.pm linux-2.6.13/scripts/kconfig/rules/hw_grep.pm
--- linux.org/scripts/kconfig/rules/hw_grep.pm	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/rules/hw_grep.pm	2005-09-15 12:16:09.000000000 +0200
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+
+#########################################################################
+#									#
+#	hw_grep can be used with a Parameter.				#
+#	It searches then in lspci after the Name of the Parameter	#
+#	If there is a success it gives a y to stout.			#
+#									#
+#########################################################################
+
+$found='';
+$found=`lspci | grep "@ARGV"`;
+if($found ne '') {
+	print("y\n");
+}
+else {
+	$found=`grep -E "@ARGV" /var/log/dmesg `;
+	if($found ne ''){ 
+		print("y\n");
+	}
+	else {
+		print("n\n");
+	}
+}
+1;
+
diff -urN linux.org/scripts/kconfig/rules/mod1.pm linux-2.6.13/scripts/kconfig/rules/mod1.pm
--- linux.org/scripts/kconfig/rules/mod1.pm	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/rules/mod1.pm	2005-09-06 11:07:42.000000000 +0200
@@ -0,0 +1,5 @@
+#!/usr/bin/perl
+
+
+print("m\n");
+
diff -urN linux.org/scripts/kconfig/rules/offhimem.pm linux-2.6.13/scripts/kconfig/rules/offhimem.pm
--- linux.org/scripts/kconfig/rules/offhimem.pm	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/rules/offhimem.pm	2005-09-06 11:07:42.000000000 +0200
@@ -0,0 +1,12 @@
+#!/usr/bin/perl
+
+$mem_var=`cat /proc/meminfo | grep MemTotal`;
+chop($mem_var);
+$mem_var=~/['0-9']+/g;
+$mem_var=$&;
+
+if($mem_var < 4290000){
+	print("y\n");
+	}
+
+else{print("n\n");}
diff -urN linux.org/scripts/kconfig/rules/rules_list.xml linux-2.6.13/scripts/kconfig/rules/rules_list.xml
--- linux.org/scripts/kconfig/rules/rules_list.xml	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/rules/rules_list.xml	2005-09-13 17:54:13.000000000 +0200
@@ -0,0 +1,301 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rules>
+   <menu name="Code maturity level options">
+      <option name="Prompt for development and/or incomplete code/drivers"> yes1.pm</option>
+      <option name="Select only drivers expected to compile cleanly">yes1.pm</option>
+   </menu>
+   <menu name="General setup">
+      <option name="Support for paging of anonymous memory (swap)"> yes1.pm</option>
+      <option name="System V IPC">yes1.pm</option>
+      <option name="Sysctl support">yes1.pm</option>
+      <option name="Support for hot-pluggable devices">yes1.pm</option>
+      <option name="Kernel Userspace Events">yes1.pm</option>
+      <option name="Kernel .config support">yes1.pm</option>
+      <option name="Enable access to .config through /proc/config.gz">yes1.pm</option>
+   </menu>
+   <menu name="Loadable module support">
+      <option name="Enable loadable module support">yes1.pm</option>
+      <option name="Module unloading">yes1.pm</option>
+      <option name="Forced module unloading">yes1.pm</option>
+      <option name="Module versioning support (EXPERIMENTAL)">yes1.pm</option>
+      <option name="Automatic kernel module loading">yes1.pm</option>
+   </menu>
+   <menu name="Processor type and features">
+      <menu name="Subarchitecture Type" must_have="1">
+	<option name="PC-compatible">arch.pm i386</option>
+      </menu>
+      <menu name="Processor family" must_have="1">
+         <option name="Pentium M">cpugrep.pm "Pentium(R) M"</option>
+         <option name="Athlon/Duron/K7">cpugrep.pm "Athlon"</option>
+         <option name="Pentium-4/Celeron(P4-based)/Pentium-4 M/Xeon">cpugrep.pm "Pentium(R) 4"</option>
+      </menu>
+      <option name="Preemptible Kernel">yes1.pm</option>
+      <option name="Local APIC support on uniprocessors">yes1.pm</option>
+      <option name="IO-APIC support on uniprocessors">yes1.pm</option>
+      <option name="Machine Check Exception">yes1.pm</option>
+      <option name="/dev/cpu/*/msr - Model-specific register support">mod1.pm</option>
+      <option name="/dev/cpu/*/cpuid - CPU information support">yes1.pm</option>
+      <menu name="High Memory Support">
+         <option name="off">offhimem.pm</option>
+         <option name="4GB">4gbmem.pm</option>
+         <option name="64GB">highmem.pm</option>
+      </menu>
+      <option name="MTRR (Memory Type Range Register) support">yes1.pm</option>
+   </menu>
+   <menu name="Power management menus (ACPI, APM)">
+      <option name="Power Management support">yes1.pm</option>
+      <option name="Software Suspend (EXPERIMENTAL)">yes1.pm</option>
+      <option name="Sleep States (EXPERIMENTAL)">yes1.pm</option>
+      <menu name="ACPI (Advanced Configuration and Power Interface) Support">
+         <option name="ACPI Support">PentiumM.pm</option>
+         <option name="AC Adapter">yes1.pm</option>
+         <option name="Button">yes1.pm</option>
+         <menu name="Video">mod1.pm</menu>
+         <option name="Fan">yes1.pm</option>
+         <option name="Processor">yes1.pm</option>
+         <option name="Thermal Zone">yes1.pm</option>
+      </menu>
+      <menu name="APM (Advanced Power Management) BIOS Support">
+         <option name="APM (Advanced Power Management) BIOS support">mod1.pm</option>
+         <option name="RTC stores time in GMT">yes1.pm</option>
+         <option name="Use real mode APM BIOS call to power off">yes1.pm</option>
+      </menu>
+      <menu name="CPU Frequency scaling">
+         <option name="CPU Frequency scaling">yes1.pm</option>
+         <option name="powersave' governor">mod1.pm</option>
+         <option name="'userspace' governor for userspace frequency scaling">mod1.pm</option>
+         <option name="ACPI Processor P-States driver">mod1.pm</option>
+         <option name="Intel Enhanced SpeedStep">cpugrep.pm "Pentium(R) M"</option>
+      </menu>
+   </menu>
+   <menu name="Bus menus (PCI, PCMCIA, EISA, MCA, ISA)" must_have="1">
+      <option name="PCI support">hw_grep.pm "PCI bridge"</option>
+      <option name="PCI device name database">yes1.pm</option>
+      <menu name="PCI Hotplug Support">
+         <option name="Support for PCI Hotplug (EXPERIMENTAL)">mod1.pm</option>
+         <option name="Fake PCI Hotplug driver">mod1.pm</option>
+      </menu>
+   </menu>
+   <menu name=" Executable file formats">
+      <option name="Kernel support for ELF binaries">yes1.pm</option>
+      <option name="Kernel support for a.out and ECOFF binaries">mod1.pm</option>
+      <option name="Kernel support for MISC binaries">mod1.pm</option>
+   </menu>
+   <menu name="Device Drivers">
+      <menu name="Generic Driver Options">
+         <option name="Select only drivers that don't need compile-time external firmware">yes1.pm</option>
+         <option name="Prevent firmware from being built">yes1.pm</option>
+         <option name="Hotplug firmware loading support">mod1.pm</option>
+      </menu>
+      <menu name="ATA/ATAPI/MFM/RLL support" must_have="6">
+         <option name="ATA/ATAPI/MFM/RLL support">hw_egrep.pm "ATA|ATAPI|MFM|RLL"</option>
+         <option name="Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support">yes1.pm</option>
+         <option name="Include IDE/ATA-2 DISK support">hw_egrep.pm "ATA|IDE"</option>
+         <option name="Use multi-mode by default">yes1.pm</option>
+         <option name="Include IDE/ATAPI CDROM support">yes1.pm</option>
+         <option name="SCSI emulation support">mod1.pm</option>
+         <option name="generic/default IDE chipset support">yes1.pm</option>
+         <option name="PCI IDE chipset support">hw_egrep.pm "IDE|PCI"</option>
+         <option name="Generic PCI IDE Chipset Support">hw_egrep.pm "IDE|PCI"</option>
+         <option name="Generic PCI bus-master DMA support">hw_grep.pm "PCI"</option>
+         <option name="Intel PIIXn chipsets support">hw_egrep.pm "ICH"</option>
+         <option name="VIA82CXXX chipset support">hw_egrep.pm "VT82C*"</option>
+      </menu>
+      <menu name="IEEE 1394 (FireWire) support" must_have="1">
+         <option name="IEEE 1394 (FireWire) support">hw_grep.pm "FireWire (IEEE 1394)"</option>
+         <option name="OUI Database built-in">yes1.pm</option>
+         <option name="OHCI-1394 support">mod1.pm</option>
+         <option name="OHCI-1394 Video support">mod1.pm</option>
+         <option name="SBP-2 support (Harddisks etc.)">mod1.pm</option>
+         <option name="OHCI-DV I/O support">mod1.pm</option>
+         <option name="Raw IEEE1394 I/O support">mod1.pm</option>
+         <option name="IEC61883-1 Plug support">mod1.pm</option>
+         <option name="IEC61883-6 (Audio transmission) support">mod1.pm</option>
+      </menu>
+      <menu name="Networking support" must_have="1">
+         <option name="Networking support">hw_egrep.pm "Network|Ethernet"</option> 
+         <menu name="Networking menus">
+            <option name="Packet socket">yes1.pm</option>
+            <option name="Packet socket: mmapped IO">yes1.pm</option>
+            <option name="Unix domain sockets">yes1.pm</option>
+            <option name="PF_KEY sockets">mod1.pm</option>
+            <option name="TCP/IP networking">yes1.pm</option>
+            <option name="IP: multicasting">yes1.pm</option>
+            <option name="IP: AH transformation">mod1.pm</option>
+            <option name="IP: ESP transformation">mod1.pm</option>
+            <option name="IP: IPComp transformation">mod1.pm</option>
+            <option name="IP: tunnel transformation">mod1.pm</option>
+            <option name="IP: TCP socket monitoring interface">yes1.pm</option>
+            <option name="Network packet filtering (replaces ipchains)">yes1.pm</option>
+            <menu name="Network packet filtering (replaces ipchains)">
+               <menu name="IP: Netfilter Configuration">
+                  <option name="Connection tracking (required for masq/NAT)">mod1.pm</option>
+                  <option name="FTP protocol support">mod1.pm</option>
+                  <option name="IRC protocol support">mod1.pm</option>
+                  <option name="IRC protocol support">mod1.pm</option>
+                  <option name="IP tables support (required for filtering/masq/NAT)">mod1.pm</option>
+                  <option name="limit match support">mod1.pm</option>
+                  <option name="MAC address match support">mod1.pm</option>
+                  <option name="Packet type match support">mod1.pm</option>
+                  <option name="netfilter MARK match support">mod1.pm</option>
+                  <option name="Multiple port match support">mod1.pm</option>
+                  <option name="TOS match support">mod1.pm</option>
+                  <option name="ECN match support">mod1.pm</option>
+                  <option name="DSCP target support">mod1.pm</option>
+                  <option name="MARK target support">mod1.pm</option>
+                  <option name="ARP tables support">mod1.pm</option>
+               </menu>
+            </menu>
+            <option name="IPsec user configuration interface">mod1.pm</option>
+         </menu>
+         <option name="Network device support">hw_egrep.pm "Network|Ethernet"</option>
+         <menu name="Ethernet (10 or 100Mbit)" must_have="1">
+            <option name="Ethernet (10 or 100Mbit)">yes1.pm</option>
+            <option name="Generic Media Independent Interface device support">yes1.pm</option>
+            <option name="EISA, VLB, PCI and on board controllers">yes1.pm</option>
+            <option name="3COM cards">hw_grep.pm "3Com"</option>
+            <option name="3c590/3c900 series (592/595/597) &quot;Vortex/Boomerang&quot; support">mod1.pm</option>
+            <option name="3cr990 series &quot;Typhoon&quot; support">mod1.pm</option>
+            <option name="Intel(R) PRO/100+ support">hw_grep.pm "PRO/100"</option>
+            <option name="RealTek RTL-8129/8130/8139 PCI Fast Ethernet Adapter support">
+		hw_egrep.pm "RTL-8129|RTL-8130|RTL-8139"</option>
+            <option name="RealTek RTL-8139 PCI Fast Ethernet Adapter support">hw_grep.pm "RTL-8139"</option>
+            <option name="Support for uncommon RTL-8139 rev. K (automatic channel equalization)">yes1.pm</option>
+         </menu>
+         <menu name="Wireless LAN (non-hamradio)" must_have="1">
+            <option name="Wireless LAN drivers (non-hamradio) &amp; Wireless Extensions">hw_egrep.pm "Wireless|WLan|WLAN"</option>
+            <option name="STRIP (Metricom starmode radio IP)">mod1.pm</option>
+            <option name="Hermes chipset 802.11b support (Orinoco/Prism2/Symbol)">mod1.pm</option>
+            <option name="Prism 2.5 PCI 802.11b adaptor support (EXPERIMENTAL)">mod1.pm</option>
+         </menu>
+         <option name="PLIP (parallel port) support">mod1.pm</option>
+         <option name="PPP (point-to-point protocol) support">mod1.pm</option>
+         <option name="PPP multilink support (EXPERIMENTAL)">yes1.pm</option>
+         <option name="PPP support for async serial ports">mod1.pm</option>
+         <option name="PPP support for sync tty ports">mod1.pm</option>
+         <option name="PPP Deflate compression">mod1.pm</option>
+         <option name="PPP BSD-Compress compression">mod1.pm</option>
+         <option name="PPP over Ethernet (EXPERIMENTAL)">mod1.pm</option>
+      </menu>
+      <menu name="Input device suppor">
+         <option name="Provide legacy /dev/psaux device">yes1.pm</option>
+         <option name="Event interface">yes1.pm</option>
+         <option name="Mice">yes1.pm</option>
+         <option name="PS/2 mouse">yes1.pm</option>
+      </menu>
+      <menu name="Character devices" must_have="2">
+         <option name="Legacy (BSD) PTY support">yes1.pm</option>
+         <option name="/dev/agpgart (AGP Support)">hw_grep.pm "AGP"</option>
+         <option name="Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)">hw_egrep.pm "Rage|Radeon|Banshee|Voodoo"</option>
+         <option name="ATI Radeon">hw_grep.pm "Radeon"</option>
+         <option name="NVIDIA nForce/nForce2 chipset support">hw_egrep.pm "*Force*"</option>
+	 <option name="Intel 830M, 845G, 852GM, 855GM, 865G">hw_egrep.pm "830M|845G|852GM|855GM|865G"</option>
+	 
+      </menu>
+      <menu name="Multimedia devices">
+         <option name="Video For Linux">mod1.pm</option>
+      </menu>
+      <menu name="Graphics support" must_have="2">
+         <option name="Support for frame buffer devices">hw_grep.pm "VGA"</option>
+         <option name="ATI Radeon display support">hw_grep.pm "Radeon"</option>
+         <option name="Intel 830M/845G/852GM/855GM/865G support">hw_egrep.pm "830M|845G|852GM|855GM|865G"</option>
+	 <option name="nVidia Riva support">hw_egrep.pm "Riva|GeForce"</option>
+         <option name="DDC/I2C for ATI Radeon support">yes1.pm</option>
+         <menu name="Console display driver support">
+            <option name="Video mode selection support">yes1.pm</option>
+            <option name="Framebuffer Console support">yes1.pm</option>
+         </menu>
+         <menu name="Logo configuration">
+            <option name="Bootup logo">yes1.pm</option>
+            <option name="Standard 224-color Linux logo">yes1.pm</option>
+         </menu>
+      </menu>
+      <menu name="Sound" must_have="1">
+         <option name="Sound card support">hw_grep.pm "audio"</option>
+         <menu name="Advanced Linux Sound Architecture" must_have="1">
+            <option name="Advanced Linux Sound Architecture">hw_grep.pm "audio"</option>
+            <option name="Sequencer support">yes1.pm</option>
+            <option name="OSS Mixer API">yes1.pm</option>
+            <option name="OSS PCM (digital audio) API">yes1.pm</option>
+            <option name="OSS Sequencer API">yes1.pm</option>
+         </menu>
+         <menu name="Generic devices">
+            <option name="Virtual MIDI soundcard">mod1.pm</option>
+            <option name="MOTU MidiTimePiece AV multiport MIDI">mod1.pm</option>
+            <option name="UART16550 serial MIDI driver">mod1.pm</option>
+            <option name="Generic MPU-401 UART driver">mod1.pm</option>
+         </menu>
+         <menu name="PCI devices" must_have="1">
+            <option name="Intel/SiS/nVidia/AMD/ALi AC97 Controller">hw_egrep.pm "Intel|SiS|nVidia|AMD|ALi AC'97"
+</option>
+            <option name="(Creative) Ensoniq AudioPCI 1370">hw_egrep.pm "Ensoniq|AudioPCI"</option>
+            <option name="(Creative) Ensoniq AudioPCI 1371/1373">hw_egrep.pm "Ensoniq|AudioPCI"</option>
+         </menu>
+      </menu>
+      <menu name="USB support" must_have="3">
+         <option name="Support for Host-side USB">hw_grep.pm "USB"</option>
+         <option name="USB device filesystem">yes1.pm</option>
+         <option name="Enforce USB bandwidth allocation">yes1.pm</option>
+         <option name="EHCI HCD (USB 2.0) support">hw_grep.pm "EHCI"</option>
+         <option name="UHCI HCD (most Intel and VIA) support">hw_grep.pm "UHCI"</option>
+         <option name="USB Human Interface Device (full HID) support">yes1.pm</option>
+         <option name="USB Audio support">mod1.pm</option>
+         <option name="USB Bluetooth TTY support">mod1.pm</option>
+         <option name="USB MIDI support">mod1.pm</option>
+         <option name="USB Modem (CDC ACM) support">mod1.pm</option>
+         <option name="USB Printer support">mod1.pm</option>
+         <option name="USB Mass Storage support">mod1.pm</option>
+         <option name="USB Mass Storage verbose debug">yes1.pm</option>
+         <option name="Freecom USB/ATAPI Bridge support">yes1.pm</option>
+         <option name="ISD-200 USB/ATA Bridge support">yes1.pm</option>
+         <option name="Microtech/ZiO! CompactFlash/SmartMedia support">yes1.pm</option>
+         <option name="HP CD-Writer 82xx support (EXPERIMENTAL)">yes1.pm</option>
+         <option name="SanDisk SDDR-09 (and other SmartMedia) support (EXPERIMENTAL)">yes1.pm</option>
+         <option name="SanDisk SDDR-55 SmartMedia support (EXPERIMENTAL)">yes1.pm</option>
+         <option name="Lexar Jumpshot Compact Flash Reader (EXPERIMENTAL)">yes1.pm</option>
+         <option name="USB testing driver (DEVELOPMENT)">mod1.pm</option>
+      </menu>
+      </menu>
+      <menu name="File systems">
+         <option name="Second extended fs support">yes1.pm</option>
+         <option name="Ext3 journalling file system support">yes1.pm</option>
+         <option name="Ext3 extended attributes">yes1.pm</option>
+         <option name="Kernel automounter version 4 support (also supports v3)">yes1.pm</option>
+         <menu name="CD-ROM/DVD Filesystems">
+            <option name="ISO 9660 CDROM file system support">mod1.pm</option>
+            <option name="Microsoft Joliet CDROM extensions">yes1.pm</option>
+            <option name="Transparent decompression extension">yes1.pm</option>
+            <option name="UDF file system support">mod1.pm</option>
+         </menu>
+         <menu name="DOS/FAT/NT Filesystems">
+            <option name="MSDOS fs support">mod1.pm</option>
+            <option name="VFAT (Windows-95) fs support">mod1.pm</option>
+         </menu>
+         <menu name="Pseudo filesystems">
+            <option name="/proc file system support">yes1.pm</option>
+            <option name="/proc/kcore support">yes1.pm</option>
+         </menu>
+         <menu name="Native Language Support">
+            <option name="Base native language support">yes1.pm</option>
+            <option name="Codepage 437 (United States, Canada)">yes1.pm</option>
+            <option name="NLS ISO 8859-1  (Latin 1; Western European Languages)">yes1.pm</option>
+            <option name="NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)"
+            >yes1.pm</option>
+         </menu>
+      </menu>
+      <menu name="Kernel hacking">
+         <option name="Kernel debugging">yes1.pm</option>
+         <option name="Magic SysRq key">yes1.pm</option>
+      </menu>
+      <menu name="Cryptographic menus">
+         <option name="Cryptographic API">yes1.pm</option>
+         <option name="SHA1 digest algorithm">mod1.pm</option>
+         <option name="ARC4 cipher algorithm">mod1.pm</option>
+         <option name="Deflate compression algorithm">mod1.pm</option>
+         <option name="CRC32c CRC algorithm">mod1.pm</option>
+      </menu>
+      <menu name="Library routines">
+         <option name="CRC-CCITT functions">mod1.pm</option>
+         <option name="CRC32c (Castagnoli, et al) Cyclic Redundancy-Check">mod1.pm</option>
+      </menu>
+</rules>
diff -urN linux.org/scripts/kconfig/rules/yes1.pm linux-2.6.13/scripts/kconfig/rules/yes1.pm
--- linux.org/scripts/kconfig/rules/yes1.pm	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/rules/yes1.pm	2005-09-06 11:07:42.000000000 +0200
@@ -0,0 +1,5 @@
+#!/usr/bin/perl
+
+
+print("yes\n");
+
diff -urN linux.org/scripts/kconfig/xmlparser.c linux-2.6.13/scripts/kconfig/xmlparser.c
--- linux.org/scripts/kconfig/xmlparser.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/xmlparser.c	2005-09-06 11:07:42.000000000 +0200
@@ -0,0 +1,919 @@
+/***************************************************************************
+ *                                                                         *
+ *  Simple XML Parser.                                                     *
+ *     copyright (C)  Tim Hockin <thockin@hockin.org>                      *
+ *                                                                         *
+ *  Heavily modified by                                                    *
+ *     copyright (C) 2004, 2005  Michael Buesch <mbuesch@freenet.de>       *
+ *                                                                         *
+ * Released under the LGPL version 2.1 (http://www.gnu.org)                *
+ * This program is free software; you can redistribute it and/or modify    *
+ * it under the terms of the GNU Lesser General Public License version 2.1 *
+ * as published by the Free Software Foundation.                           *
+ *                                                                         *
+ ***************************************************************************/
+
+#include "xmlparser.h"
+#include "xmlutil.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#define XML_PAGE "<fieldbus name=Ahmad length=12><board  type=INTEL>Asus</board><board><board device name>\
+	                /dev/pbboard0</board device name></board></fieldbus>"
+
+
+#define STRING_CAP_STEP		100 /* byte */
+
+
+struct xml_context
+{
+	const char *buf;
+	size_t size;
+	size_t pos;
+	unsigned int lineno;
+};
+
+typedef enum xml_state
+{
+	ST_TAGSTART,
+	ST_START_STAG,
+	ST_STAG_NAME_DONE,
+	ST_PROPNAME,
+	ST_GETEQ,
+	ST_GOTEQ,
+	ST_PROPVAL,
+	ST_SQ_PROPVAL,
+	ST_POST_PROPVAL,
+	ST_END_SETAG,
+	ST_END_STAG,
+	ST_CONTENT,
+	ST_MAYBE_COMMENT,
+	ST_NEWTAG_START,
+	ST_START_ETAG,
+	ST_ETAG_NAME,
+	ST_END_ETAG
+} state_t;
+
+
+struct xml_element* get_first_child(struct xml_element *parent){
+	
+	if(parent->first_child)
+		return parent->first_child;	
+	return NULL;
+}
+
+struct xml_element* get_next_element(struct xml_element *element, struct xml_element *child){
+	
+	if(child)
+		return child->next;
+		
+	return NULL;
+	
+}
+
+struct xml_element* get_next_node(struct xml_element *element){
+	
+	if(element->next)
+		return element->next;	
+	return NULL;
+	
+}
+
+char * get_element_name(struct xml_element *element){
+
+	 if(element->name)
+		return element->name->s;
+	 return 0;
+}
+
+char * get_element_content(struct xml_element *element){
+
+	if(element->content)	
+		return element->content->s;
+	return 0;
+}
+struct xml_prop *get_next_attribute( struct xml_element *element, struct xml_prop* attribute){
+	if(!element->first_prop)
+		return NULL;
+	if(attribute){
+		return attribute->next;}
+	else
+		return element->first_prop;
+}
+
+char *get_attribute_name(struct xml_prop* attribute){
+	if(attribute->name->s)
+	return attribute->name->s;
+	return NULL;
+}
+
+
+char *get_attribute_value(struct xml_prop* attribute){
+	return attribute->value->s;
+}
+
+struct xml_element *get_element_parent(struct xml_element *element){
+	if(element->parent)
+	return element->parent;
+	else return NULL;
+}
+
+
+
+
+static struct xml_string * alloc_xml_string(void)
+{
+	struct xml_string *s;
+
+	s = malloc(sizeof(*s));
+	if (!s) {
+		printf("Out of memory\n");
+		return 0;
+	}
+	s->s = malloc(STRING_CAP_STEP);
+	if (!s->s) {
+		printf("Out of memory\n");
+		free(s);
+		return 0;
+	}
+	s->s[0] = '\0';
+	s->size = 0;
+	s->_capacity = STRING_CAP_STEP;
+
+	return s;
+}
+
+static void free_xml_string(struct xml_string *s)
+{
+	if (!s)
+		return;
+	free(s->s);
+	free(s);
+}
+
+static int xml_string_append_c(struct xml_string *s, char c)
+{
+	if (s->size + 1 == s->_capacity) {
+		size_t new_cap;
+		char *new_buf;
+
+		new_cap = s->_capacity + STRING_CAP_STEP;
+		new_buf = realloc(s->s, new_cap);
+		if (!new_buf) {
+			printf("Out of memory\n");
+			return 1;
+		}
+		s->s = new_buf;
+		s->_capacity = new_cap;
+	}
+	s->size++;
+	s->s[s->size - 1] = c;
+	s->s[s->size] = '\0';
+	return 0;
+}
+
+static int xml_string_copy(struct xml_string *to, struct xml_string *from)
+{
+	if (from->size + 1 > to->_capacity) {
+		char *new_buf;
+
+		new_buf = realloc(to->s, from->size + 1);
+		if (!new_buf) {
+			printf("Out of memory\n");
+			return 1;
+		}
+		to->s = new_buf;
+		to->_capacity = from->size + 1;
+	}
+	memcpy(to->s, from->s, from->size + 1);
+	to->size = from->size;
+	return 0;
+}
+
+static void xml_string_clear(struct xml_string *s)
+{
+	s->size = 0;
+	/* We don't reset capacity here. */
+}
+
+static struct xml_prop * alloc_xml_prop(void)
+{
+	struct xml_prop *p;
+
+	p = malloc(sizeof(*p));
+	if (!p) {
+		printf("Out of memory\n");
+		return 0;
+	}
+	p->name = alloc_xml_string();
+	if (!p->name) {
+		free(p);
+		return 0;
+	}
+	p->value = alloc_xml_string();
+	if (!p->value) {
+		free_xml_string(p->name);
+		free(p);
+		return 0;
+	}
+	p->next = 0;
+	p->prev = 0;
+
+	return p;
+}
+
+static void free_xml_prop(struct xml_prop *p)
+{
+	if (!p)
+		return;
+	free_xml_string(p->value);
+	free_xml_string(p->name);
+	free(p);
+}
+
+static struct xml_element * alloc_xml_element(void)
+{
+	struct xml_element *e;
+
+	e = malloc(sizeof(*e));
+	if (!e) {
+		printf("Out of memory\n");
+		return 0;
+	}
+	e->name = alloc_xml_string();
+	if (!e->name) {
+		free(e);
+		return 0;
+	}
+	e->content = alloc_xml_string();
+	if (!e->content) {
+		free_xml_string(e->name);
+		free(e);
+		return 0;
+	}
+	e->first_prop = 0;
+	e->last_prop = 0;
+	e->first_child = 0;
+	e->last_child = 0;
+	e->next = 0;
+	e->prev = 0;
+	e->parent = 0;
+	return e;
+}
+
+void xml_free_element(struct xml_element *e)
+{
+	struct xml_element *child;
+	struct xml_prop *prop;
+
+	if (!e)
+		return;
+
+	child = e->first_child;
+	while (child) {
+		struct xml_element *del;
+
+		del = child;
+		child = child->next;
+		xml_free_element(del);
+	}
+
+	prop = e->first_prop;
+	while (prop) {
+		struct xml_prop *del;
+
+		del = prop;
+		prop = prop->next;
+		free_xml_prop(del);
+	}
+
+	free_xml_string(e->name);
+	free_xml_string(e->content);
+	free(e);
+}
+
+static void xml_element_append_child(struct xml_element *parent,
+				     struct xml_element *child)
+{
+	child->next = 0;
+	child->prev = 0;
+	if (!parent->first_child)
+		parent->first_child = child;
+	if (parent->last_child) {
+		parent->last_child->next = child;
+		child->prev = parent->last_child;
+	}
+	parent->last_child = child;
+	child->parent=parent;
+}
+
+static void xml_element_append_prop(struct xml_element *e,
+				    struct xml_prop *prop)
+{
+	prop->next = 0;
+	prop->prev = 0;
+	if (!e->first_prop)
+		e->first_prop = prop;
+	if (e->last_prop) {
+		e->last_prop->next = prop;
+		prop->prev = e->last_prop;
+	}
+	e->last_prop = prop;
+}
+
+static int is_name_start(char c)
+{
+	return (simple_isalpha(c) || c == '_' || c == ':');
+}
+
+static int is_name(char c)
+{
+	return (is_name_start(c) ||
+		simple_isdigit(c) ||
+		c == '.' ||
+		c == '-');
+}
+
+static int next_char(struct xml_context *ctx, char *c)
+{
+	if (ctx->pos == ctx->size){
+		return 0;}
+	*c = ctx->buf[ctx->pos];
+
+	if (*c == '\0'){
+		return 0;}
+	if (*c == '\n'){
+		ctx->lineno++;}
+	ctx->pos++;
+	return 1;
+}
+
+static void prolog(struct xml_context *ctx)
+{
+	char cur = ' ';
+	char prev = ' ';
+
+	while (next_char(ctx, &cur)) {
+		if (cur == '>' && prev == '?')
+			return;
+		prev = cur;
+	}
+}
+
+static void comment(struct xml_context *ctx)
+{
+	char cur = ' ';
+	char prev = ' ';
+	char prev2 = ' ';
+
+	while (next_char(ctx, &cur)) {
+		if (cur == '>' && prev == '-' && prev2 == '-')
+			return;
+		prev2 = prev;
+		prev = cur;
+	}
+}
+
+static char unescape(struct xml_context *ctx)
+{
+	char buf[16];
+	unsigned int i = 0;
+	const char *escapes[] = {
+		"lt;",
+		"gt;",
+		"amp;",
+		"apos;",
+		"quot;",
+		"nbsp;",
+		NULL
+	};
+	const char esc_vals[] = {
+		'<',
+		'>',
+		'&',
+		'\'',
+		'"',
+		' ',
+		'\0'
+	};
+
+	/* we assume we got a '&' before we got here */
+	if (!next_char(ctx, buf + i)) {
+		printf("ERROR: premature EOF (line %d)\n", ctx->lineno);
+		return -1;
+	}
+	while ((buf[i] != ';') && (!simple_isspace(buf[i])) && (i < sizeof(buf)-1)) {
+		i++;
+		if (!next_char(ctx, buf + i)) {
+			printf("ERROR: premature EOF (line %d)\n", ctx->lineno);
+			return -1;
+		}
+	}
+	buf[i + 1] = '\0';
+
+	/* got an escape */
+	if (buf[i] == ';') {
+		i = 0;
+		/* got a &# style escape */
+		if (buf[0] == '#') {
+			char charesc = -1;
+			int base = 10;
+			i++;
+			if (simple_tolower(buf[i]) == 'x') {
+				base = 16;
+				i++;
+			}
+			while (buf[i] != ';') {
+				int decval;
+
+				/* convert buf[i]) */
+				if (simple_isdigit(buf[i])) {
+					decval = buf[i] - '0';
+				} else if (simple_isxdigit(buf[i])) {
+					decval = (simple_tolower(buf[i]) - 'a') + 10;
+				} else {
+					return -1;
+				}
+				charesc *= base;
+				charesc += decval;
+			}
+			return charesc;
+		}
+		/* got a 'normal' escape */
+		while (escapes[i]) {
+			if (!simple_strcasecmp(buf, escapes[i])) {
+				return esc_vals[i];
+			}
+			i++;
+		}
+	}
+
+	return -1;
+}
+
+static int add_content_char(struct xml_context *ctx,
+			    struct xml_element *e,
+			    char c)
+{
+	if (e->content->size == 0) {
+		/* This is the first phase of the content
+		 * string whitespace cleanup.
+		 * Second phase is in cleanup_string()
+		 */
+		if (simple_isspace(c) || c == '\n'){
+
+			return 0;}
+	}
+	return xml_string_append_c(e->content, c);
+}
+
+static void cleanup_string(struct xml_string *s)
+{
+	size_t i;
+	char c;
+
+	/* This is the second phase of the content
+	 * string whitespace cleanup.
+	 * The first phase is in add_content_char()
+	 */
+	if (s->size <= 0)
+		return;
+	i = s->size - 1;
+	do {
+		c = s->s[i];
+	} while ((simple_isspace(c) || c == '\n') && (i-- > 0));
+	s->size = i + 1;
+	s->s[s->size] = '\0';
+}
+
+struct xml_element * parse_element(struct xml_context *ctx, char first)
+{
+	char c;
+	state_t state = ST_TAGSTART;
+	struct xml_element *e = 0;
+	struct xml_prop *p = 0;
+	struct xml_element *ret = 0;
+	int flag=0;
+
+	struct xml_string *propname = 0;
+	struct xml_string *propval = 0;
+	struct xml_string *endname = 0;
+
+	ret = alloc_xml_element();
+	if (!ret)
+		goto out_fail;
+	propname = alloc_xml_string();
+	if (!propname)
+		goto out_fail;
+	propval = alloc_xml_string();
+	if (!propval)
+		goto out_fail;
+	endname = alloc_xml_string();
+	if (!endname)
+		goto out_fail;
+
+	/* we got a '<' */
+	if (is_name_start(first)) {
+		if (xml_string_append_c(ret->name, simple_tolower(first)))
+			goto out_fail;
+		state = ST_START_STAG;
+	} else
+		state = ST_TAGSTART;
+
+	while (next_char(ctx, &c)) {
+		switch (state) {
+			/* start */
+			case ST_TAGSTART:
+				if (simple_isspace(c)) {
+					/* state = CURRENT_STATE; */
+				} else if (is_name_start(c)) {
+					if (xml_string_append_c(ret->name, simple_tolower(c)))
+						goto out_fail;
+					state = ST_START_STAG;
+				} else
+					goto out_inval_char;
+				break;
+			/* we got the start of a keyword for an stag */
+			case ST_START_STAG:
+				if (is_name(c)) {
+					if (xml_string_append_c(ret->name, simple_tolower(c)))
+						goto out_fail;
+					/* state = CURRENT_STATE; */
+				} else if (simple_isspace(c))
+					state = ST_STAG_NAME_DONE;
+				else if (c == '>')
+					state = ST_END_STAG;
+				else if (c == '/')
+					state = ST_END_SETAG;
+				else
+					goto out_inval_char;
+				break;
+			/* keyword done - look for next prop or other */
+			case ST_STAG_NAME_DONE:
+				if (simple_isspace(c)) {
+					/* state = CURRENT_STATE; */
+				} else if (c == '>'){
+					state = ST_END_STAG;}
+				else if (c == '/')
+					state = ST_END_SETAG;
+				else if (is_name_start(c)) {
+					/* must be a propname */
+					if (xml_string_append_c(propname, simple_tolower(c)))
+						goto out_fail;
+					state = ST_PROPNAME;
+				} else
+					goto out_inval_char;
+				break;
+			/* found start of a propname */
+			case ST_PROPNAME:
+				if (is_name(c)) {
+					if (xml_string_append_c(propname, simple_tolower(c)))
+						goto out_fail;
+					/* state = CURRENT_STATE; */
+				} else if (c == '=')
+					state = ST_GOTEQ;
+				else if (simple_isspace(c))
+					state = ST_GETEQ;
+				else
+					goto out_inval_char;
+				break;
+			/* got propname, get '=' */
+			case ST_GETEQ:
+				if (simple_isspace(c)) {
+					/* state = CURRENT_STATE; */
+				} else if (c == '=')
+					state = ST_GOTEQ;
+				else
+					goto out_inval_char;
+				break;
+			/* got '=' - find propval */
+			case ST_GOTEQ:
+				if (simple_isspace(c)) {
+					/* state = CURRENT_STATE; */
+				} else if (c == '"')
+					state = ST_PROPVAL;
+				else if (c == '\'')
+					state = ST_SQ_PROPVAL;
+				else
+					goto out_inval_char;
+				break;
+			/* got a quoted propval */
+			case ST_PROPVAL:
+				if (c == '&') {
+					char lc = unescape(ctx);
+					if (lc > 0) {
+						if (xml_string_append_c(propval, lc))
+							goto out_fail;
+					}
+				} else if (c == '"') {
+					p = alloc_xml_prop();
+					if (!p)
+						goto out_fail;
+					if (xml_string_copy(p->name, propname))
+						goto out_fail;
+					if (xml_string_copy(p->value, propval))
+						goto out_fail;
+					xml_element_append_prop(ret, p);
+					p = 0;
+					xml_string_clear(propname);
+					xml_string_clear(propval);
+					state = ST_STAG_NAME_DONE;
+				} else if (c == '<')
+					goto out_inval_char;
+				else {
+					if (xml_string_append_c(propval, c))
+						goto out_fail;
+					/* state = CURRENT_STATE; */
+				}
+				break;
+			/* got a single-quoted propval */
+			case ST_SQ_PROPVAL:
+				if (c == '&') {
+					char lc = unescape(ctx);
+					if (lc > 0) {
+						if (xml_string_append_c(propval, lc))
+							goto out_fail;
+					}
+				} else if (c == '\'') {
+					p = alloc_xml_prop();
+					if (!p)
+						goto out_fail;
+					if (xml_string_copy(p->name, propname))
+						goto out_fail;
+					if (xml_string_copy(p->value, propval))
+						goto out_fail;
+					xml_element_append_prop(ret, p);
+					p = 0;
+					xml_string_clear(propname);
+					xml_string_clear(propval);
+					state = ST_STAG_NAME_DONE;
+				} else if (c == '<') {
+					/* spec says this is an error */
+					goto out_inval_char;
+				} else {
+					if (xml_string_append_c(propval, c))
+						goto out_fail;
+					/* state = CURRENT_STATE; */
+				}
+				break;
+			/* spec says we must have a space between props */
+			case ST_POST_PROPVAL:
+				if (simple_isspace(c))
+					state = ST_STAG_NAME_DONE;
+				else if (c == '>')
+					state = ST_END_STAG;
+				else if (c == '/')
+					state = ST_END_SETAG;
+				else
+					goto out_inval_char;
+				break;
+			/* got a '/', suggesting an empty element */
+			case ST_END_SETAG:
+				if (simple_isspace(c)) {
+					/* state = CURRENT_STATE; */
+				} else if (c == '>')
+					goto out_success;
+				else
+					goto out_inval_char;
+				break;
+			/* time to look for content */
+			case ST_END_STAG:
+				if (simple_isspace(c)) {
+					/* state = CURRENT_STATE; */
+				} else if (c == '&') {
+					char lc = unescape(ctx);
+					if (lc > 0) {
+						if (add_content_char(ctx, ret, lc))
+							goto out_fail;
+					}
+					state = ST_CONTENT;
+				} else if (c == '<'){
+					state = ST_MAYBE_COMMENT;}
+				else {
+					if (add_content_char(ctx, ret, c))
+						goto out_fail;
+					state = ST_CONTENT;
+				}
+				break;
+			/* processing content */
+			case ST_CONTENT:
+				if (simple_isspace(c)) {
+					if (add_content_char(ctx, ret, c)){		
+						printf("element %s\n", get_element_name(ret) );
+						printf("fail2\n");
+						goto out_fail;}
+					/* state = CURRENT_STATE; */
+				}		   
+				else if (c == '<')
+					state = ST_MAYBE_COMMENT;
+				else if (c == '&') {
+					char lc = unescape(ctx);
+					if (lc > 0) {
+						if (add_content_char(ctx, ret, lc))
+									goto out_fail;
+							}
+				}																      
+				else {
+					if (add_content_char(ctx, ret, c)){
+						goto out_fail;}
+					/* state = CURRENT_STATE; */
+				}
+				break;
+			/* got a '<' - check for a comment */
+			case ST_MAYBE_COMMENT:
+				if (c == '!')
+					comment(ctx);
+				else if (simple_isspace(c))
+					state = ST_NEWTAG_START;
+				else if (c == '/')
+					state = ST_START_ETAG;
+				else {
+					e = parse_element(ctx, c);
+					if (!e)
+						goto out_fail;
+					xml_element_append_child(ret, e);
+					e = 0;
+					state = ST_CONTENT;
+					flag=1;
+				}
+				break;
+			/* got a '<' in content - figure it out */
+			case ST_NEWTAG_START:
+				if (simple_isspace(c)) {
+					/* state = CURRENT_STATE; */
+				} else if (c == '/')
+					state = ST_START_ETAG;
+				else {
+					e = parse_element(ctx, c);
+					if (!e)
+						goto out_fail;
+					xml_element_append_child(ret, e);
+					e = 0;
+					state = ST_CONTENT;
+				}
+				break;
+			/* got a </ */
+			case ST_START_ETAG:
+				if (simple_isspace(c)) {
+					/* state = CURRENT_STATE; */
+				} else if (is_name_start(c)) {
+					if (xml_string_append_c(endname, c))
+						goto out_fail;
+					state = ST_ETAG_NAME;
+				} else
+					goto out_inval_char;
+				break;
+			/* reading all of </name */
+			case ST_ETAG_NAME:
+				if (is_name(c)) {
+					if (xml_string_append_c(endname, c))
+						goto out_fail;
+					/* state = CURRENT_STATE; */
+				} else if (simple_isspace(c))
+					state = ST_END_ETAG;
+				else if (c == '>') {
+					if (ret->name->size == endname->size &&
+					    simple_strncasecmp(ret->name->s, endname->s, endname->size) == 0) {
+						goto out_success;
+					} else {
+						/* not a match! */
+						printf("endname (%s) != element->name (%s)\n",
+						       endname->s, ret->name->s);
+						state = ST_CONTENT;
+						xml_string_clear(endname);
+					}
+				} else
+					goto out_inval_char;
+				break;
+			/* just get '>' and wrap up */
+			case ST_END_ETAG:
+				if (simple_isspace(c)) {
+					/* state = CURRENT_STATE; */
+				} else if (c == '>') {
+					if (ret->name->size == endname->size &&
+					    simple_strncasecmp(ret->name->s, endname->s, endname->size) == 0) {
+						goto out_success;
+					} else {
+						/* not a match! */
+						printf("endname (%s) != element->name (%s)\n",
+						       endname->s, ret->name->s);
+						state = ST_CONTENT;
+						xml_string_clear(endname);
+					}
+				} else
+					goto out_inval_char;
+				break;
+		}
+	}
+	printf("ERROR: premature EOF (line %d)\n", ctx->lineno);
+	goto out_fail;
+
+out_inval_char:
+	printf("invalid char '%c' in state %d (line %d)\n",
+	       c, state, ctx->lineno);
+out_fail:
+	xml_free_element(ret);
+	xml_free_element(e);
+	free_xml_prop(p);
+	free_xml_string(propname);
+	free_xml_string(propval);
+	free_xml_string(endname);
+	return 0;
+
+out_success:
+	free_xml_string(propname);
+	free_xml_string(propval);
+	free_xml_string(endname);
+	cleanup_string(ret->content);
+	return ret;
+}
+
+int xml_parse_buffer(struct xml_buffer buffer, struct xml_element **ret)
+{
+	struct xml_element *root;
+	struct xml_element *e;
+	struct xml_context ctx;
+	char c;
+	int can_prolog = 1;
+
+	root = alloc_xml_element();
+	strcpy(root->name->s, "root");
+	if (!root)
+		return 1;
+	ctx.buf = buffer.text;
+	ctx.size = buffer.text_size;
+	ctx.pos = 0;
+	ctx.lineno = 1;
+
+	while (next_char(&ctx, &c)) {
+		if (simple_isspace(c))
+		continue;
+		else if (c == '<') {
+			if (!next_char(&ctx, &c))
+				goto out_premat_eof;
+			/* handle a prolog ("<?") */
+			if (c == '?' && can_prolog) {
+				prolog(&ctx);
+				continue;
+			}
+			can_prolog = 0;
+
+			/* handle a comment ("<!") */
+			if (c == '!') {
+				comment(&ctx);
+				continue;
+			}
+
+			e = parse_element(&ctx, c);
+			if (!e)
+				goto out_fail;
+			xml_element_append_child(root, e);
+		} else
+			goto out_inval_char;
+	}
+	//printf("bla");
+	*ret = root;
+	return 0;
+
+out_premat_eof:
+	printf("ERROR: premature EOF (line %d)\n", ctx.lineno);
+	goto out_fail;
+
+out_inval_char:
+	printf("invalid char '%c' in state top (line %d)\n",
+	       c, ctx.lineno);
+
+out_fail:
+	printf("out_fail\n");
+	xml_free_element(root);
+	return 1;
+} 
+
+struct xml_buffer  load_xml_file(char *source){
+	
+	FILE *p_InText;
+	struct xml_buffer buffer;
+	
+    	p_InText = fopen (source , "r");
+
+	if (p_InText == NULL)
+	{
+		 printf("Fehler beim lesen der Datei \n");
+		 exit(1);
+	} /*End If */
+
+	else
+	{
+		 fseek( p_InText, 0 , SEEK_END);
+		 buffer.text_size = ftell(p_InText);
+		 buffer.text =  (char*) malloc(sizeof(char)*buffer.text_size);
+		 rewind(p_InText);
+		 fread(buffer.text, 1, buffer.text_size, p_InText);
+		return buffer;
+	 } /* End else */
+	
+}
+
+
diff -urN linux.org/scripts/kconfig/xmlparser.h linux-2.6.13/scripts/kconfig/xmlparser.h
--- linux.org/scripts/kconfig/xmlparser.h	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/xmlparser.h	2005-09-13 17:52:59.000000000 +0200
@@ -0,0 +1,76 @@
+/***************************************************************************
+ *                                                                         *
+ *  Simple XML Parser.                                                     *
+ *     copyright (C)  Tim Hockin <thockin@hockin.org>                      *
+ *                                                                         *
+ *  Heavily modified by                                                    *
+ *     copyright (C) 2004, 2005  Michael Buesch <mbuesch@freenet.de>       *
+ *                                                                         *
+ * Released under the LGPL version 2.1 (http://www.gnu.org)                *
+ * This program is free software; you can redistribute it and/or modify    *
+ * it under the terms of the GNU Lesser General Public License version 2.1 *
+ * as published by the Free Software Foundation.                           *
+ *                                                                         *
+ ***************************************************************************/
+
+#ifndef PWMANAGER_DUMP_XMLPARSER_H_
+#define PWMANAGER_DUMP_XMLPARSER_H_
+
+#include <stddef.h>
+
+
+struct xml_string
+{
+	char *s;
+	size_t size;
+	/* internal: */
+	size_t _capacity;
+};
+
+struct xml_prop
+{
+	struct xml_string *name;
+	struct xml_string *value;
+
+	struct xml_prop *next;
+	struct xml_prop *prev;
+};
+
+struct xml_element
+{
+	struct xml_string *name;
+	struct xml_string *content;
+
+	struct xml_prop *first_prop;
+	struct xml_prop *last_prop;
+
+	struct xml_element *first_child;
+	struct xml_element *last_child;
+	struct xml_element *parent;
+	struct xml_element *next;
+	struct xml_element *prev;
+	char option_name[128];
+	int m_h_value;
+	int m_h_cnt;
+	int m_h_prior;
+};
+
+struct xml_buffer{
+	char *text;
+	size_t text_size;
+};
+
+int xml_parse_buffer(struct xml_buffer buffer, struct xml_element **ret);
+void xml_free_element(struct xml_element *e);
+
+struct xml_element* get_first_child(struct xml_element *parent);
+struct xml_element* get_next_node(struct xml_element *element);
+char * get_element_name(struct xml_element *element);
+char * get_element_content(struct xml_element *element);
+struct xml_prop *get_next_attribute( struct xml_element *element, struct xml_prop* attribute);
+char *get_attribute_name(struct xml_prop* attribute);
+char *get_attribute_value(struct xml_prop* attribute);
+struct xml_element *get_element_parent(struct xml_element *element);
+struct xml_buffer  load_xml_file(char *source);
+
+#endif /* PWMANAGER_DUMP_XMLPARSER_H_ */ 
diff -urN linux.org/scripts/kconfig/xmlutil.c linux-2.6.13/scripts/kconfig/xmlutil.c
--- linux.org/scripts/kconfig/xmlutil.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/xmlutil.c	2005-09-06 11:07:42.000000000 +0200
@@ -0,0 +1,105 @@
+#include "xmlutil.h"
+
+int simple_isupper(int c)
+{
+	return (c >= 'A' && c <= 'Z');
+}
+
+int simple_islower(int c)
+{
+	return (c >= 'a' && c <= 'z');
+}
+
+int simple_isalpha(int c)
+{
+	return (simple_isupper(c) || simple_islower(c));
+}
+
+int simple_isdigit(int c)
+{
+	return (c >= '0' && c <= '9');
+}
+
+int simple_isdigit_string(const char *s)
+{
+	while (*s) {
+		if (!simple_isdigit(*s))
+			return 0;
+		s++;
+	}
+	return 1;
+}
+
+int simple_isspace(int c)
+{
+	switch (c) {
+	case ' ':
+	case '\f':
+	case '\n':
+	case '\r':
+	case '\t':
+	case '\v':
+		return 1;
+	}
+	return 0;
+}
+
+int simple_tolower(int c)
+{
+	if (!simple_isupper(c))
+		return c;
+	return (c - 'A' + 'a');
+}
+
+int simple_toupper(int c)
+{
+	if (!simple_islower(c))
+		return c;
+	return (c - 'a' + 'A');
+}
+
+int simple_isxdigit(int c)
+{
+	if (simple_isdigit(c))
+		return 1;
+	if (c >= 'A' && c <= 'F')
+		return 1;
+	if (c >= 'a' && c <= 'f')
+		return 1;
+	return 0;
+}
+
+int simple_strcasecmp(const char *s1, const char *s2)
+{
+	unsigned char *c1, *c2;
+
+	c1 = (unsigned char *)s1;
+	c2 = (unsigned char *)s2;
+	while (*c1 && *c2 &&
+	       simple_tolower(*c1) == simple_tolower(*c2)) {
+		c1++;
+		c2++;
+	}
+
+	return *c1 - *c2;
+}
+
+int simple_strncasecmp(const char *s1, const char *s2, size_t n)
+{
+	unsigned char *c1, *c2;
+
+	if (n <= 0)
+		return 0;
+	c1 = (unsigned char *)s1;
+	c2 = (unsigned char *)s2;
+	while (*c1 && *c2 &&
+	       simple_tolower(*c1) == simple_tolower(*c2)) {
+		n--;
+		if (n <= 0)
+			return 0;
+		c1++;
+		c2++;
+	}
+
+	return *c1 - *c2;
+}
diff -urN linux.org/scripts/kconfig/xmlutil.h linux-2.6.13/scripts/kconfig/xmlutil.h
--- linux.org/scripts/kconfig/xmlutil.h	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.13/scripts/kconfig/xmlutil.h	2005-09-06 11:07:42.000000000 +0200
@@ -0,0 +1,18 @@
+#ifndef PWMANAGER_DUMP_STRINGCASE_H_
+#define PWMANAGER_DUMP_STRINGCASE_H_
+
+#include <stddef.h>
+
+int simple_isupper(int c);
+int simple_islower(int c);
+int simple_isalpha(int c);
+int simple_isdigit(int c);
+int simple_isdigit_string(const char *s);
+int simple_isspace(int c);
+int simple_tolower(int c);
+int simple_toupper(int c);
+int simple_isxdigit(int c);
+int simple_strcasecmp(const char *s1, const char *s2);
+int simple_strncasecmp(const char *s1, const char *s2, size_t n);
+
+#endif /* PWMANAGER_DUMP_STRINGCASE_H_ */

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15 20:58               ` Ahmad Reza Cheraghi
@ 2005-09-15 21:04                 ` Jesper Juhl
  0 siblings, 0 replies; 47+ messages in thread
From: Jesper Juhl @ 2005-09-15 21:04 UTC (permalink / raw)
  To: Ahmad Reza Cheraghi
  Cc: Daniel Thaler, Lee Revell, David Lang, Hua Zhong, marekw1977,
	linux-kernel

On 9/15/05, Ahmad Reza Cheraghi <a_r_cheraghi@yahoo.com> wrote:
> --- Daniel Thaler <thalerd@in.tum.de> wrote:
> 
> > Lee Revell wrote:
> > > Why does this have to be in the kernel again?
> > Isn't this exactly what
> > > you get with a fully modular config and hotplug?
> >
> > It doesn't go in the kernel. If I understand
> > correctly, it's a script that is
> > invoked by 'make autoconfig'. Note that I didn't
> > read the patch, because it's a
> > .tgz on a website and I couldn't be bothered to
> > download it.
> 
> Since im a new Bee, I didn't know that I patched
> shouldnt be tgz. So here is a new patch as URL and
> attachment.

Normally patches are just send inline in the email, as plain text.
This makes them easy to quote when you want to reply with feedback.


> The URL :
> www.energyparty.de/ahmad/autoconfig.patch
> 

Not Found
The requested URL /ahmad/autoconfig.patch was not found on this server.


-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15  9:56   ` Ahmad Reza Cheraghi
@ 2005-09-16  4:02     ` Chris White
  2005-09-16  7:12       ` Emmanuel Fleury
  0 siblings, 1 reply; 47+ messages in thread
From: Chris White @ 2005-09-16  4:02 UTC (permalink / raw)
  To: Ahmad Reza Cheraghi; +Cc: michal.k.k.piotrowski, LKML

[-- Attachment #1: Type: text/plain, Size: 857 bytes --]

On Thursday 15 September 2005 18:56, Ahmad Reza Cheraghi wrote:

> > How about networking options? It can detect what
> > protocols are needed?
> > Filesystems?
>
> The Network option or the Filesystes are choosen as a
> Standard. So it will be there without checking if they
> needed or not. Because I think Protocols like TCP-IP
> or Filesystems like NTFS or expt2 has to be installed
> on the now days Systems. But if they are any
> suggestion or ideas of detecting those thing. No
> problem just send me rule that does that and I will
> updated easily on the Framework.Thats the benefit of
> this Framework.;-)

Couldn't one pull up info from /etc/fstab for filesystems?  And if it was 
network mounts, the appropriate configuration file?  I wonder how viable that 
would be.  As far as network protocols, who knows...

Chris White

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-16  4:02     ` Chris White
@ 2005-09-16  7:12       ` Emmanuel Fleury
  0 siblings, 0 replies; 47+ messages in thread
From: Emmanuel Fleury @ 2005-09-16  7:12 UTC (permalink / raw)
  To: Linux Kernel ML

Chris White wrote:
> 
> Couldn't one pull up info from /etc/fstab for filesystems?  And if it was 
> network mounts, the appropriate configuration file?  I wonder how viable that 
> would be.  As far as network protocols, who knows...

I guess the /etc/mtab is more trustable. But, you not anymore speaking
about hardware detection here... I think that everything which is beyond
hardware detection is purely magic and shouldn't be trusted because for
one type of detection if it fit few users, it won't fit many.

And anyway, in the case you are considering, make oldconfig is probably
the one to use.

Regards
-- 
Emmanuel Fleury

I think there is a world market for maybe five computers.
  -- Thomas Watson, chairman of IBM, 1943

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-14 22:38 Ahmad Reza Cheraghi
  2005-09-14 22:53 ` Michal Piotrowski
  2005-09-15 11:21 ` Roman Zippel
@ 2005-09-16  8:11 ` Coywolf Qi Hunt
  2005-09-16  8:19   ` Emmanuel Fleury
  2 siblings, 1 reply; 47+ messages in thread
From: Coywolf Qi Hunt @ 2005-09-16  8:11 UTC (permalink / raw)
  To: Ahmad Reza Cheraghi; +Cc: linux-kernel

On 9/15/05, Ahmad Reza Cheraghi <a_r_cheraghi@yahoo.com> wrote:
> Hi
> 
> I wrote this Framework for making a .config based on
> the System Hardwares. It would be a great help if some
> people would give me their opinion about it.
> 
> Regards
> 
> A.R.Cheraghi
> 

How about the idea that we have a .hwconfig file and we do `make
hwconfig' to generate it? So normal filesystems and network stack
stuff don't belong to hwconfig.

.hwconfig file merely stores the result from auto hardware detection.
-- 
Coywolf Qi Hunt
http://sosdg.org/~coywolf/

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-16  8:11 ` Coywolf Qi Hunt
@ 2005-09-16  8:19   ` Emmanuel Fleury
  2005-09-16  8:32     ` Ahmad Reza Cheraghi
  0 siblings, 1 reply; 47+ messages in thread
From: Emmanuel Fleury @ 2005-09-16  8:19 UTC (permalink / raw)
  To: linux-kernel

Coywolf Qi Hunt wrote:
> 
> How about the idea that we have a .hwconfig file and we do `make
> hwconfig' to generate it? So normal filesystems and network stack
> stuff don't belong to hwconfig.
> 
> .hwconfig file merely stores the result from auto hardware detection.

Well, at the end you just want to have one .config file with everything
inside. If I follow your logic we also should have a .fsconfig, a
.netconfig, a .audioconfig, ... and so on.

So, working on the .config seems nice to me.

Simplicity is good ! ^_^

Regards
-- 
Emmanuel Fleury

A child of five could understand this. Fetch me a child of five.
  -- Groucho Marx

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-16  8:19   ` Emmanuel Fleury
@ 2005-09-16  8:32     ` Ahmad Reza Cheraghi
  2005-09-16  8:50       ` Emmanuel Fleury
  0 siblings, 1 reply; 47+ messages in thread
From: Ahmad Reza Cheraghi @ 2005-09-16  8:32 UTC (permalink / raw)
  To: Emmanuel Fleury, linux-kernel



--- Emmanuel Fleury <fleury@cs.aau.dk> wrote:

> Coywolf Qi Hunt wrote:
> > 
> > How about the idea that we have a .hwconfig file
> and we do `make
> > hwconfig' to generate it? So normal filesystems
> and network stack
> > stuff don't belong to hwconfig.
> > 
> > .hwconfig file merely stores the result from auto
> hardware detection.
> 
> Well, at the end you just want to have one .config
> file with everything
> inside. If I follow your logic we also should have a
> .fsconfig, a
> .netconfig, a .audioconfig, ... and so on.
> 
> So, working on the .config seems nice to me.
> 
> Simplicity is good ! ^_^
> 
Yes thats true. It will be a hard also, for those
Users which doesn't have that much experience for the
configuration of a Kernel.


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-16  8:32     ` Ahmad Reza Cheraghi
@ 2005-09-16  8:50       ` Emmanuel Fleury
  2005-09-16  9:19         ` Ahmad Reza Cheraghi
  0 siblings, 1 reply; 47+ messages in thread
From: Emmanuel Fleury @ 2005-09-16  8:50 UTC (permalink / raw)
  To: linux-kernel

Ahmad, as far as I understood, your spirit is more or less to:

- Drop automagically all the hardware which is for sure NOT here
- Propose to the user to include the hardware which is detected
- Leave as default the rest of the choices
  (i.e. the choices that might be uncertain: fs, protocols, ...)

Therefore, "make autoconfig" is a quick first run through the .config
with the help of all the scripts stored in scripts/autoconfig/.

Regards
-- 
Emmanuel Fleury

Step #1 in programming: understand people.
  -- Linus Torvalds

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-16  8:50       ` Emmanuel Fleury
@ 2005-09-16  9:19         ` Ahmad Reza Cheraghi
  0 siblings, 0 replies; 47+ messages in thread
From: Ahmad Reza Cheraghi @ 2005-09-16  9:19 UTC (permalink / raw)
  To: Emmanuel Fleury, linux-kernel



--- Emmanuel Fleury <fleury@cs.aau.dk> wrote:

> Ahmad, as far as I understood, your spirit is more
> or less to:
> 
> - Drop automagically all the hardware which is for
> sure NOT here
> - Propose to the user to include the hardware which
> is detected
> - Leave as default the rest of the choices
>   (i.e. the choices that might be uncertain: fs,
> protocols, ...)
> 
> Therefore, "make autoconfig" is a quick first run
> through the .config
> with the help of all the scripts stored in
> scripts/autoconfig/.
> 

Yes your right about that.
But I want to tell why I came to this Idea of doing
that. As I was trying to configurate a Kernel for the
first time but without any success. Then I thought
about it, why this cannot be automatically.

So for the first thought, my spirit of doing this, was
for those who doesn't know e.g. what the option
"Enable loadable module support" means and if they
have to choose that or not. But right now I know that
it is not possible to do all the things
automatically(like the filesystem, Protokolls...). And
that is the reason why I make a Framework, so
everybody(I mean the experts) can give theire
suggestion what isthe best way to answering, a optione
like mention above comes, automatically. So if someone
wants to use a new kernel didn't end up desperate and
regrated using Linux(a new Kernel).

Regards

Ahmad Reza

 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-14 22:53 ` Michal Piotrowski
  2005-09-14 23:49   ` Daniel Thaler
  2005-09-15  9:56   ` Ahmad Reza Cheraghi
@ 2005-09-16 17:38   ` Pavel Machek
  2005-09-16 17:50     ` Enrico Weigelt
  2 siblings, 1 reply; 47+ messages in thread
From: Pavel Machek @ 2005-09-16 17:38 UTC (permalink / raw)
  To: Michal Piotrowski; +Cc: Ahmad Reza Cheraghi, LKML

Hi!

> > I wrote this Framework for making a .config based on
> > the System Hardwares. It would be a great help if some
> > people would give me their opinion about it.
> > 
> > Regards
> 
> It's for new linux users? They should use distributions kernels.
> It's for "power users"? They just do make menuconfig...
> It's for kernel developers? They just do vi .config.

Actually its "emacs .config" :-). But tool to help would be nice. For
development, minimum config is nice (compiles fast), and creating
config from scratch is quite painfull.
								Pavel

-- 
if you have sharp zaurus hardware you don't need... you know my address

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-16 17:38   ` Pavel Machek
@ 2005-09-16 17:50     ` Enrico Weigelt
  0 siblings, 0 replies; 47+ messages in thread
From: Enrico Weigelt @ 2005-09-16 17:50 UTC (permalink / raw)
  To: linux kernel list

* Pavel Machek <pavel@ucw.cz> wrote:

<snip>
> > It's for new linux users? They should use distributions kernels.
> > It's for "power users"? They just do make menuconfig...
> > It's for kernel developers? They just do vi .config.
> 
> Actually its "emacs .config" :-). But tool to help would be nice. For
> development, minimum config is nice (compiles fast), and creating
> config from scratch is quite painfull.

Yeah, I'd like to see it.

I often have to set of machines with very different hardware.
Of course such a autoconfig system cannot be perfect, but it can
be a great help for getting at least sub-optimal values and later
let the user do fine-tuning.


cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service

  phone:     +49 36207 519931         www:       http://www.metux.de/
  fax:       +49 36207 519932         email:     contact@metux.de
  cellphone: +49 174 7066481
---------------------------------------------------------------------
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
---------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-15 12:01   ` Emmanuel Fleury
  2005-09-15 13:02     ` Ahmad Reza Cheraghi
  2005-09-15 13:03     ` Ahmad Reza Cheraghi
@ 2005-09-17  1:27     ` Roman Zippel
  2 siblings, 0 replies; 47+ messages in thread
From: Roman Zippel @ 2005-09-17  1:27 UTC (permalink / raw)
  To: Emmanuel Fleury; +Cc: linux-kernel

Hi,

On Thu, 15 Sep 2005, Emmanuel Fleury wrote:

> Why not directly having a direct reference to the name of the script ?
> 
> config FOO
> 	bool "foo"
> 	auto "detect-foo-script"
> 
> Where you have a specific directory in scripts/autoconfig/ where you
> store the scripts. Each script output y, n or m.

Unless there is an example, which really needs this, I don't think this is 
a good idea. Mainly because I don't like the idea of running random 
scripts during the config process, I prefer to keep this a little under 
control.

> This scheme seems much simpler to me (and yet not restrictive at all).
> Of course, each script might have to ask few questions to the user as:
> Do you want this FOO support ? [y/m/n]:

This will almost certainly not happen. The autoconfig rules would also be 
useful in the graphical config front ends and something like this would 
prevent it.

bye, Roman

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Automatic Configuration of a Kernel
@ 2005-09-26 12:08 Ahmad Reza Cheraghi
  2005-09-26 13:57 ` Michal Piotrowski
                   ` (2 more replies)
  0 siblings, 3 replies; 47+ messages in thread
From: Ahmad Reza Cheraghi @ 2005-09-26 12:08 UTC (permalink / raw)
  To: linux-kernel

Hi folks,

For my EndThesis, in the Niederrhein University of
Applied Sciences, I've almost finished a framework
that generates a .config file based on the target
system.This program should help people to generate a
linux kernel Config without spending a lot of time at
the configuration.

The basic idea of the framework is, that you can
specify in the Kconfig files a script which
auto-detect if the hardware involved in this option is
present or not (the script reply 'y' or 'n'). It's up
to the interface to choose what to do with the answer.

This framework is now in its test stage. It works on
my Acer Laptop(TM291LMI with Pentium M and Radeon
9700). That means, that the framework is functional
but additional scripts have to be written for other
type
of hardware/functionality (far away from completed).

The code of this framework has been splitted into six
patches (to be posted following to this mail):
- conf.c and expr.h
- parser
- makefile
- rules
- kconfigs
- documentation

To try it, just patch a 2.6.13 kernel with the patches
following this
mail and set the scripts as follow: chmod u+rwx
scripts/kconfig/rules/*
Then, just type: 'make autoconfig' or 'make
autochoiceconfig'.

The 'autoconfig' will detect your hardware and
automatically include in the kernel whatever hardware
is detected. The 'autochoiceconfig' will let you
choose to include the feature or not when a hardware
is detected.

Any comments and suggestions are welcome !


Regards
Ahmad Reza Cheraghi





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-26 12:08 Automatic Configuration of a Kernel Ahmad Reza Cheraghi
@ 2005-09-26 13:57 ` Michal Piotrowski
  2005-09-26 14:06 ` Michal Piotrowski
  2005-09-27  8:05 ` Coywolf Qi Hunt
  2 siblings, 0 replies; 47+ messages in thread
From: Michal Piotrowski @ 2005-09-26 13:57 UTC (permalink / raw)
  To: Ahmad Reza Cheraghi; +Cc: linux-kernel

Hi,

Ahmad Reza Cheraghi wrote:
> Hi folks,
>
> For my EndThesis, in the Niederrhein University of
> Applied Sciences, I've almost finished a framework
> that generates a .config file based on the target
> system.This program should help people to generate a
> linux kernel Config without spending a lot of time at
> the configuration.
>   
[snip]
> Any comments and suggestions are welcome !
>
>
> Regards
> Ahmad Reza Cheraghi
>   
Can you put this patch set on any server?
I know it's probably my thunderbird problem, but when I'm tring
to apply your patches I've got:
patch: **** malformed patch at line 38: 128);

Regards,
Michal Piotrowski

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-26 12:08 Automatic Configuration of a Kernel Ahmad Reza Cheraghi
  2005-09-26 13:57 ` Michal Piotrowski
@ 2005-09-26 14:06 ` Michal Piotrowski
  2005-09-27  8:05 ` Coywolf Qi Hunt
  2 siblings, 0 replies; 47+ messages in thread
From: Michal Piotrowski @ 2005-09-26 14:06 UTC (permalink / raw)
  To: Ahmad Reza Cheraghi; +Cc: linux-kernel

Ahmad Reza Cheraghi wrote:
> Hi folks,
>
> For my EndThesis, in the Niederrhein University of
> Applied Sciences, I've almost finished a framework
> that generates a .config file based on the target
> system.This program should help people to generate a
> linux kernel Config without spending a lot of time at
> the configuration.
[snip]

> Any comments and suggestions are welcome !
Unfortunately your patches are wordwraped.

Regards,
Michal Piotrowski

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-26 12:08 Automatic Configuration of a Kernel Ahmad Reza Cheraghi
  2005-09-26 13:57 ` Michal Piotrowski
  2005-09-26 14:06 ` Michal Piotrowski
@ 2005-09-27  8:05 ` Coywolf Qi Hunt
  2005-09-27  8:11   ` Emmanuel Fleury
  2 siblings, 1 reply; 47+ messages in thread
From: Coywolf Qi Hunt @ 2005-09-27  8:05 UTC (permalink / raw)
  To: Ahmad Reza Cheraghi; +Cc: linux-kernel

On 9/26/05, Ahmad Reza Cheraghi <a_r_cheraghi@yahoo.com> wrote:
> Hi folks,
>
> For my EndThesis, in the Niederrhein University of
> Applied Sciences, I've almost finished a framework
> that generates a .config file based on the target
> system.This program should help people to generate a
> linux kernel Config without spending a lot of time at
> the configuration.
>
> The basic idea of the framework is, that you can
> specify in the Kconfig files a script which
> auto-detect if the hardware involved in this option is
> present or not (the script reply 'y' or 'n'). It's up

Consider also 'm'odule support?
--
Coywolf Qi Hunt
http://sosdg.org/~coywolf/

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: Automatic Configuration of a Kernel
  2005-09-27  8:05 ` Coywolf Qi Hunt
@ 2005-09-27  8:11   ` Emmanuel Fleury
  0 siblings, 0 replies; 47+ messages in thread
From: Emmanuel Fleury @ 2005-09-27  8:11 UTC (permalink / raw)
  To: linux-kernel

Coywolf Qi Hunt wrote:
> 
> Consider also 'm'odule support?

I think the point of a script is just to detect if the piece of hardware
is here or not ('y' or 'n'). Then, it's up to the interface to decide
what question to ask to the user (could be always 'y', could be always
'm', could ask the user for a 'm/y/n' answer, ...).

But the patches that Ahmad sent have been spoiled by his mailer, I think
he will resend it today (maybe creating a fresh thread would be a good
idea).

Regards
-- 
Emmanuel Fleury

I can resist everything except temptation.
  -- Oscar Wilde

^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2005-09-27  8:13 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-26 12:08 Automatic Configuration of a Kernel Ahmad Reza Cheraghi
2005-09-26 13:57 ` Michal Piotrowski
2005-09-26 14:06 ` Michal Piotrowski
2005-09-27  8:05 ` Coywolf Qi Hunt
2005-09-27  8:11   ` Emmanuel Fleury
  -- strict thread matches above, loose matches on Subject: below --
2005-09-14 22:38 Ahmad Reza Cheraghi
2005-09-14 22:53 ` Michal Piotrowski
2005-09-14 23:49   ` Daniel Thaler
2005-09-15  0:09     ` Marek W
2005-09-15  0:37       ` Hua Zhong
2005-09-15  2:03         ` David Lang
2005-09-15  3:04           ` Lee Revell
2005-09-15  3:37             ` Daniel Thaler
2005-09-15  4:16               ` Lee Revell
2005-09-15  8:12                 ` Ahmad Reza Cheraghi
2005-09-15 11:20                   ` Masoud Sharbiani
2005-09-15 20:58               ` Ahmad Reza Cheraghi
2005-09-15 21:04                 ` Jesper Juhl
2005-09-15  4:18             ` Marek W
2005-09-15  6:18               ` Valdis.Kletnieks
2005-09-15  7:33                 ` Marek W
2005-09-15  9:48                   ` Ahmad Reza Cheraghi
2005-09-15 10:44                 ` David Lang
2005-09-15 10:26             ` David Lang
2005-09-15 14:58               ` Nix
2005-09-15 17:08                 ` David Lang
2005-09-15 20:36                 ` Valdis.Kletnieks
2005-09-15 20:50                   ` Nix
2005-09-15  8:53       ` Chris White
2005-09-15  7:58         ` Ahmad Reza Cheraghi
2005-09-15  9:12     ` Emmanuel Fleury
2005-09-15  9:56   ` Ahmad Reza Cheraghi
2005-09-16  4:02     ` Chris White
2005-09-16  7:12       ` Emmanuel Fleury
2005-09-16 17:38   ` Pavel Machek
2005-09-16 17:50     ` Enrico Weigelt
2005-09-15 11:21 ` Roman Zippel
2005-09-15 12:01   ` Emmanuel Fleury
2005-09-15 13:02     ` Ahmad Reza Cheraghi
2005-09-15 13:28       ` Emmanuel Fleury
2005-09-15 13:03     ` Ahmad Reza Cheraghi
2005-09-17  1:27     ` Roman Zippel
2005-09-16  8:11 ` Coywolf Qi Hunt
2005-09-16  8:19   ` Emmanuel Fleury
2005-09-16  8:32     ` Ahmad Reza Cheraghi
2005-09-16  8:50       ` Emmanuel Fleury
2005-09-16  9:19         ` Ahmad Reza Cheraghi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox