Re: Maybe my frequent kernel building could be of some help to the community? And how to build?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
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

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux