1、在sources/meta-imx/meta-bsp目录下增加recipes-roofs/rootfs-app/
mkdir -p recipes-roofs/rootfs-app
touch recipes-roofs/rootfs-app/rootfs-app.bb
即:sources/meta-imx/meta-bsp/recipes-roofs/rootfs-app/rootfs-app.bb
查看是否能被编译到,可以看sources/meta-imx/meta-bsp/conf/layer.conf中
# We have a packages directory, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
https://george-calin.medium.com/how-to-prepare-a-helloworld-c-recipe-with-yocto-project-1f74c296a777