[Buildroot] [PATCH 1/1] utils/genrandconfig: add DTS cuimage fixup

Arnout Vandecappelle arnout at mind.be
Wed May 4 19:46:16 UTC 2022



On 04/05/2022 04:02, James Hilliard wrote:
> On Tue, May 3, 2022 at 2:29 PM Arnout Vandecappelle <arnout at mind.be> wrote:
>>
>>
>>
>> On 03/05/2022 13:16, James Hilliard wrote:
>>> On Tue, May 3, 2022 at 12:41 AM Arnout Vandecappelle <arnout at mind.be> wrote:
>>>>
>>>>
>>>>
>>>> On 03/05/2022 04:31, James Hilliard wrote:
>>>>> If we don't have a DTS name or path we need to also disable cuimage
>>>>> to disable DTS support as BR2_LINUX_KERNEL_CUIMAGE requires DTS
>>>>> support.
>>>>>
>>>>> Fixes:
>>>>> linux/linux.mk:591: *** No kernel device tree source specified, check your BR2_LINUX_KERNEL_INTREE_DTS_NAME / BR2_LINUX_KERNEL_CUSTOM_DTS_PATH settings.  Stop.
>>>>>
>>>>> Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
>>>>> ---
>>>>>     utils/genrandconfig | 3 +++
>>>>>     1 file changed, 3 insertions(+)
>>>>>
>>>>> diff --git a/utils/genrandconfig b/utils/genrandconfig
>>>>> index 70af84f002..b821e60114 100755
>>>>> --- a/utils/genrandconfig
>>>>> +++ b/utils/genrandconfig
>>>>> @@ -381,6 +381,9 @@ def fixup_config(sysinfo, configfile):
>>>>>             if 'BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y\n' in configlines:
>>>>>                 configlines.remove('BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y\n')
>>>>>                 configlines.append('BR2_LINUX_KERNEL_ZIMAGE=y\n')
>>>>> +        if 'BR2_LINUX_KERNEL_CUIMAGE=y\n' in configlines:
>>>>
>>>>     Similar to the previous patch (only fixup host uboot tools ...), should this
>>>> be done only if no DTS is given? I.e.:
>>>>
>>>> if 'BR2_LINUX_KERNEL_CUIMAGE=y\n' in configlines and \
>>>>        ('BR2_LINUX_KERNEL_INTREE_DTS_NAME=""\n' in configlines or \
>>>>         'BR2_LINUX_KERNEL_CUSTOM_DTS_PATH=""\n' in configlines):
>>>
>>> Should be ok already due to parent match conditions covering the invalid case.
>>
>>    No, what I mean is: it is only needed to remove the line if DTS is not set. If
>> either DTS_NAME or DTS_PATH is set, there's no need to remove the CUIMAGE config.
> 
> Yes, that's exactly what this patch does AFAIU, see parent match
> conditions here:
> https://github.com/buildroot/buildroot/blob/49f9a08223005584ca28c6f243ee5cb1d1e64f57/utils/genrandconfig#L377-L378

  Argh, I just should believe you instead of thinking I know better...

  Applied to master, thanks.

  Regards,
  Arnout

> 
> The BR2_LINUX_KERNEL_CUIMAGE removal only happens if both
> BR2_LINUX_KERNEL_INTREE_DTS_NAME and BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
> are empty.
> 
>>
>>    This is similar to the patch you submitted for
>> BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE and _SCRIPT: they only need to be removed
>> if the corresponding _SOURCE config is not set.
>>
>>    Regards,
>>    Arnout
>>
>>>
>>>>
>>>>
>>>>     Regards,
>>>>     Arnout
>>>>
>>>>> +            configlines.remove('BR2_LINUX_KERNEL_CUIMAGE=y\n')
>>>>> +            configlines.append('BR2_LINUX_KERNEL_UIMAGE=y\n')
>>>>>             if 'BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n' in configlines:
>>>>>                 configlines.remove('BR2_LINUX_KERNEL_SIMPLEIMAGE=y\n')
>>>>>                 configlines.append('BR2_LINUX_KERNEL_VMLINUX=y\n')



More information about the buildroot mailing list