aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-11-10 15:22:53 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-11-10 15:22:53 +0000
commit155a71a77479f5b50ac62a0209ed97aee4fd7eb2 (patch)
tree27d82db7aa46c639e6ed3140ca3a6c73068c8a23 /scripts
parenteef07b88585df56b07d4c8a6eeba4112f007f68d (diff)
downloadupstream-155a71a77479f5b50ac62a0209ed97aee4fd7eb2.tar.gz
upstream-155a71a77479f5b50ac62a0209ed97aee4fd7eb2.tar.bz2
upstream-155a71a77479f5b50ac62a0209ed97aee4fd7eb2.zip
add config symbols for the kernel version
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9520 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/metadata.pl19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index 914b5127b4..2898289bcc 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -173,6 +173,13 @@ sub target_name($) {
}
}
+sub kver($) {
+ my $v = shift;
+ $v =~ tr/\./_/;
+ $v =~ /(\d+_\d+_\d+)(_\d+)?/ and $v = $1;
+ return $v;
+}
+
sub print_target($) {
my $target = shift;
my $features = target_config_features(@{$target->{features}});
@@ -190,10 +197,12 @@ sub print_target($) {
undef $help;
}
+ my $v = kver($target->{version});
$confstr = <<EOF;
config TARGET_$target->{conf}
bool "$target->{name}"
select LINUX_$kernel
+ select LINUX_$v
EOF
if ($target->{subtarget}) {
$confstr .= "\tdepends TARGET_$target->{boardconf}\n";
@@ -296,6 +305,16 @@ EOF
$target->{subtarget} or print "\t\tdefault \"".$target->{board}."\" if TARGET_".$target->{conf}."\n";
}
+ my %kver;
+ foreach my $target (@target) {
+ my $v = kver($target->{version});
+ next if $kver{$v};
+ $kver{$v} = 1;
+ print <<EOF;
+config LINUX_$v
+ bool
+EOF
+ }
}
my %dep_check;