aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2019-04-27 19:13:07 +0200
committerFelix Fietkau <nbd@nbd.name>2019-05-11 11:37:10 +0200
commit85017c40f4efce11edd77e0caac14aed0fd690eb (patch)
tree016be4bb6f80dcc9ef001a1c95424b8f3fba4cea /scripts
parent9cb3a3255e024183a2e179fe6621cd11fa6b8670 (diff)
downloadupstream-85017c40f4efce11edd77e0caac14aed0fd690eb.tar.gz
upstream-85017c40f4efce11edd77e0caac14aed0fd690eb.tar.bz2
upstream-85017c40f4efce11edd77e0caac14aed0fd690eb.zip
build: add a config option for enabling a testing version of the target kernel
If the target supports a newer kernel version that is not used by default yet, it can be enabled with this option Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/metadata.pm1
-rwxr-xr-xscripts/target-metadata.pl17
2 files changed, 13 insertions, 5 deletions
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index a338b8caad..d088332152 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -131,6 +131,7 @@ sub parse_target_metadata($) {
/^Target-Optimization:\s*(.+)\s*$/ and $target->{cflags} = $1;
/^CPU-Type:\s*(.+)\s*$/ and $target->{cputype} = $1;
/^Linux-Version:\s*(.+)\s*$/ and $target->{version} = $1;
+ /^Linux-Testing-Version:\s*(.+)\s*$/ and $target->{testing_version} = $1;
/^Linux-Release:\s*(.+)\s*$/ and $target->{release} = $1;
/^Linux-Kernel-Arch:\s*(.+)\s*$/ and $target->{karch} = $1;
/^Default-Subtarget:\s*(.+)\s*$/ and $target->{def_subtarget} = $1;
diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl
index 123958799f..d183e943f6 100755
--- a/scripts/target-metadata.pl
+++ b/scripts/target-metadata.pl
@@ -42,6 +42,7 @@ sub target_config_features(@) {
/^virtio$/ and $ret .= "\tselect VIRTIO_SUPPORT\n";
/^rootfs-part$/ and $ret .= "\tselect USES_ROOTFS_PART\n";
/^boot-part$/ and $ret .= "\tselect USES_BOOT_PART\n";
+ /^testing-kernel$/ and $ret .= "\tselect HAS_TESTING_KERNEL\n";
}
return $ret;
}
@@ -83,11 +84,14 @@ sub print_target($) {
}
my $v = kver($target->{version});
+ my $tv = kver($target->{testing_version});
+ $tv or $tv = $v;
if (@{$target->{subtargets}} == 0) {
$confstr = <<EOF;
config TARGET_$target->{conf}
bool "$target->{name}"
- select LINUX_$v
+ select LINUX_$v if !TESTING_KERNEL
+ select LINUX_$tv if TESTING_KERNEL
EOF
}
else {
@@ -387,15 +391,18 @@ EOF
my %kver;
foreach my $target (@target) {
- my $v = kver($target->{version});
- next if $kver{$v};
- $kver{$v} = 1;
- print <<EOF;
+ foreach my $tv ($target->{version}, $target->{testing_version}) {
+ next unless $tv;
+ my $v = kver($tv);
+ next if $kver{$v};
+ $kver{$v} = 1;
+ print <<EOF;
config LINUX_$v
bool
EOF
+ }
}
foreach my $def (sort keys %defaults) {
print <<EOF;