Hi Marcus,
I have created a separate image.bb file for my target. Its based on wandboard, but I'm sure your's will be whatever you want.
I have a wandboard-image.bb which contains a minimal image inherited from core-image and my own application.
file wandboard-image.bb:
<pre>
DESCRIPTION = "A wandboard base image"<br/>
IMAGE_INSTALL = "packagegroup-core-boot packagegroup-machine-base ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${my_extra_application}"<br/>
inherit core-image<br/>
</pre>
I can use this wandboard-image to create a working image that I use to write to SD card successfully. I would expect you would have your own variant of this perhaps.
Then to create a separate binary which puts all of that into one kernel which contains the root filesystem as an initramfs:
file wandboard-image-initramfs.bb: ## Comments added with 2 ##
<pre>
include wandboard-image.bb ## This pulls in the above tested image to define my filesystem<br>
DESCRIPTION = "An Initramfs wandboard image..."<br>
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" ## This is required to make an initramfs filesystem<br>
PACKAGE_INSTALL = "${IMAGE_INSTALL}" ## This is defined in the included image, and duplicates my original image into the initramfs.<br>
</pre>
So that defines how the initramfs image should be created for my image.
Then to actually ask it to be built (it is created as a separate binary in the tmp/deploy/images/ directory) you need to provide the reference in the conf/local.conf