> I was just thinking about something like this the other day.... but I
wonder if we want to apply the fragments to each config. It might be nice
if there was a way to filter out which config fragments got applied to
which u-boot configs?

Thanks for the input, yes, that would be even nicer for sure, but after
some thinking, I could not figure out a way to implement that with the
current .scc design without a complete refactoring, do you have some ideas?

In our use cases, we use .scc files as some 'feature' fragments applied to
machine configs, usually we would like them to apply to all the configs, if
there are some machine specific ones, they will be in the config file in
uboot source rather than being applied by .scc.

//Ming Liu

Joshua Watt <jpewhac...@gmail.com> 於 2020年5月14日 週四 下午7:03寫道:

>
> On 5/14/20 9:13 AM, Ming Liu wrote:
>
> Hi, maintainers:
>
> Ping! May I get some comments about this patch? It's been pending for
> weeks.
>
>
> I was just thinking about something like this the other day.... but I
> wonder if we want to apply the fragments to each config. It might be nice
> if there was a way to filter out which config fragments got applied to
> which u-boot configs?
>
>
>
> //Ming Liu
>
> <liu.min...@gmail.com> 於 2020年4月6日 週一 下午9:21寫道:
>
>> From: Ming Liu <ming....@toradex.com>
>>
>> U-boot recipe supports .cfg files in SRC_URI, but they would be merged
>> to .config during do_configure only when UBOOT_MACHINE is set, we
>> should also support merging .cfg files for UBOOT_CONFIG.
>>
>> Signed-off-by: Ming Liu <ming....@toradex.com>
>> ---
>>  meta/recipes-bsp/u-boot/u-boot.inc | 17 +++++++++++++++--
>>  1 file changed, 15 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-bsp/u-boot/u-boot.inc
>> b/meta/recipes-bsp/u-boot/u-boot.inc
>> index 188e5295cf..9126fafe0b 100644
>> --- a/meta/recipes-bsp/u-boot/u-boot.inc
>> +++ b/meta/recipes-bsp/u-boot/u-boot.inc
>> @@ -77,7 +77,21 @@ def find_cfgs(d):
>>      return sources_list
>>
>>  do_configure () {
>> -    if [ -z "${UBOOT_CONFIG}" ]; then
>> +    if [ -n "${UBOOT_CONFIG}" ]; then
>> +        unset i j
>> +        for config in ${UBOOT_MACHINE}; do
>> +            i=$(expr $i + 1);
>> +            for type in ${UBOOT_CONFIG}; do
>> +                j=$(expr $j + 1);
>> +                if [ $j -eq $i ]; then
>> +                    KCONFIG_CONFIG=${S}/configs/${config%_*}_defconfig
>> merge_config.sh -m ${S}/configs/${config%_*}_defconfig ${@"
>> ".join(find_cfgs(d))}
>> +                    oe_runmake -C ${S} O=${B}/${config} ${config}
>> +                fi
>> +            done
>> +            unset  j
>> +        done
>> +        unset  i
>> +    else
>>          if [ -n "${UBOOT_MACHINE}" ]; then
>>              oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
>>          else
>> @@ -114,7 +128,6 @@ do_compile () {
>>                  j=$(expr $j + 1);
>>                  if [ $j -eq $i ]
>>                  then
>> -                    oe_runmake -C ${S} O=${B}/${config} ${config}
>>                      oe_runmake -C ${S} O=${B}/${config}
>> ${UBOOT_MAKE_TARGET}
>>                      for binary in ${UBOOT_BINARIES}; do
>>                          k=$(expr $k + 1);
>> --
>> 2.26.0
>>
>>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138315): 
https://lists.openembedded.org/g/openembedded-core/message/138315
Mute This Topic: https://lists.openembedded.org/mt/72819498/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to