# Why does my bb file not executed?

**URL:** <https://forum.legato.io/t/why-does-my-bb-file-not-executed/2861>\
**Category:** Legato Linux distribution (Yocto project)\
**Created:** [December 14, 2017, 5:02pm UTC](https://forum.legato.io/t/why-does-my-bb-file-not-executed/2861 "2017-12-14T17:02:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlBo](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@AlBo](https://forum.legato.io/u/AlBo)\
**Post date:** [December 14, 2017, 5:02pm UTC](https://forum.legato.io/t/why-does-my-bb-file-not-executed/2861/1 "2017-12-14T17:02:50Z")

</div>

Hello,

I tried to reuse an existing project based on a  
Legato-Dist-Source-mdm9x15-SWI9X15Y\_07.12.09.00.tar.bz2 distribution (built on Ubuntu 14.04).

The goal is to include an application with a particular network, users, configuration, etc.

Everything is described in `meta-swi-extras/common/recipes/blackbox`folder which contains a `blackbox.bb` file, blackbox.inc, 2 `.bbappend` files and some other files referenced by the recipe in the ‘files’ subfolder.

The content of the `blackbox.bb` file is that one:

```
DESCRIPTION = "Startup scripts"
LICENSE = "MIT & BSD-3-Clause & BSD-2-Clause & PD"
LIC_FILES_CHKSUM = "file://../LICENSE;md5=eef71d57c191bf0563e2407afc838f99"
require blackbox.inc
PR = "r0"
RPROVIDES_${PN}="blackbox"

SRC_URI = " \
   file://LICENSE \
   "

inherit useradd

USERADD_PACKAGES = "${PN}"
GROUPADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "configuration"
USERADD_PARAM_${PN} = "-d /tmp -G configuration blackbox; -m -d /tmp -s /usr/sbin/generate_config.sh -G configuration technicien"

do_install(){
    make -C .. clean 
    make -C .. CC='arm-poky-linux-gnueabi-gcc' AR='arm-poky-linux-gnueabi-ar'
    install -d ${D}${sysconfdir}/init.d
    install -d ${D}${sysconfdir}/rcS.d
    install -d ${D}${sysconfdir}/rc1.d
    install -d ${D}${sysconfdir}/rc2.d
    install -d ${D}${sysconfdir}/rc3.d
    install -d ${D}${sysconfdir}/rc4.d
    install -d ${D}${sysconfdir}/rc5.d
    install -d ${D}${sbindir}
    install -m 0544 ${WORKDIR}/scripts/initscript.sh ${D}${sysconfdir}/init.d/blackbox
    install -m 0700 ${WORKDIR}/blackbox_client ${D}${sbindir}/blackbox_client
    install -o technicien -m 0500 ${WORKDIR}/scripts/generate_config.sh ${D}${sbindir}/
    install -o blackbox -g configuration -m 0660 ${WORKDIR}/config.json ${D}${sysconfdir}/
    install -d ${D}${sysconfdir}/dnsmasq.d
    echo "/usr/sbin/generate_config.sh" >> ${D}${sysconfdir}/shells
    echo "/bin/sh" >> ${D}${sysconfdir}/shells
    ln -sf ../init.d/blackbox ${D}${sysconfdir}/rcS.d/S90blackbox
    ln -sf ../init.d/blackbox ${D}${sysconfdir}/rc1.d/K90run-script
    ln -sf ../init.d/blackbox ${D}${sysconfdir}/rc2.d/K90run-script
    ln -sf ../init.d/blackbox ${D}${sysconfdir}/rc3.d/K90run-script
    ln -sf ../init.d/blackbox ${D}${sysconfdir}/rc4.d/K90run-script
    ln -sf ../init.d/blackbox ${D}${sysconfdir}/rc5.d/S90run-script
    ln -sf /etc/init.d/snmpd ${D}${sysconfdir}/rcS.d/S90snmpd
    echo "blackbox ALL = NOPASSWD: /sbin/reboot" >> ${D}${sysconfdir}/sudoers
    echo "blackbox ALL = NOPASSWD: /mnt/legato/system/bin/fwupdate" >> ${D}${sysconfdir}/sudoers
}

```

when I do a `make`, I can see what is added by the `.bbappend` files in the resulting image but nothing specified by the blackbox.bb file.  
I can touch it, modify it, nothing causes make to rebuild and image.  
If i write `foo` in it, it complains that it doesn’t understand wwhat `foo` means so it reads it but doesn’t execute the included directives.

Could tell me what’s wrong in this file please?

Regards,  
Alain

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [December 15, 2017, 2:01am UTC](https://forum.legato.io/t/why-does-my-bb-file-not-executed/2861/2 "2017-12-15T02:01:44Z")

</div>

Hi,

Is this duplicate to this thread:

> [@Why my bb file is not taken in account?](http://forum.legato.io/t/why-my-bb-file-is-not-taken-in-account/2860/2):
>
> Hi, how about modify “/meta-swi/meta-swi-mdm9x15/recipes-core/images/mdm9x15-image.inc” to add IMAGE\_INSTALL += “blackbox”

---

<div class="post-metadata">

**Author:** ![AlBo](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@AlBo](https://forum.legato.io/u/AlBo)\
**Post date:** [December 15, 2017, 8:00am UTC](https://forum.legato.io/t/why-does-my-bb-file-not-executed/2861/3 "2017-12-15T08:00:05Z")

</div>

Hello jyjyi,

Yes it is because on my first post, the forum told that the site was unreachable so I though the post wasn’t saved.

Alain
