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");
default:
print($inline);
} // switch
}; // while
?>
Nevertheless when I try to start building make again asks me for options
which it should know, as I presume. How it works?
Regards,
Piotr Hosowicz
--
"Chcemy waszego dobra!" - powiedział lider
socjaldemokratów. Zaniepokojeni obywatele
zaczeli ukrywać swoje dobra w bezpiecznych
miejscach.
NP: Lenny Kravitz - Is there any love in your heart
NB: 2.6.34-rc2-git3
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html