I have a requirement to inherit an image class( *.bbclass
)and run a script from image recipe but my do_compile
is not getting called.
For simplicity, I am putting up minimal sample code from poky
source here which does similar thing which I want.
I have created a test recipe called inherit-test_0.1.bb
under my own created layer meta-raxy
.
Here is the inherit-test_0.1.bb
recipe file,
SUMMARY = "Inherit Test Application"
LICENSE = "CLOSED"
inherit image
do_compile () {
echo MyRecipe
}
When I compile this recipe by bitbake inherit-test
after setting up oe-init-build-env
, I do not see my do_compile
gets compiled since there is no log file present in working directory poky/build/tmp/work/qemux86-poky-linux/inherit-test/0.1-r0/temp/log.do_compile
with the line MyRecipe
And if I remove inherit image
, I see do_compile
gets compiled as shown below in log file,
DEBUG: Executing shell function do_compile
MyRecipe
DEBUG: Shell function do_compile finished
Any help will really be appreciated.
Inheriting "image" states do_compile[noexec] = "1"
, among others, (as you can see in the image.bblcass file) which means that the do_compile task won't be executed. That is one of the several ways Yocto offers for delete a task.