aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-07-28 20:47:34 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-07-30 21:49:07 +0200
commit1d5260cf72763d92ba8c4aff61b3605e37af614a (patch)
tree9d09bbfb97522804d905de633cfb63bbe8f6c44b /scripts
parent504000d520ac8699137bd6b8dbd55f723f34bfbe (diff)
downloadupstream-1d5260cf72763d92ba8c4aff61b3605e37af614a.tar.gz
upstream-1d5260cf72763d92ba8c4aff61b3605e37af614a.tar.bz2
upstream-1d5260cf72763d92ba8c4aff61b3605e37af614a.zip
build: add option to mark devices as BROKEN
By specifying "BROKEN := 1" or "BROKEN := y" for a device, it will be hidden (and deselected) by default. By that, it provides a stronger option to "disable" a device beyond just using DEFAULT := n. To make these devices visible, just enable the BROKEN option in developer settings as already implemented for targets and packages. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/metadata.pm4
-rwxr-xr-xscripts/target-metadata.pl2
2 files changed, 6 insertions, 0 deletions
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index 1826a040a1..f6dce39662 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -158,6 +158,10 @@ 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-Broken:\s*(.+)\s*$/ and do {
+ $profile->{broken} = 1;
+ $profile->{default} = "n";
+ };
/^Target-Profile-Default:\s*(.+)\s*$/ and $profile->{default} = $1;
}
close FILE;
diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl
index ee0ab5a718..c58f096573 100755
--- a/scripts/target-metadata.pl
+++ b/scripts/target-metadata.pl
@@ -239,6 +239,7 @@ config TARGET_$target->{conf}_$profile->{id}
bool "$profile->{name}"
depends on TARGET_$target->{conf}
EOF
+ $profile->{broken} and print "\tdepends on BROKEN\n";
my @pkglist = merge_package_lists($target->{packages}, $profile->{packages});
foreach my $pkg (@pkglist) {
print "\tselect DEFAULT_$pkg\n";
@@ -298,6 +299,7 @@ menuconfig TARGET_DEVICE_$target->{conf}_$profile->{id}
depends on TARGET_$target->{conf}
default $profile->{default}
EOF
+ $profile->{broken} and print "\tdepends on BROKEN\n";
my @pkglist = merge_package_lists($target->{packages}, $profile->{packages});
foreach my $pkg (@pkglist) {
print "\tselect DEFAULT_$pkg if !TARGET_PER_DEVICE_ROOTFS\n";