[openwrt/openwrt] imagebuilder: exclude metadata for profiles that have no kernel

LEDE Commits lede-commits at lists.infradead.org
Sat May 24 13:32:07 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/876932b850e4288a1a6a57caa33d21e4df680403

commit 876932b850e4288a1a6a57caa33d21e4df680403
Author: Eric Fahlgren <ericfahlgren at gmail.com>
AuthorDate: Thu May 8 15:28:52 2025 -0700

    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 at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18748
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    (cherry picked from commit b88f3ebb3341281fa7e61dc4f039062e72c86b9e)
---
 scripts/target-metadata.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl
index e1d4ef242b..55ac72c6da 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";




More information about the lede-commits mailing list