lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <88652ca70808032203t39eef690of589bdef15dc2618@mail.gmail.com>
Date:	Sun, 3 Aug 2008 22:03:35 -0700
From:	"Bob van Manen" <bobm75@...il.com>
To:	"Satish Eerpini" <eerpini@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Kernel Installer

Hi Satish,

I don't know much about the kernel build process, so I don't know
whether it would work or not.

But you could try running make with the -n option first to see the
commands that are going to be executed.  That way you can figure out
how many files are going to be compiled.

I hope that works for you.

Regards,

bob

On Sun, Aug 3, 2008 at 1:50 PM, Satish Eerpini <eerpini@...il.com> wrote:
> Hello everyone , :
>
> i have been writing a kernel installer which may make the kernel
> installation process a lot more easier for noobs , (don ask me why
> noobs would like to compile a kernel) ,  but atleast till they learn
> to do it the good way !
>
> i have written some code which is below , well i am stuck at one thing , ...
> once the .config file is set , is there any method to compute the
> exact no of files that are going to be compiled ??
> lack of this knowledge is clearly visible in the use of a "while(1)"
> in the code below :
>
>
>
>
> #include <stdio.h>
>
>
> int main(int argc, char * argv[]) {
>
>    char buf[100],syscommand[100];
>    FILE *fp;
>    int i=0,j=0,k=0,l=0;
>    int checking_done=0;
>    strcpy(buf,"\0");
>
>    fflush(stdout);
>
>    strcpy(syscommand,"make -C ");
>    if(argc==2){
>        strcat(syscommand,argv[1]);
>    }
>    else{
>
>        printf("The program accepts the kernel source \n directory as
> the single argument.\n Please provide necessary arguments\n");
>        return ;
>    }
>
>
>
>    printf("\n\n\t\t\t\t\t\t Kernel Installer V1.0\n\n ");
>
>
>    fp= popen(syscommand,"r");
>    do{
>
>        fscanf(fp,"%s",buf);
>
>            if(checking_done!=1){
>
>                if(strcmp(buf,"CHK")==0){
>                    fscanf(fp,"%s",buf);
>                        printf("\rChecking file : %-30s\t\n",buf);
>
>
>                }
>                if(strcmp(buf,"CALL")==0){
>                    fscanf(fp,"%s",buf);
>
>                    printf("\rCalling script : %s\t\n",buf);
>
>                }
>            }
>
>            if(strcmp(buf,"LD")==0){
>                fscanf(fp,"%s",buf);
>
>
>                printf("\rLinking File : %s\t",buf);
>                l++;
>                checking_done=1;
>
>            }
>
>            if(strcmp(buf,"CC")==0){
>                fscanf(fp,"%s",buf);
>                if(strcmp(buf,"[M]")==0){
>                    fscanf(fp,"%s",buf);
>                    printf("\rCompiling module (%-4d files, %-4d
> modules compiled): %-60s\t",i,l,buf);
>                    l++;
>                }
>                else
>                    printf("\rCompiling        (%-4d files, %-4d
> modules compiled) : %-60s\t",i,l,buf);
>                i++;
>
>                switch(i%4){
>                    case 0:
>                        printf(" | ");
>                        break;
>                    case 1:
>                        printf(" / ");
>                        break;
>                    case 2:
>                        printf(" - ");
>                        break;
>                    case 3:
>                        printf(" \\ ");
>                        break;
>                }
>                for(k=0;k<j;k++)
>                    printf("=");
>                printf(">");
>
>                if((i%100)==0 && i!=0){
>                    j++;
>                }
>
>                checking_done=1;
>
>            }
>        fflush(stdout);
>        }while(1);
>    pclose(fp);
>
>    return 0;
>
> }
>
> there is some more work that i remain to add, like being able to start
> from the kernel source , that is just provide the path to the archive
> and it does everything else and so on ,
> but for now i am stuck here !
>
> Thanks
> Satish
>
> --
> http://satish.playdrupal.com
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ