aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/image.mk3
-rw-r--r--scripts/metadata.pm4
-rwxr-xr-xscripts/target-metadata.pl2
3 files changed, 7 insertions, 2 deletions
diff --git a/include/image.mk b/include/image.mk
index 530a2b1335..1538d83df3 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -385,6 +385,8 @@ define Device/Init
FILESYSTEMS := $(TARGET_FILESYSTEMS)
UBOOT_PATH := $(STAGING_DIR_IMAGE)/uboot-$(1)
+
+ DEFAULT :=
endef
DEFAULT_DEVICE_VARS := \
@@ -561,6 +563,7 @@ Target-Profile-Name: $(DEVICE_TITLE)
Target-Profile-Packages: $(DEVICE_PACKAGES)
Target-Profile-hasImageMetadata: $(if $(foreach image,$(IMAGES),$(findstring append-metadata,$(IMAGE/$(image)))),1,0)
Target-Profile-SupportedDevices: $(SUPPORTED_DEVICES)
+$(if $(DEFAULT),Target-Profile-Default: $(DEFAULT))
Target-Profile-Description:
$(DEVICE_DESCRIPTION)
@@
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) {