All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* condition based bbapend compilation
@ 2024-02-10 16:56 saswatinayak2010
  2024-02-10 19:59 ` [yocto] " Khem Raj
  2024-02-13 11:39 ` Paul Barker
  0 siblings, 2 replies; 4+ messages in thread
From: saswatinayak2010 @ 2024-02-10 16:56 UTC (permalink / raw
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

Hello All,

Seeking assistance to identify a FLAG that allows the application of a condition-based bbappend file during the image compilation process. Any guidance or insights would be greatly appreciated.

For example If 1 is set in the flag, it will indicate inclusion, while 0 will signify exclusion.

Please anyone help me with an example.

Thanks & Regards
Saswati

[-- Attachment #2: Type: text/html, Size: 1009 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] condition based bbapend compilation
  2024-02-10 16:56 condition based bbapend compilation saswatinayak2010
@ 2024-02-10 19:59 ` Khem Raj
  2024-02-13 11:39 ` Paul Barker
  1 sibling, 0 replies; 4+ messages in thread
From: Khem Raj @ 2024-02-10 19:59 UTC (permalink / raw
  To: yocto, saswatinayak2010

On Sat, Feb 10, 2024 at 8:56 AM <saswatinayak2010@gmail.com> wrote:
>
> Hello All,
>
> Seeking assistance to identify a FLAG that allows the application of a condition-based bbappend file during the image compilation process. Any guidance or insights would be greatly appreciated.
>
> For example If 1 is set in the flag, it will indicate inclusion, while 0 will signify exclusion.
>

Well. bbappends are not conditional, however what you do inside them
could be made conditional using packageconfig or DISTRO_FEATURE checks
or other OVERRIDES values.

> Please anyone help me with an example.
>
>
> Thanks & Regards
> Saswati
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> You automatically follow any topics you start or reply to.
> View/Reply Online (#62457): https://lists.yoctoproject.org/g/yocto/message/62457
> Mute This Topic: https://lists.yoctoproject.org/mt/104280559/1997914
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: condition based bbapend compilation
  2024-02-10 16:56 condition based bbapend compilation saswatinayak2010
  2024-02-10 19:59 ` [yocto] " Khem Raj
@ 2024-02-13 11:39 ` Paul Barker
  2024-02-14  6:09   ` Saswati Nayak
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Barker @ 2024-02-13 11:39 UTC (permalink / raw
  To: saswatinayak2010, yocto

On 10/02/2024 16:56, saswatinayak2010@gmail.com wrote:
> Hello All,
>  
> Seeking assistance to identify a FLAG that allows the application of a condition-based bbappend file during the image compilation process. Any guidance or insights would be greatly appreciated.
>  
> For example If 1 is set in the flag, it will indicate inclusion, while 0 will signify exclusion.
>  
> Please anyone help me with an example.

You can move your bbappend contents to a .inc file, e.g. 'example.inc'.

Then in the bbappend file, you can conditionally include your .inc file
with something like:

    require ${@bb.utils.contains('FLAG', '1', 'example.inc', '', d)}

There are some more tricks in the slides for my talk "Creating Friendly
Layers, 2022 Edition" [1] from the Yocto Project Summit 2022.11.

[1]: https://pub.pbarker.dev/presentations/2022-12-01%20Yocto%20Project%20Summit%202022.11%20-%20Creating%20Friendly%20Layers%202022%20Edition/Friendly%20Layers%202022.pdf

Thanks,

-- 
Paul Barker


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: condition based bbapend compilation
  2024-02-13 11:39 ` Paul Barker
@ 2024-02-14  6:09   ` Saswati Nayak
  0 siblings, 0 replies; 4+ messages in thread
From: Saswati Nayak @ 2024-02-14  6:09 UTC (permalink / raw
  To: Paul Barker; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]

Thank you Khem and Paul.
I was also trying some different ways. We can keep the append file in the
dynamic-layers directory and will use the BB_DYNAMIC flag , which helped me.

Thanks
Saswati

On Tue, Feb 13, 2024 at 5:09 PM Paul Barker <paul@pbarker.dev> wrote:

> On 10/02/2024 16:56, saswatinayak2010@gmail.com wrote:
> > Hello All,
> >
> > Seeking assistance to identify a FLAG that allows the application of a
> condition-based bbappend file during the image compilation process. Any
> guidance or insights would be greatly appreciated.
> >
> > For example If 1 is set in the flag, it will indicate inclusion, while 0
> will signify exclusion.
> >
> > Please anyone help me with an example.
>
> You can move your bbappend contents to a .inc file, e.g. 'example.inc'.
>
> Then in the bbappend file, you can conditionally include your .inc file
> with something like:
>
>     require ${@bb.utils.contains('FLAG', '1', 'example.inc', '', d)}
>
> There are some more tricks in the slides for my talk "Creating Friendly
> Layers, 2022 Edition" [1] from the Yocto Project Summit 2022.11.
>
> [1]:
> https://pub.pbarker.dev/presentations/2022-12-01%20Yocto%20Project%20Summit%202022.11%20-%20Creating%20Friendly%20Layers%202022%20Edition/Friendly%20Layers%202022.pdf
>
> Thanks,
>
> --
> Paul Barker
>

[-- Attachment #2: Type: text/html, Size: 2056 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-14  6:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-10 16:56 condition based bbapend compilation saswatinayak2010
2024-02-10 19:59 ` [yocto] " Khem Raj
2024-02-13 11:39 ` Paul Barker
2024-02-14  6:09   ` Saswati Nayak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.