Unable to add .bb in a layer - newcomer to Yocto #yocto


shauli.arazi@...
 

Hi all,
I have taken on myself a task to write a custom Yocto-based image for Nvidia Xavier which poses somewhat of a difficult task.
After few videos on Youtube and some documentation, I started writing a new layer on-top of the tegra and poky layer as follows -

meta                  /home/shauli/Git/poky/meta                5
meta-poky             /home/shauli/Git/poky/meta-poky           5
meta-yocto-bsp        /home/shauli/Git/poky/meta-yocto-bsp      5
meta-tegra            /home/shauli/Git/poky/meta-tegra          5
meta-xtra             /home/shauli/Git/poky/meta-xtra           6


meta-xtra is the new layer I wrote that has a .bb file which is supposed to edit the Nvidia logo screen to a custom logo I made. Should be fairly simple.
I copied the logo .bb file from the meta-tegra to my own layer under its own folder.

meta-xtra/
├── conf
│   └── layer.conf
├── COPYING.MIT
├── README
├── recipes-core
│   └── images
│       └── xtra-l4t.bb
└── recipes-logo
    ├── xtra-bootlogo
    │   ├── bootlogo.inc
    │   ├── files
    │   │   └── xtra_logo.tar.gz
    │   └── xtra-bootlogo.bb


As can be seen above, I created a new image named xtra-l4t, a logo .bb file which, and the a regular layer.conf file which includes all the .bb files in the subfolders (same as the example).

The problem I am facing is that while building either the core-image-base or the xtra-l4t image, the .bb simply doesn't do anything. I had syntax errors in the do_compile () function which I noticed only after compiling the .bb file directly using $ bitbake xtra-bootlogo.
The $ bitbake xtra-l4t has no affect whatsoever from the .bb file.
 
I tried adding IMAGE_INSTALL:append = " xtra-bootlogo" to the xtra-l4t.bb file which lead to the following error.

ERROR: Task do_populate_sdk in /home/shauli/Git/poky/meta-xtra/recipes-core/images/xtra-l4t.bb rdepends upon non-existent task do_package_write_deb in /home/shauli/Git/poky/meta-xtra/recipes-logo/xtra-bootlogo/xtra-bootlogo.bb

I think there is something fundamental about how Yocto works which I fail to understand.

This is the logo .bb file -

do_compile() {

    LIST=""

    if [ "${@bb.utils.contains("PACKAGECONFIG", "raw", "1", "0", d)}" = "1" ]; then
        if [ ! -s "${S}/${RAW_GRAPHIC_FILE}" ]; then
            bbfatal "RAW_GRAPHIC_FILE must exist"
        fi

        cook_bitmaps "${S}/${RAW_GRAPHIC_FILE}"
    else
        if [ ! -s "${S}/${COOKED_CONFIG_FILE}" ]; then
            bbfatal "COOKED_CONFIG_FILE must exist"
        fi

        while read _line
        do
            _line="${S}/${_line}"
            LIST="${LIST}${_line};"
        done < ${S}/${COOKED_CONFIG_FILE}
    fi

    # NB that '%?' gets rid of the trailing ';' because BMP_generator blows up
    LIST="${LIST%?}"

    rm -f ${B}/bmp.blob
    rm -f ${B}/bmp-compressed.blob

    OUT=${B} ${STAGING_BINDIR_NATIVE}/${FLASHTOOLS_DIR}/BMP_generator_L4T.py -t bmp -e "${LIST}" -v 0

    if [ ! -s ${B}/bmp.blob ]; then
        bbfatal "BMP_generator_L4T.py failed to create bmp.blob"
    fi

    compress_blob "${B}/bmp.blob" "${B}/bmp-compressed.blob"

    if [ ! -s ${B}/bmp-compressed.blob ]; then
        bbfatal "failed to create compressed bmp-compressed.blob"
    fi
}

do_deploy() {
    install -d ${DEPLOYDIR}
    install -m 0644 ${B}/bmp-compressed.blob ${DEPLOYDIR}/${BMP_BLOB}
    # Should overwrite Nvidia's symlink
    ln -sf ${BMP_BLOB} ${DEPLOYDIR}/${BMP_SYMLINK}
}

PACKAGE_ARCH = "${MACHINE_ARCH}"
do_install[noexec] = "1"

addtask deploy before do_build after do_install



Any help would be very much appreciated.
Thanks,
Shauli