I am a beginner in Yocto, and I have created an image in my build folder using
bitbake-layer create-layer meta-helloworld
Inside my Helloworld folder I have the recipe (.bb) file and the C source code to a helloworld program. After succesfully bitbaking my Layer, I have added it to the image by editing local.conf adding the following line:
IMAGE_INSTALL_append = " helloworld"
This worked perfectly on the board. (I was able to run the helloworld program from the board's terminal)
However, as it's pointed in challinan's answer in this question, this is not the best practice, and I should do it by adding a bbappend file in my layer, and according to the answer in the same question, add the dependencies in this file. I am however not aware of what these dependencies are nor how should I write them. I looked on the metadata and found some bbappend files but none of them provided anything very insightful.
How do I add a custom layer to image using bbapend file?
Further information: I am developping on a iMX6 board, using NXP sources but with a custom kernel. I am using devtool to change the kernel, but my custom layer recipe is outside the devtool (workspace) folder.