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