int main() {
printf("Hello, World!\n");
return 0;
}
DESCRIPTION = "Recipe created by bitbake-layers"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://${BSPDIR}/poky/build-microchip/my_layer/recipes-example/helloworld/helloworld/helloworld.c"
S = "/home/user/my_dir/poky/build-microchip/conf"
do_compile() {
${CC} helloworld.c -o helloworld
}
do_install() {
install -d ${D}${bindir}
install -m 0755 helloworld ${D}${bindir}
}
bitbake helloworld
ERRORdo_compile()块中的错误helloworld.c文件未找到
您可以将.c文件放在您的食谱的子文件夹中,例如
sources/your_layer
└── myhello
├── files
│ └── helloworld.c
└── helloworld.bb
并修改配方
SRC_URI = "file://helloworld.c"