This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM335X: Append an bbappend recipe in Arago

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

Goodmorning,

I'm using arago for am335x-evm machine after following:

Sitara Linux Training: Getting Started with Openembedded - Texas Instruments Wiki

I'm trying to add one more service in /etc/systemd compare with the standard image. In other words, I don't want to override systemd_%.bbappend contained in meta-arago/meta-arago-distro/recipes-core/systemd, I simply want to add e install one more service.

My question are:

Is it possible to add my bbappend recipe to another recipe append?

If yes to the previous question, if I want my bbappend file to take the place of the one in meta-arago, how bitbake knows how to choose if override or add an existing append recipe with another?

I hope that I've explain my doubt clearly enough.

Thank you

Davide BRunelli

  • Hello Davide,

    You can also check the Customizing a Yocto-Based Linux Distribution for Production: Training Series, they will be in help.

    Davide Brunelli said:
    Is it possible to add my bbappend recipe to another recipe append?

    No, you cannot bbappend to bbappend, but you can bbappend many recipes to one bb recipe.


    Davide Brunelli said:
    if I want my bbappend file to take the place of the one in meta-arago, how bitbake knows how to choose if override or add an existing append recipe with another?

    This is decided by the layer's priority, the layer with bigger priority gets executed last and overrides the previous ones.

    To add a custom SystemD service to OE build system you can refer to the existent services like matrix-gui-2.0.service in <tisdk>/sources/meta-arago/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb for instance, read about systemd.bbclas and SYSTEMD_SERVICE_${PN} in Yocto Mega-Manual and do the same for your custom service.

    Best regards,
    Kemal

  • Hello Kemal,
    thank you for your answer and links.
    For example, I could add my service to /etc/systemd/network with a systemd_%.bbappend, contained in my layer, as follow:

    PR_append = ".davide1"

    FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

    SRC_URI_append = " \
    file://01-eth-static.network \
    "

    do_install_append() {
    install -d ${D}${sysconfdir}/systemd/network/
    install -m 0644 ${WORKDIR}/01-eth-static.network ${D}${sysconfdir}/systemd/network/
    }

    So we can say that this recipe bbappends to the original bb recipe, together with the others bbappend.
    Now, I'd like that my systemd bbappends takes the place of the one contained in "meta-arago-distro/recipes-core/systemd/". In other words, I don't want the latter to be used.

    As far as I know, the right command is BBMASK, but it has no effect, at least the way that I use it. I simply added the following line in my systemd_%.bbappend recipe:
    BBMASK = "meta-arago-distro/recipes-core/systemd/"

    How can I do it?

    Thank you.
    Davide Brunelli
  • Davide Brunelli said:
    So we can say that this recipe bbappends to the original bb recipe, together with the others bbappend.


    Yes.


    Davide Brunelli said:
    BBMASK = "meta-arago-distro/recipes-core/systemd/"

    Use BBMASK="meta-arago/meta-arago-distro/recipes-core/systemd/systemd_%.bbappend" or BBMASK="meta-arago/meta-arago-distro/recipes-core/systemd/" and add it to your <tisdk>/build/conf/local.conf file, not to systemd_%.bbappend recipe.

  • Thank you.
    Now it works.

    Regards,
    Davide Brunelli