summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJonas Gorski <jonas.gorski@gmail.com>2019-08-13 12:33:47 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-04 13:39:37 +0200
commitf783ad5b5b105407fd47123b02217a8a09525b44 (patch)
tree68ebc5c7568c88ee5feb45a14ae58a39a498ab89 /scripts
parent378b51908c06bca0af0d19e976fd0db51699ae7c (diff)
downloadopenwrt-f783ad5b5b105407fd47123b02217a8a09525b44.tar.gz
openwrt-f783ad5b5b105407fd47123b02217a8a09525b44.tar.bz2
openwrt-f783ad5b5b105407fd47123b02217a8a09525b44.zip
build: allow overriding default selection state for devices
Allow overriding the default selection state for Devices, similar to setting a default for packages. E.g. by setting DEFAULT to n, they won't be selected by default anymore when enabling all device in the multi device profile. This allows preventing images being built by the default config for known broken devices, devices without enough RAM/flash, or devices not working with a certain kernel versions. This does not prevent the devices from being manually selected or images being built by the ImageBuilder. These devices often still have worth with a reduced package-set, or as a device for regression testing, when no better device is available. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> (cherry picked from commit 7546be60074e452751ba2a48eddbc13910bec708)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/metadata.pm4
-rwxr-xr-xscripts/target-metadata.pl2
2 files changed, 4 insertions, 2 deletions
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index d088332152..1826a040a1 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -143,7 +143,8 @@ sub parse_target_metadata($) {
has_image_metadata => 0,
supported_devices => [],
priority => 999,
- packages => []
+ packages => [],
+ default => "y if TARGET_ALL_PROFILES"
};
$1 =~ /^DEVICE_/ and $target->{has_devices} = 1;
push @{$target->{profiles}}, $profile;
@@ -157,6 +158,7 @@ sub parse_target_metadata($) {
};
/^Target-Profile-Packages:\s*(.*)\s*$/ and $profile->{packages} = [ split(/\s+/, $1) ];
/^Target-Profile-Description:\s*(.*)\s*/ and $profile->{desc} = get_multiline(*FILE);
+ /^Target-Profile-Default:\s*(.+)\s*$/ and $profile->{default} = $1;
}
close FILE;
foreach my $target (@target) {
diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl
index d183e943f6..ee0ab5a718 100755
--- a/scripts/target-metadata.pl
+++ b/scripts/target-metadata.pl
@@ -296,7 +296,7 @@ EOF
menuconfig TARGET_DEVICE_$target->{conf}_$profile->{id}
bool "$profile->{name}"
depends on TARGET_$target->{conf}
- default y if TARGET_ALL_PROFILES
+ default $profile->{default}
EOF
my @pkglist = merge_package_lists($target->{packages}, $profile->{packages});
foreach my $pkg (@pkglist) {