[OE-core] [meta-oe][PATCH v2] iproute2: add devlink support to iproute2

Scott Branden scott.branden at broadcom.com
Wed Feb 19 01:08:12 UTC 2020



On 2020-02-18 4:26 p.m., Scott Branden wrote:
> Hi Andre,
>
> On 2020-02-18 3:36 p.m., Andre McCurdy wrote:
>> On Tue, Feb 18, 2020 at 3:19 PM Peter Kjellerstedt
>> <peter.kjellerstedt at axis.com> wrote:
>>>> -----Original Message-----
>>>> From: openembedded-core-bounces at lists.openembedded.org 
>>>> <openembedded-core-
>>>> bounces at lists.openembedded.org> On Behalf Of Scott Branden via
>>>> Openembedded-core
>>>> Sent: den 18 februari 2020 23:45
>>>> To: openembedded-core at lists.openembedded.org
>>>> Subject: [OE-core] [meta-oe][PATCH v2] iproute2: add devlink 
>>>> support to
>>>> iproute2
>>>>
>>>> Add devlink support to iproute2 recipe.
>>>>
>>>> Signed-off-by: Scott Branden <scott.branden at broadcom.com>
>>>> ---
>>>>   meta/recipes-connectivity/iproute2/iproute2.inc | 8 ++++++--
>>>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc
>>>> b/meta/recipes-connectivity/iproute2/iproute2.inc
>>>> index fc31b8444e..98793af88e 100644
>>>> --- a/meta/recipes-connectivity/iproute2/iproute2.inc
>>>> +++ b/meta/recipes-connectivity/iproute2/iproute2.inc
>>>> @@ -15,11 +15,13 @@ inherit update-alternatives bash-completion 
>>>> pkgconfig
>>>>
>>>>   CLEANBROKEN = "1"
>>>>
>>>> -PACKAGECONFIG ??= "tipc elf"
>>>> +PACKAGECONFIG ??= "tipc elf devlink"
>>>>   PACKAGECONFIG[tipc] = ",,libmnl,"
>>>>   PACKAGECONFIG[elf] = ",,elfutils,"
>>>> +PACKAGECONFIG[devlink] = ",,libmnl,"
>>>>
>>>>   EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} 
>>>> DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
>>>> +                ${@bb.utils.contains('PACKAGECONFIG', 'devlink', 
>>>> 'devlink', '', d)}                                               \
>>>>                   ${@bb.utils.contains('PACKAGECONFIG', 'tipc', 
>>>> 'tipc', '', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
>>> You can simplify the above to:
>>>
>>> EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} 
>>> DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
>>>                  ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc', 
>>> d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
>>>
>>> but I also recommend to reformat it to make it more readable:
>>>
>>> EXTRA_OEMAKE = "\
>>>      CC='${CC}' \
>>>      KERNEL_INCLUDE=${STAGING_INCDIR} \
>>>      DOCDIR=${docdir}/iproute2 \
>>>      SUBDIRS='lib tc ip bridge misc genl 
>>> ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc', d)}' \
>>>      SBINDIR='${base_sbindir}' \
>>>      LIBDIR='${libdir}' \
>>> "
>> You could take the cleanup one step further by merging the recipe and
>> the .inc file (and then including CCOPTS='${CFLAGS}' directly in the
>> definition of EXTRA_OEMAKE).
> Sounds like a more involved change that should be taken up in an 
> unrelated cleanup exercise?
Actually, I see the reason to keep the inc file is so that you can 
support different versions of iproute2 if needed.
Each recipe version would just require the inc file.



More information about the Openembedded-core mailing list