Yocto new layer
如何添加一个新的Layer
use bitbake-layers script
A example layer will be created like this:
添加 layer 到项目
添加一个 helloworld 配方到 layer
# at poky/build
cd ../meta-hellp
# at poky/meta-hello
mkdir -p recipes-hello/hello && cd recipes-hello/hello
mkdir files && cd files
vim hello.c
a hello.c
like this:
add a recipe file
a hello_1.0.bb
like this:
The md5sum was calculated from common_licenses/MIT
poky/meta/files/common_licenses/MIT
SUMMARY = "Simple helloworld application" SECTION = "hello" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" TARGET_CC_ARCH += "${LDFLAGS}" SRC_URI = "file://hello.c" S = "${WORKDIR}" do_compile() { ${CC} hello.c -o hello } do_install() { install -d ${D}${bindir} install -m 0755 hello ${D}${bindir} }
finnally, specify the addition
at poky/build/conf/local.conf
add a new line