6

I would to split and application into multiple packages. Basically I just would like to add an other one which could be build by using a specific image.

Inside the .bb file associated to 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 I forget ?

ogs
  • 1,139
  • 8
  • 19
  • 42
  • What is "mrvl-tools"? You must also have a recipe for it. – KBart Feb 06 '15 at 12:28
  • I already have a "mrvl" recipes, I added script.sh and api.conf under /mrvl/files and I just would like to split the recipe in order to include these both files just in my images dedicated for test. I followed : http://www.yoctoproject.org/docs/1.1/poky-ref-manual/poky-ref-manual.html#splitting-an-application-into-multiple-packages – ogs Feb 06 '15 at 12:37
  • Do install script.sh and api.conf in the do_install()? Otherwise, mrvl-tools will be empty, and thus not created... – Anders Feb 06 '15 at 13:12
  • How is the file named and where is it stored? If it is in its own layer, do you have this layer added to your configuration? – volker Feb 06 '15 at 19:44
  • These files are stored under meta-bsp/recipes-kernel/mrvl-test/files and the layer meta-bsp is added to the configuration bblayers.conf – ogs Feb 09 '15 at 08:31

4 Answers4

4

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.

Ross Burton
  • 3,516
  • 13
  • 12
2

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" \
Oleg Kokorin
  • 2,288
  • 2
  • 16
  • 28
0

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

ogs
  • 1,139
  • 8
  • 19
  • 42
  • Can you show us the complete .bb-file? As mrl-test-tools is still empty, I don't think that you're installing script.sh and api.conf properly. Thus, I'd like to see the complete recipe. And remove `ALLOW_EMPTY_${PN}-tools = "1"`, as you don't want to get an empty package. Is the layer public somewhere? – Anders Feb 10 '15 at 08:59
0

Don't you need to add file in the extra files path

THISAPPENDFILESDIR := "${THISDIR}/file"
FILESEXTRAPATHS_prepend := "${THISDIR}/file:"
Mohammad Azim
  • 2,604
  • 20
  • 21