简体   繁体   English

yocto项目中的自定义配方

[英]Custom recipe for mgetty in yocto project

I have tried to create a custom recipe, in Yocto project, for mgetty. 我试图在Yocto项目中为自定义菜谱创建自定义配方。 But when I build my custom image, there are some issues that I cannot figure out. 但是,当我构建自定义映像时,有些问题我无法解决。

This is my custom mgetty_1.2.0.bb 这是我的自定义mgetty_1.2.0.bb

DESCRIPTION = "mgetty 1.2.0 recipe"
SECTION = "mgetty"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=fd3b2e6132b4ff4cb475558807ded25f"

SRC_URI = "ftp://mgetty.greenie.net/pub/mgetty/source/1.2/mgetty-${PV}.tar.gz"
SRC_URI[md5sum] = "6700f55a61f3a71ce7b882a0d0b82d19"

inherit autotools

And this is the error output: 这是错误输出:

ERROR: mgetty-1.2.0-r0 do_compile: oe_runmake failed
ERROR: mgetty-1.2.0-r0 do_compile: Function failed: do_compile (log file is 
located at [...path...])
ERROR: Logfile of failure stored in: [...path...]
Log data follows:
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'arm-32', 
'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
| DEBUG: Executing shell function do_compile
| NOTE: make -j 8
| make: *** No targets specified and no makefile found.  Stop.
| ERROR: oe_runmake failed
| WARNING: [...path...] exit 1 from 'exit 1'
| ERROR: Function failed: do_compile (log file is located at [...path...])
ERROR: Task ([...path...]/recipes-mgetty/mgetty/mgetty_1.2.0.bb:do_compile) 
failed with exit code '1'
NOTE: Tasks Summary: Attempted 2741 tasks of which 2734 didn't need to be 
rerun and 1 failed.
NOTE: Writing buildhistory

Did I missed something in my recipe? 我错过了食谱中的某些东西吗?

I'd suggest using devtool if you are new to Yocto. 如果您不熟悉Yocto,我建议您使用devtool。 So, in this case: 因此,在这种情况下:

devtool add mgetty ftp://mgetty.greenie.net/pub/mgetty/source/1.2/mgetty-1.2.0.tar.gz

This will create a local workspace for you with the recipe and sources. 这将为您创建带有配方和来源的本地工作区。 Now, devtool should be able to detect some of the things automatically based on presence of certain files in the package. 现在,devtool应该能够基于软件包中某些文件的存在自动检测某些事物。

But, for projects like this, you might have to make changes to the Makefile as well to make sure that it doesn't override the compiler and flags variables. 但是,对于这样的项目,您可能还必须对Makefile进行更改,以确保它不会覆盖编译器和标记变量。 So, in this case, make changes to ensure CC, CFLAGS, LDFLAGS is not over-ridden etc. (replacing = with ?= would be one way of doing it). 因此,在这种情况下,请进行更改以确保CC,CFLAGS,LDFLAGS不会被覆盖等。(用?=替换=是其中一种方法)。 Once that is done, use 'devtool build' to build your recipe and resolve any further issues. 完成后,使用“ devtool build”构建您的配方并解决任何其他问题。

Once you're done with the changes, please create commits for them in the devtool workspace and use 'devtool finish' to create patches for these commits and have them included them in your recipe. 完成更改后,请在devtool工作区中为它们创建提交,并使用'devtool finish'为这些提交创建补丁并将它们包含在配方中。 See: 看到:

https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#sdk-devtool-use-devtool-modify-to-modify-the-source-of-an-existing-component https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#sdk-devtool-use-devtool-modify-to-modify-the-source-of-an-existing-component组件

For more information, refer to the manual. 有关更多信息,请参阅手册。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM