Why my bb file is not taken in account?


#1

Hello,

I try to rebuild an existing project based on a Legato-Dist-Source-mdm9x15-SWI9X15Y_07.12.09.00.tar.bz2 image.
The goal is to include an application and some scripts in this image.

So the application environment is described in a meta-swi-extras/common/recipes/blackbox folder with a blackbox.bb file and a blackbox.inc files Inside. (also with the referenced files in files)
Here is the content of this file:

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 -p wtmoOHy.mTsUk 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}/askco.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
}

Unfortunately, this file is not executed by bitbake as I dont find in the built image any of the files supposed to be installed.

When I touch blackbox.bb or explicitely modify it, make doesn’t do anything! No errors, no warnings but Nothing done!

But if I write ‘foo’ in the file it tells me that it doesn’t understand what ‘foo’ means.
So it reads my file but doesn’t execute the included directives.

Do you have an idea??

Regards,
Alain


Fail to build Legato-Dist-Source-mdm9x15-SWI9X15Y_07.12.09.00
#2

Hi,

how about modify “/meta-swi/meta-swi-mdm9x15/recipes-core/images/mdm9x15-image.inc” to add
IMAGE_INSTALL += “blackbox”


Why does my bb file not executed?
#3

Hi jyijyi,

Surprising.
Thanks that works but according to what I understood reading the scripts, it seems that yocto/meta-swi-extras/common/conf/layer.confis here to include all recipes added in yocto/meta-swi-extras/common/recipes folder so why do we have to modify mdm9x15-image.inc file ?

What about yocto/meta-swi-extras/common/recipes/images and the included .inc files ?

Alain


#4

This alone should be in a wiki on howto add bb files from yocto to be included in the builds. glads i found this now im testing it also.


#5

Hi,
Could you please point me on this wiki?
Alain


#6

a wiki doesnt exist yet but it was mentioned by me and someone suggested they would look into getting one stood up for us to edit with “things” like this.