【问题标题】:Yocto autotools not configuring and compilingYocto autotools 没有配置和编译
【发布时间】:2014-06-24 23:47:28
【问题描述】:

我是 yocto 的新手,正在尝试为树莓派构建一个包。 我正在使用来自https://github.com/djwillis/meta-raspberrypi 的 BSP 层。

我能够毫无问题地使用 BSP 构建映像。但是当我 添加了一个新层来添加包,出现错误。

我尝试使用 hello world 自动工具包进行测试。这个你好 world 是从下载的 hello world 自动工具包 ftp://ftp.gnu.org/gnu/hello/hello-2.7.tar.gz。尝试的时候 执行那个bb,得到如下错误,

| make: *** No rule to make target `install'.  Stop.
| ERROR: oe_runmake failed

我的bb文件如下,

DESCRIPTION = "Dummy"

SECTION = "package"

LICENSE = "CLOSED"

PR = "r0"

SRC_URI = "file://hello/"

inherit autotools gettext

执行完这个bb文件后,我查看了configure的日志。 它没有说明要配置。

请帮我解决我所遵循的这个过程有什么问题?

【问题讨论】:

    标签: raspberry-pi cross-compiling autotools bitbake


    【解决方案1】:

    你的错误

        make: *** No rule to make target `install'.  Stop.
    

    意味着 bitbake 配方没有定义“安装”规则。您在食谱中需要的内容如下

        do_install () {
            #either leave this empty or put instructions for installation 
        }
    

    您还需要一个用于 hello.c system.h 的 SRC_URI 以及该 hello world 包中包含的 make 文件。

    看看这个教程http://stevephillips.me/blog/adding-custom-software-to-bitbake-oe-core,它有一个完整的 bitbake 食谱示例

    【讨论】:

    • 我已经从ftp.gnu.org/gnu/hello/hello-2.7.tar.xz 下载了hello world tar 并解压到“hello”目录。所有 c、h 和必要的配置文件都在里面。当我查看 do_configure() 的日志时,它显示 Nothing to Configure。
    • 您是否尝试过将 do_configure 定义为空?尝试将“do_configure () {}”放在 bitbake 配方的底部
    • 这根本不是错误的意思。 yocto 正在调用“make install”,但它使用的 makefile 不包含“install”目标。
    【解决方案2】:

    您收到错误是因为 OE 找不到源。尝试将 SRC_URI 更改为 hello world tar 文件的地址。 OE 然后隐式知道源的位置。

    DESCRIPTION = "Dummy"
    
    SECTION = "package"
    
    LICENSE = "CLOSED"
    
    PR = "r0"
    
    SRC_URI = "ftp://ftp.gnu.org/gnu/hello/hello-2.7.tar.gz"
    
    inherit autotools
    

    看看你做了什么(这不是常规的)你也可以尝试将源目录“S”设置为“${WORKDIR}/hello”

    DESCRIPTION = "Dummy"
    
    SECTION = "package"
    
    LICENSE = "CLOSED"
    
    PR = "r0"
    
    SRC_URI = "file://hello/"
    
    inherit autotools
    
    S = ${WORKDIR}/hello
    

    【讨论】:

      猜你喜欢
      • 2021-11-18
      • 1970-01-01
      • 1970-01-01
      • 2014-08-03
      • 1970-01-01
      • 2010-09-24
      • 2019-02-28
      • 2018-07-29
      • 2014-01-29
      相关资源
      最近更新 更多