yocto项目简介,yocto配方文件(*.bb文件)编写格式,yocto项目添加自己的应用程序

本文详细介绍了Yocto项目,这是一个用于构建嵌入式Linux系统的开源工具。主要内容包括Yocto的配置文件(*.bb)中涉及的SUMMARY、SECTION、LICENSE等关键字段,以及SRC_URI、RDEPENDS_${PN}

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

yocto项目简介:
https://blog.csdn.net/qq_28992301/article/details/52872209?spm=1001.2014.3001.5501
http://www.fmddlmyy.cn/text43.html
yocto项目参考手册 (Yocto Project Reference Manual ),文章中有*.bb文件的所用到的名词/函数解析https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html

SUMMARY = "test application"
SECTION = "test"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

#file:// 表示在本地目录
SRC_URI = "file://test.bin"
SRC_URI += "file://test_log.conf"

RDEPENDS_${PN} = " openssl "

INSANE_SKIP_${PN} += "already-stripped"

#inhert 引用外部配方文件
inherit update-rc.d
INITSCRIPT_PACKAGES = "test"
INITSCRIPT_NAME_identify = "test.sh"
INITSCRIPT_PARAMS_identify = "start 60 S ."

#编译,这个任务的默认行为是,如果找到一个makefile (makefile, makefile或GNUmakefile),就运行oe_runmake函数
do_compile() {
	cp ../test.bin				test.bin
	cp ../test_log.conf 		log.conf
	cp ../test.sh				test.sh
}

#打包到文件系统
do_install() {
	install -d ${D}${bindir}
	install -m 0755 test.bin ${D}${bindir}

	install -d ${D}${sysconfdir}/init.d
	install -m 0755 test.sh ${D}${sysconfdir}/init.d

	install -d ${D}${sysconfdir}/rcS.d
	install -m 0777 test.sh ${D}${sysconfdir}/rcS.d/S61identify.sh

	install -d ${D}${sysconfdir}/test
	install -m 0755 log.conf ${D}${sysconfdir}/test/log.conf
}

yocto官方层级包(layers)、配方(recipes *.bb文件)查询: https://layers.openembedded.org/layerindex/branch/krogoth/recipes/?q=libc

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值