[OpenWrt-Devel] [PATCH] scripts/metadata: Allow to select which profiles to build

Daniel Dickinson openwrt at daniel.thecshore.com
Wed Jan 13 12:04:42 EST 2016


I'm looking at the 'Default' profiles in architectures and as far as I 
can tell the only architecture that currently uses Default to mean 
'build all profiles for this arch-subtarget'.  Is that correct.

I've seen other 00-default.mk profiles by on most archs this seems to be 
used as a generic profile rather than as a way to select more than one.

Is that actually correct, or am I just missing how e.g. brcm63xx selects 
more than than one profile in response to the default profile (I use 
that example because it has both a default and generic profiles, but I 
don't see how default builds more than single image).

Any clarity on this?



On 11/01/16 08:35 AM, Felix Fietkau wrote:
> On 2016-01-11 06:16, openwrt at daniel.thecshore.com wrote:
>> From: Daniel Dickinson <openwrt at daniel.thecshore.com>
>> Certain platforms have large numbers of possible images, and it can be
>> desirable to build neither all images nor only a single image,
>> therefore this patch makes selecting target profiles a menu instead of a
>> single choice, which allows the user to build a specific subset of all
>> possible images for a target.
>> Signed-off-by: Daniel Dickinson <openwrt at daniel.thecshore.com>
>> ---
>>   scripts/metadata.pl | 32 +++++++++++++++++++++++++++++---
>>   1 file changed, 29 insertions(+), 3 deletions(-)
>> diff --git a/scripts/metadata.pl b/scripts/metadata.pl
>> index 48b1b7a..4487d26 100755
>> --- a/scripts/metadata.pl
>> +++ b/scripts/metadata.pl
>> @@ -275,8 +275,7 @@ EOF
>>   print <<EOF;
>>   endchoice
>> -choice
>> -	prompt "Target Profile"
>> +menu "Target Profile"
>>   EOF
>> @@ -288,8 +287,35 @@ EOF
>>   config TARGET_$target->{conf}_$profile->{id}
>>   	bool "$profile->{name}"
>>   	depends on TARGET_$target->{conf}
>> +EOF
>> +
>> +			if (not (($profile->{id} eq 'Default') || ($profile->{id} eq 'Minimal'))) {
>> +				print <<EOF;
>> +	default y if TARGET_$target->{conf}_Default
>> +	default n if TARGET_$target->{conf}_Minimal
>> +EOF
> I like the idea of allowing the user to select multiple profiles.
> However, there also needs to be a clean and simple way to select a
> single profile without going through the list and deselecting everything.
> Also, I don't like hardcoded profile names in metadata.pl, a better
> approach would be to have a flag as part of a profile that indicates
> that it's not a device profile.
> - Felix
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list