I would like to add pre-built ipk package to the final image using Yocto at build time. What should be the correct workflow for this?
What I have tried:
1) As suggested here I used bin_package class and added ipk package to the SRC_URI
inherit bin_package
...
SRC_URI = "file://test.ipk;subdir=test-1.0"
This unpacks the package and repack it again. Unfortunately it omitted some control scripts, etc. when unpacking to work directory. Don't know why? With additional small modifications I got some usable solution, but I doubt that this is correct approach.
2) Use the package in original form and install it directly to rootfs I tried something like this
inherit deploy
SRC_URI = "file://test.ipk;unpack=0"
do_deploy() {
install -D ${WORKDIR}/test.ipk ${DEPLOY_DIR_IPK}/test.ipk
}
addtask deploy after do_compile
I don't know if I can just copy package to e.g. "${DEPLOY_DIR_IPK}" and how to let Yocto know that the package is available and that I could use "IMAGE_INSTALL_append += "test"" to have it installed in the image.
Thanks for inputs!