You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

This page is under review


Why flag ?

  • If the code changes has to be enabled only on certain scenarios or only applicable for specific boards , then we have to define the flag .

Defining a new flag 

  • The flag has to be defined in ccsp_common.inc file
  • There are two ways to define the flag

                      1. Having the flag enabled always
                      2. Enabling only for specific board or on specific condition

Having the flag enabled always 

  • Go to ccsp_common.inc file
  • Add the flag under "CFLAGS_append +="  
  • Syntax

    CFLAGS_append +=  " <FLAG> "
  • Sample 

    CFLAGS_append +=  "  .........  -DRDKB_FEATURE "

  • By this method, the flag is set to 1 always 
  • Now add the flag at required pieces of code

Enabling only for specific board or on specific condition

  • Go to ccsp_common.inc file
  • Add the flag using DISTRO_FEATURE as below
  • Syntax 

    CFLAGS_append += " ${@bb.utils.contains('DISTRO_FEATURES', '<keyword>', '<FLAG>', '', d)}"
  • Sample

    CFLAGS_append += " ${@bb.utils.contains('DISTRO_FEATURES', 'rdkb', '-DRDKB_FEATURE', '', d)}"
  • Now the flag has to be added in the platform specific .conf file 
  • Syntax

    DISTRO_FEATURES_append = " ........ <keyword> "
  • Sample

    File : In Rpi, raspberrypi-rdk-broadband.conf

    DISTRO_FEATURES_append = " ........ rdkb "

  • With this method, the flag is set to 1 for the specific platform
  • Now add the flag at required pieces of code


  • No labels