Reputation: 1239
I would like to split an application into multiple packages. Basically I just wish to add another one which could be built by using a specific image.
Inside the .bb file associated with the application I added:
SRC_URI = " \
...
file://api.conf \
file://script.sh \
"
PACKAGES =+ "${PN} ${PN}-tools"
FILES_${PN}-tools = "${bindir}/mrvl/tools/script.sh \
${sysconfdir}/mrvl/api.conf \
"
Then, I added the following line in my bb image test:
IMAGE_INSTALL += " mrvl-tools"
I am using the command bitbake image-test
which returns:
ERROR: Nothing RPROVIDES 'mrvl-tools' (but /home/usr/../image-test.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'mrvl-tools' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['mrvl-tools']
ERROR: Required build target 'image-test' has no buildable providers.
Missing or unbuildable dependency chain was: ['image-test', 'mrvl-tools']
I followed the same definition of the bluez5-obex
package and IMAGE_ISTALL += " bluez5-obex"
works..
What have I forgot?
Upvotes: 6
Views: 51947
Reputation: 300
I faced the similar problem. I changed the local.conf file. It should include the name of the .bb file not the bblayer name. For example I have a rdepend-example layer:
/home/abu/Documents/yocto_bb/projects/yocto/poky/meta-rdependlayer/recipes-example/rdepend-example/hello_1.1_r1.bb
now I add this in my loca.conf file as
IMAGE_INSTALL:append = " hello"
you will get error if you write following line in your local.conf file:
IMAGE_INSTALL:append = " rdepend-example"
Upvotes: 0
Reputation: 2672
it's good to verify if the layer has been added to the
conf/bblayers.conf
this is where it usually starts with "nothing provides"
BBLAYERS += " \
${BSPDIR}/sources/"your layer" \
Upvotes: 2
Reputation: 2933
Don't you need to add file
in the extra files path
THISAPPENDFILESDIR := "${THISDIR}/file"
FILESEXTRAPATHS_prepend := "${THISDIR}/file:"
Upvotes: 0
Reputation: 1239
Thank Ross Burton for you answer. But I modified the .bb file and it currently contains the following lines :
SUMMARY_${PN}-tools="mrvl tools test"
PACKAGE_BEFORE_PN += "${PN}-tools"
RDEPENDS_${PN}-tools = ""
FILES_${PN}-tools = "${bindir}/mrvl/tools/script.sh ${sysconfdir}/mrvl/api.conf"
ALLOW_EMPTY_${PN}-tools = "1"
The build finished and the package named mrvl-test-tools_0.1-r0.ipk is well created under /build/tmp/deploy/ipk/board/ but it contains nothing. This is due to the variable "ALLOW_EMPTY..="1"". and without this line the build failed and the following message is displayed
Collected errors:
* opkg_install_cmd: Cannot install package mrvl-test-tools.
ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/../build/tmp/work/oe-linux/test-img/1.0-r0/temp/log.do_rootfs.4639
ERROR: Task 7 (/home/../sources/meta-board/recipes-images/images/test-img.bb, do_rootfs) failed with exit code '1'
I do not understand why files are now not included into the .ipk
Upvotes: 0
Reputation: 4053
Anders is close.
First, your PACKAGES definition is wrong, all you need is PACKAGES += "${PN}-tools".
But the important thing to remember is that FILES is evaluated in the order of PACKAGES, so ${PN} is processed first and the default FILES_${PN} contains ${bindir} ${sysconfdir}, so all of ${bindir} and ${sysconfdir} is in ${PN}. Then it tries to process ${PN}-tools and none of the expressions in its FILES match any files remaining, so the package is empty.
So, either set FILES_${PN} to what you want it to contain, or use PACKAGE_BEFORE_PN=${PN}-tools to inject PN-tools before PN in the default PACKAGES value. Reading bitbake.conf will help make this clearer, I promise.
Note that I'd have expected the error to be a rootfs-time failure not an image construction failure, but hopefully this is the problem.
Upvotes: 4