From: Eric Fahlgren Date: Thu, 8 May 2025 22:28:52 +0000 (-0700) Subject: imagebuilder: exclude metadata for profiles that have no kernel X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F18748%2Fhead;p=thirdparty%2Fopenwrt.git 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 Link: https://github.com/openwrt/openwrt/pull/18748 Signed-off-by: Robert Marko --- diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl index ce96d1e7d53..da42f04a24f 100755 --- a/scripts/target-metadata.pl +++ b/scripts/target-metadata.pl @@ -441,7 +441,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";