In Yocto >=4.0 this is actually pretty easy to achieve. The packagegroup
method did not work for me at all.
I don't know if this works in older versions though.
Create a new file in your custom layer, e.g. meta-custom/classes/norootfs.bbclass
and put the following lines in there (as far as I noticed the order does not matter):
Either use
deltask do_deploy
deltask do_image
deltask do_rootfs
deltask do_image_complete
deltask do_image_setscene
or
noexec do_deploy
noexec do_image
noexec do_rootfs
noexec do_image_complete
noexec do_image_setscene
(noexec: What is the difference between do_compile[noexec] and empty function in bitbake recipe?)
then in your meta-custom/recipes-core/images/myimage.bb
add norootfs
to your other inherit commands
e.g. the most basic one
inherit core-image norootfs
You will notice your number of tasks decreasing by a fair amount (mine from ~4700 to ~3000) and there is no complete rootfs image anymore in build/tmp/deploy/images
, except for bzImage and modules, just the plain ipk files in build/tmp/deploy/ipk
.
I got this information by looking at https://docs.yoctoproject.org/ref-manual/tasks.html?highlight=do_image and .bbclass files in meta/classes
where deltask
is frequently used.