add config symbols for the kernel version
SVN-Revision: 9520
This commit is contained in:
parent
1423753198
commit
6e03b9ce43
2 changed files with 23 additions and 0 deletions
4
rules.mk
4
rules.mk
|
@ -138,6 +138,10 @@ $(call shvar,$(1))=$$(call $(1))
|
||||||
export $(call shvar,$(1))
|
export $(call shvar,$(1))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define confvar
|
||||||
|
$(foreach v,$(1),$(if $($(v)),y,n))
|
||||||
|
endef
|
||||||
|
|
||||||
# file extension
|
# file extension
|
||||||
ext=$(word $(words $(subst ., ,$(1))),$(subst ., ,$(1)))
|
ext=$(word $(words $(subst ., ,$(1))),$(subst ., ,$(1)))
|
||||||
|
|
||||||
|
|
|
@ -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($) {
|
sub print_target($) {
|
||||||
my $target = shift;
|
my $target = shift;
|
||||||
my $features = target_config_features(@{$target->{features}});
|
my $features = target_config_features(@{$target->{features}});
|
||||||
|
@ -190,10 +197,12 @@ sub print_target($) {
|
||||||
undef $help;
|
undef $help;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $v = kver($target->{version});
|
||||||
$confstr = <<EOF;
|
$confstr = <<EOF;
|
||||||
config TARGET_$target->{conf}
|
config TARGET_$target->{conf}
|
||||||
bool "$target->{name}"
|
bool "$target->{name}"
|
||||||
select LINUX_$kernel
|
select LINUX_$kernel
|
||||||
|
select LINUX_$v
|
||||||
EOF
|
EOF
|
||||||
if ($target->{subtarget}) {
|
if ($target->{subtarget}) {
|
||||||
$confstr .= "\tdepends TARGET_$target->{boardconf}\n";
|
$confstr .= "\tdepends TARGET_$target->{boardconf}\n";
|
||||||
|
@ -296,6 +305,16 @@ EOF
|
||||||
$target->{subtarget} or print "\t\tdefault \"".$target->{board}."\" if TARGET_".$target->{conf}."\n";
|
$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;
|
my %dep_check;
|
||||||
|
|
Loading…
Reference in a new issue