7

I currently have a bitbake .bb script that looks like this

DESCRIPTION = "Hello World"
SECTION = "TESTING"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r0"

SRC_URI = "file://fileA \
           file://fileB"

S = "${WORKDIR}"

inherit allarch


do_install() {
        echo "--------HELLO WORLD------------------------"
}

Now when I goto the build directory and run bitbake on this recipe I do not see output "Hello world" anywhere. Any suggestions on why I dont see that ?

James Franco
  • 4,516
  • 10
  • 38
  • 80

3 Answers3

11

you could use bitbake -e myRecipe > ./myRecipe.log to look deep into what is going on. The do_install will not echo anything out of the build when you are running bitbake.

Instead, they are all stored in the log file at /build/${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}/temp

In log.do_install, you should able to see something like this

DEBUG: Executing shell function do_install
--------HELLO WORLD------------------------
DEBUG: Shell function do_install finished
Charles C.
  • 3,725
  • 4
  • 28
  • 50
4

you can do it like below (full source)

do_install() {
    bbplain "--------HELLO WORLD------------------------"
    printf "%b\0" "bbplain --------HELLO WORLD------------------------" > ${LOGFIFO}
}

hyuk myeong
  • 197
  • 1
  • 13
3

For faster (and somewhat noisy) debugging you could also use bbnote/bbwarn in shell tasks. For python tasks there is bb.note/bb.warn.

Look here: http://patchwork.openembedded.org/patch/59021/

More readability with regard to which tasks have executed comes from piping bitbake through something, so it knows not to use fancy screen updates:

bitbake $recipe | cat

This gives you a nice sequential stream of tasks with bbnote/bbwarn in between.

jubr
  • 376
  • 2
  • 7