aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2019-03-11 05:32:29 +0100
committerDaniel Golle <daniel@makrotopia.org>2019-03-11 05:32:29 +0100
commitd6fa04a437033d4bdfa1b0d90a4786bfe492f749 (patch)
treecc32815bed467b89f1638f8f7cec6e7f934e01ac
parent35a7f790967de6d887bed8d506c11ebb98da65d3 (diff)
downloadupstream-d6fa04a437033d4bdfa1b0d90a4786bfe492f749.tar.gz
upstream-d6fa04a437033d4bdfa1b0d90a4786bfe492f749.tar.bz2
upstream-d6fa04a437033d4bdfa1b0d90a4786bfe492f749.zip
IB: include SUPPORTED_DEVICES in 'make info' output
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r--include/image.mk1
-rw-r--r--scripts/metadata.pm2
-rwxr-xr-xscripts/target-metadata.pl3
-rw-r--r--target/imagebuilder/files/Makefile5
4 files changed, 9 insertions, 2 deletions
diff --git a/include/image.mk b/include/image.mk
index 62e3af9e4f..9e40a54f51 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -558,6 +558,7 @@ Target-Profile: DEVICE_$(1)
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)
Target-Profile-Description:
$(DEVICE_DESCRIPTION)
@@
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index d9804f8dc3..a338b8caad 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -140,6 +140,7 @@ sub parse_target_metadata($) {
id => $1,
name => $1,
has_image_metadata => 0,
+ supported_devices => [],
priority => 999,
packages => []
};
@@ -148,6 +149,7 @@ sub parse_target_metadata($) {
};
/^Target-Profile-Name:\s*(.+)\s*$/ and $profile->{name} = $1;
/^Target-Profile-hasImageMetadata:\s*(\d+)\s*$/ and $profile->{has_image_metadata} = $1;
+ /^Target-Profile-SupportedDevices:\s*(.+)\s*$/ and $profile->{supported_devices} = [ split(/\s+/, $1) ];
/^Target-Profile-Priority:\s*(\d+)\s*$/ and do {
$profile->{priority} = $1;
$target->{sort} = 1;
diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl
index 2f045eb379..4e4bc73d91 100755
--- a/scripts/target-metadata.pl
+++ b/scripts/target-metadata.pl
@@ -423,6 +423,9 @@ sub gen_profile_mk() {
foreach my $profile (@{$cur->{profiles}}) {
print $profile->{id}.'_NAME:='.$profile->{name}."\n";
print $profile->{id}.'_HAS_IMAGE_METADATA:='.$profile->{has_image_metadata}."\n";
+ if (@{$profile->{supported_devices}} > 0) {
+ print $profile->{id}.'_SUPPORTED_DEVICES:='.join(' ', @{$profile->{supported_devices}})."\n";
+ }
print $profile->{id}.'_PACKAGES:='.join(' ', @{$profile->{packages}})."\n";
}
}
diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 6e8d1eaf29..547289b971 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -73,8 +73,9 @@ include $(INCLUDE_DIR)/target.mk
USER_PROFILE ?= $(firstword $(PROFILE_NAMES))
PROFILE_LIST = $(foreach p,$(PROFILE_NAMES), \
- echo '$(patsubst DEVICE_%,%,$(p)):'; $(if $($(p)_NAME),echo ' $(subst ','"'"',$($(p)_NAME))'; ) echo ' Packages: $($(p)_PACKAGES)'; echo ' hasImageMetadata: $($(p)_HAS_IMAGE_METADATA)';\
-)
+ echo '$(patsubst DEVICE_%,%,$(p)):'; $(if $($(p)_NAME),echo ' $(subst ','"'"',$($(p)_NAME))'; ) \
+ echo ' Packages: $($(p)_PACKAGES)'; echo ' hasImageMetadata: $($(p)_HAS_IMAGE_METADATA)'; \
+ [ "$($(p)_SUPPORTED_DEVICES)" ] && echo ' SupportedDevices: $($(p)_SUPPORTED_DEVICES)'; )
.profiles.mk: .targetinfo
@$(SCRIPT_DIR)/target-metadata.pl profile_mk $< '$(BOARD)$(if $(SUBTARGET),/$(SUBTARGET))' > $@