summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Fahlgren2025-05-08 22:28:52 +0000
committerRobert Marko2025-05-10 10:12:26 +0000
commit52d4559fe10991a4ee910eaab1f9188fef2cb75d (patch)
tree89fa9e25e87b9e0adf44c40eefcb83f229100175
parent5db1b94b63d8b97a0d2409b11790b46373a1a20c (diff)
downloadopenwrt-52d4559fe10991a4ee910eaab1f9188fef2cb75d.tar.gz
imagebuilder: exclude metadata for profiles that have no kernel
Device profiles that specify 'DEFAULT := n' are being included in the imagebuilder metadata, specifically in .profiles.mk, even though there is no kernel built for the device. This results in 'make info' showing the device as valid, but then 'make image PROFILE=xxx' failing with 'No rule to make target xxx-kernel.bin ...' We exclude these profiles from the imagebuilder, avoiding these errors. Fixes: https://github.com/openwrt/openwrt/issues/18410 Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com> Link: https://github.com/openwrt/openwrt/pull/18748 (cherry picked from commit b88f3ebb3341281fa7e61dc4f039062e72c86b9e) Link: https://github.com/openwrt/openwrt/pull/18765 Signed-off-by: Robert Marko <robimarko@gmail.com>
-rwxr-xr-xscripts/target-metadata.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl
index 0c17e2e327..3cca361374 100755
--- a/scripts/target-metadata.pl
+++ b/scripts/target-metadata.pl
@@ -433,7 +433,7 @@ sub gen_profile_mk() {
my @targets = parse_target_metadata($file);
foreach my $cur (@targets) {
next unless $cur->{id} eq $target;
- my @profile_ids_unique = do { my %seen; grep { !$seen{$_}++} map { $_->{id} } @{$cur->{profiles}}};
+ my @profile_ids_unique = do { my %seen; grep { !$seen{$_}++} map { $_->{id} } grep { $_->{default} !~ /^n/ } @{$cur->{profiles}}};
print "PROFILE_NAMES = ".join(" ", @profile_ids_unique)."\n";
foreach my $profile (@{$cur->{profiles}}) {
print $profile->{id}.'_NAME:='.$profile->{name}."\n";