From: Piotr Hosowicz <piotr@hosowicz.com>
To: piotr@hosowicz.com
Cc: Randy Dunlap <rdunlap@xenotime.net>, linux-kbuild@vger.kernel.org
Subject: Re: Maybe my frequent kernel building could be of some help to the community? And how to build?
Date: Sat, 27 Mar 2010 17:39:10 +0100 [thread overview]
Message-ID: <4BAE34AE.3080507@example.com> (raw)
In-Reply-To: <4BAE342D.1040306@example.com>
Piotr Hosowicz wrote:
> Piotr Hosowicz wrote:
>> Piotr Hosowicz wrote:
>>
>>>> It's working for me just be using
>>>> yes '' | make oldconfig
>>>
>>> Ok, it seems to be working now, but I do not understand why my
>>> version doesn't.
>>
>> I became so desperate with the fact that I do not understand why my
>> version does not work as expected and with the fact that I am not a
>> Python nor perl nor bash hacker I begun to write the randomizer in
>> plain old php5-cli. Wow, .. how lame you'd say. ;-) It's possible that
>> I will write all thing in it.
>
> Ok. That's all, I give up. I do not understand how this fscking thing
> works. I do make mrproper inside, then either gzip -cd /proc/config.gz >
> ./.config followed by make oldconfig or make defconfig and then I
> execute the following script:
>
> #!/usr/bin/php
> <?
>
> function yesno(){
> $x = rand();
> if ($x<getrandmax()/2){ return true; }else{ return false; }
> }
>
> function enable_or_not($atoken){
> if (yesno()){
> switch ($atoken){
> case "CONFIG_NET":
> $netenabled = true;
> print("CONFIG_NET=y\n");
> break;
> case "CONFIG_INET":
> if (yesno() and $netenabled){
> print("CONFIG_INET=y\n");
> }else print("# CONFIG_INET is not set\n");
> break;
> default:
> print($atoken."=y\n");
> }
> }else{
> print("# ".$atoken." is not set\n");
> }
> }
>
> $stdin = fopen("php://stdin", "r");
> while ($inline = fgets($stdin)){
> $m = preg_match("/^(CONFIG_\w+)=([y|n])$/", $inline, $matches);
> if ($m){
> $option = $matches[1];
> }else{
> $m = preg_match("/^# (CONFIG_\w+) is not set$/", $inline,
> $matches);
> if ($m) { $option = $matches[1]; }else{ $option = false; };
> };
> switch ($option){
> case "CONFIG_MODULES":
> print "CONFIG_MODULES=y";
> break;
> case "CONFIG_NET":
> enable_or_not("CONFIG_NET");
> break;
> case "CONFIG_INET":
> enable_or_not("CONFIG_INET");
> break;
> case "CONFIG_SMP":
> enable_or_not("CONFIG_SMP");
> break;
> case "CONFIG_SYSFS":
> enable_or_not("CONFIG_SYSFS");
> break;
> case "CONFIG_PROC_FS":
> enable_or_not("CONFIG_PROC_FS");
> break;
> case "CONFIG_PM":
> enable_or_not("CONFIG_PM");
> break;
> case "CONFIG_PCI":
> enable_or_not("CONFIG_PCI");
> case "CONFIG_BLOCK":
> enable_or_not("CONFIG_BLOCK");
> case "CONFIG_HOTPLUG":
> enable_or_not("CONFIG_HOTPLUG");
Sorry, 3 * break; should go where appropriate, I noticed it just now.
Regards,
Piotr Hosowicz
--
Demokracja to kult szakali wyznawany przez osły (Henry Louis Mencken)
NP: Lenny Kravitz - Let love rule
NB: 2.6.34-rc2-git3
next prev parent reply other threads:[~2010-03-27 16:39 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-16 19:02 Maybe my frequent kernel building could be of some help to the community? And how to build? Piotr Hosowicz
2010-03-16 19:24 ` Randy Dunlap
2010-03-16 19:33 ` Piotr Hosowicz
2010-03-16 19:42 ` Randy Dunlap
2010-03-17 3:24 ` Piotr Hosowicz
2010-03-17 15:07 ` Randy Dunlap
[not found] ` <4BA0F8DE.1050006@example.com>
2010-03-17 15:54 ` Randy Dunlap
2010-03-17 16:03 ` Piotr Hosowicz
2010-03-17 17:49 ` Piotr Hosowicz
2010-03-17 17:53 ` Randy Dunlap
2010-03-18 15:40 ` Randy Dunlap
2010-03-22 3:31 ` Piotr Hosowicz
2010-03-22 3:48 ` Randy Dunlap
2010-03-22 12:42 ` Piotr Hosowicz
2010-03-22 12:53 ` Piotr Hosowicz
2010-03-24 1:12 ` Piotr Hosowicz
2010-03-24 21:43 ` Randy Dunlap
2010-03-25 11:38 ` Piotr Hosowicz
2010-03-25 17:29 ` Randy Dunlap
2010-03-25 17:37 ` Piotr Hosowicz
2010-03-25 17:40 ` Randy Dunlap
2010-03-25 17:48 ` Piotr Hosowicz
2010-03-25 17:54 ` Randy Dunlap
2010-03-25 18:35 ` Piotr Hosowicz
2010-03-25 22:04 ` Randy Dunlap
2010-03-25 22:15 ` Piotr Hosowicz
2010-03-26 16:46 ` Piotr Hosowicz
2010-03-27 16:37 ` Piotr Hosowicz
2010-03-27 16:39 ` Piotr Hosowicz [this message]
2010-04-01 16:02 ` Randy Dunlap
2010-04-01 17:24 ` Piotr Hosowicz
2010-04-01 17:44 ` Piotr Hosowicz
2010-03-29 20:16 ` Is root kernel parameter expected to be the first one or something? Piotr Hosowicz
2010-03-29 20:38 ` Randy Dunlap
2010-03-29 20:41 ` Piotr Hosowicz
2010-03-29 21:33 ` Randy Dunlap
2010-03-29 22:32 ` Piotr Hosowicz
2010-03-29 22:39 ` Randy Dunlap
2010-03-29 22:44 ` Piotr Hosowicz
2010-03-29 22:48 ` Randy Dunlap
2010-03-29 22:55 ` Piotr Hosowicz
2010-03-29 23:06 ` Randy Dunlap
2010-03-29 23:44 ` Piotr Hosowicz
2010-03-30 16:37 ` Piotr Hosowicz
2010-03-30 18:03 ` Piotr Hosowicz
2010-03-30 19:00 ` Piotr Hosowicz
2010-03-31 9:15 ` Piotr Hosowicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BAE34AE.3080507@example.com \
--to=piotr@hosowicz.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).