diff options
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-x | v4l/scripts/make_kconfig.pl | 51 | ||||
-rwxr-xr-x | v4l/scripts/make_makefile.pl | 9 | ||||
-rwxr-xr-x | v4l/scripts/make_noconfig.pl | 6 |
3 files changed, 52 insertions, 14 deletions
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index b1d6f5d53..aebf2a950 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -4,8 +4,27 @@ use FileHandle; my %depend = (); my %minver = (); my %config = (); +my %tristate = (); my $version, $level, $sublevel; +my $force_kconfig=shift; + +sub add_bool($) +{ + my $arg=shift; + + $tristate{$arg}="bool"; +# printf "Boolean:%s\n",$arg; +} + +sub add_tristate($) +{ + my $arg=shift; + + $tristate{$arg}="tristate"; +# printf "Tristate:%s\n",$arg; +} + sub add_config($) { my $arg=shift; @@ -34,6 +53,7 @@ sub open_kconfig($$) { my ($dir,$file)=@_; my $in = new FileHandle; my $skip=0; + my $key; #print "opening $file\n"; open $in,"$file"; @@ -51,9 +71,14 @@ sub open_kconfig($$) { if (m|^\s+select (.*)\n|) { check_deps ($1); } + if (m|^\s*bool\s+|) { + add_bool($key); + } + if (m|^\s*tristate\s+|) { + add_tristate($key); + } if (m|^\s*config (.*)\n|) { - my $key=$1; - + $key=$1; add_config ($1); my $min=$minver { $key }; @@ -129,7 +154,6 @@ print OUT "mainmenu \"V4L/DVB menu\"\n"; print OUT "source Kconfig.kern\n"; open_kconfig ("../linux","../linux/drivers/media/Kconfig"); - close OUT; while ( my ($key, $value) = each(%config) ) { @@ -139,9 +163,30 @@ while ( my ($key, $value) = each(%config) ) { open OUT,">Kconfig.kern"; print OUT "config MODULES\n\tboolean\n\tdefault y\n\n"; +$tristate{"MODULES"}="bool"; while ( my ($key, $value) = each(%depend) ) { print OUT "# $key with $value refs\nconfig $key\n\ttristate\n\tdefault m\n\n"; } close OUT; +if (($force_kconfig eq 1) || !open IN,".config") { + open OUT,">.config"; + while ( my ($key, $value) = each(%depend) ) { + printf "CONFIG_%s=m\n",$key; + printf OUT "CONFIG_%s=m\n",$key; + } + while ( my ($key,$value) = each(%tristate) ) { + + if ($key eq "DVB_AV7110_FIRMWARE") { + printf OUT "CONFIG_%s=n\n",$key; + } else { + if ($value eq "tristate") { + printf OUT "CONFIG_%s=m\n",$key; + } else { + printf OUT "CONFIG_%s=y\n",$key; + } + } + } + close OUT; +} diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl index 8371f6a4a..238c5082f 100755 --- a/v4l/scripts/make_makefile.pl +++ b/v4l/scripts/make_makefile.pl @@ -113,8 +113,9 @@ open OUT,">Makefile.media"; open_makefile ("../linux/drivers/media/Makefile"); # Creating Install rule -printf OUT "install::\n"; -#printf OUT "\t@strip --strip-debug \$(inst-m)\n\n"; +printf OUT "media-install::\n"; +printf OUT "\t\@echo \"Stripping debug info from files:\"\n"; +printf OUT "\t\@strip --strip-debug \$(inst-m)\n\n"; while ( my ($key, $value) = each(%instdir) ) { printf OUT "\t\@echo -e \"\\nInstalling \$(KDIR26)/$key files:\"\n"; @@ -127,7 +128,7 @@ while ( my ($key, $value) = each(%instdir) ) { printf OUT "\t/sbin/depmod -a \${KERNELRELEASE}\n\n"; # Creating Remove rule -printf OUT "remove rminstall::\n"; +printf OUT "media-rminstall::\n"; printf OUT "\t\@echo -e \"\\nRemoving old \$(DEST) files\\n\"\n"; while ( my ($key, $value) = each(%instdir) ) { @@ -160,5 +161,3 @@ if (open OUT,".myconfig") { } else { system "make allmodconfig"; } - - diff --git a/v4l/scripts/make_noconfig.pl b/v4l/scripts/make_noconfig.pl index a47ca4acf..a81e157e2 100755 --- a/v4l/scripts/make_noconfig.pl +++ b/v4l/scripts/make_noconfig.pl @@ -31,9 +31,6 @@ while (<IN>) { } s/\n//; - if (m/DVB_AV7110_FIRMWARE/) { - next; - } if (m/DVB_AV7110_FIRMWARE_FILE/) { next; } @@ -55,9 +52,6 @@ close IN; open OUT,">.myconfig"; while ( my ($key, $value) = each(%config) ) { - if ($value eq "y") { - $value="m"; - } printf OUT "%-44s := %s\n",$key,$value; } close OUT; |