Yocto 配方中的 Echo 语句未打印到终端 [英] Echo statements in Yocto recipe not printing to terminal

查看:64
本文介绍了Yocto 配方中的 Echo 语句未打印到终端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过打印消息来调试 Yocto 配方中的 do_compile_append 函数:

I am trying to debug my do_compile_append function in a Yocto recipe, by printing messages:

do_compile_append() {
    for i in 1 2 3 4 5
    do
        echo "My yocto Looping ... number $i"
    done
}

在这个例子中,我添加了一个循环来在构建过程中回显一些消息.但是,当我运行 bitbake 来构建它时,我没有看到这些消息输出到我的终端.

In this example, I have added a loop to echo some messages during the build. However, when I run bitbake to build it, I don't see these messages output to my terminal.

输出记录在哪里?

推荐答案

Bitbake 提供了在 Shell Scrit 代码中使用的日志功能.

Bitbake provides logging functions for use in Shell Scrit code.

您可以查看许多食谱默认继承的 poky/plain/meta/classes/logging.bbclass.

You can have a look to the poky/plain/meta/classes/logging.bbclass which is inherited by default by many recipes.

函数有:bbplainbbnotebbwarnbberrorbbfatal, bbdebug

因此,您可以使用 bbdebug "My yocto Looping ... number $i" 在终端中打印输出.

So thus, you could use bbdebug "My yocto Looping ... number $i" to print outputs in your terminal.

这篇关于Yocto 配方中的 Echo 语句未打印到终端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆