Skip to contentSkip to conversation

2 images with single Bitbake recipe

DISCUSSION Nikolay Dimitrov 4 participants 8 messages Mar 9, 2015 – Mar 10, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi guys,

I need an advice for the following Yocto use case.

My system has to boot via minimal initramfs and then must use the full rootfs. I can use 2 separate recipes to generate the 2 images (minimal initramfs, complete rootfs), but I prefer to create all my build- products via single bitbake command.

So, is it possible to build these 2 images with 1 recipe, and if "yes" then how?

Thanks in advance. Regards,
Nikolay

#1 lore raw
Quoted 7 lines · Nikolay Dimitrov

Hi guys,

I need an advice for the following Yocto use case.

Quoted 8 lines

My system has to boot via minimal initramfs and then must use the full rootfs. I can use 2 separate recipes to generate the 2 images (minimal initramfs, complete rootfs), but I prefer to create all my build- products via single bitbake command.

So, is it possible to build these 2 images with 1 recipe, and if "yes" then how?

Look at how initramfs http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#ref-tasks-bundle_initramfs
and also meta/conf/local.conf.sample.extended

Quoted 7 lines

Thanks in advance. Regards,
Nikolay

Signature · 4 lines
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
#2 lore raw

Hi Khem,

Quoted 12 lines · Khem Raj
Quoted 12 lines · Nikolay Dimitrov

Hi guys,

I need an advice for the following Yocto use case.

My system has to boot via minimal initramfs and then must use the full rootfs. I can use 2 separate recipes to generate the 2 images (minimal initramfs, complete rootfs), but I prefer to create all my build- products via single bitbake command.

Quoted 7 lines
Quoted 3 lines

So, is it possible to build these 2 images with 1 recipe, and if "yes" then how?

Look at how initramfs http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#ref-tasks-bundle_initramfs
and also meta/conf/local.conf.sample.extended

Thanks for answering. INITRAMFS_IMAGE_BUNDLE doesn't achieve what I need, instead it merges the kernel image and initramfs in a single file. What I need is, instead of invoking:

bitbake myproduct-image
bitbake myproduct-initrams-image

to invoke:

bitbake myproduct-combined-image

...which should create 2 separate images.

Regards,
Nikolay

#3 lore raw
Quoted 4 lines · Nikolay Dimitrov

bitbake myproduct-combined-image

...which should create 2 separate images.

If typing both is too much bother, have a recipe that just has DEPENDS=myproduct-image myproduct-initramfs-image and stub out all the other tasks so it doesn't do anything.

Ross

#7 lore raw
In reply to Nikolay Dimitrov
Quoted 27 lines · Nikolay Dimitrov

Hi Khem,

Quoted 12 lines · Khem Raj
Quoted 12 lines · Nikolay Dimitrov

Hi guys,

I need an advice for the following Yocto use case.

My system has to boot via minimal initramfs and then must use the full rootfs. I can use 2 separate recipes to generate the 2 images (minimal initramfs, complete rootfs), but I prefer to create all my build- products via single bitbake command.

Quoted 7 lines
Quoted 3 lines

So, is it possible to build these 2 images with 1 recipe, and if "yes" then how?

Look at how initramfs http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#ref-tasks-bundle_initramfs
and also meta/conf/local.conf.sample.extended

Thanks for answering. INITRAMFS_IMAGE_BUNDLE doesn't achieve what I need, instead it merges the kernel image and initramfs in a single file. What I need is, instead of invoking:

Quoted 8 lines

bitbake myproduct-image
bitbake myproduct-initrams-image

to invoke:

bitbake myproduct-combined-image

...which should create 2 separate images.

Just list them both on one command:
bitbake myproduct-image myproduct-initrams-image

If you really want, you could write a recipe myproduct-combined-image which includes
DEPENDS = "myproduct-image myproduct-initrams-image"

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#4 lore raw
In reply to Burton, Ross

Hi Ross,

Quoted 4 lines · Ross

On 9 March 2015 at 19:56, Nikolay Dimitrov <[email protected] <mailto:[email protected]>> wrote:

Quoted 8 lines

bitbake myproduct-combined-image

...which should create 2 separate images.

If typing both is too much bother, have a recipe that just has DEPENDS=myproduct-image myproduct-initramfs-image and stub out all the other tasks so it doesn't do anything.

Thanks for the idea, I'll try the add the image as a dependency.

Regards,
Nikolay

PS: It's not just a matter of typing. Other people need to use the results of my work, and there are already lots of other manual steps when a software needs to be built and deployed on the target, so adding one more step doesn't improve our lives.

#8 lore raw
In reply to Gary Thomas

Hi Gary,

Quoted 38 lines · Gary Thomas
Quoted 37 lines · Nikolay Dimitrov

Hi Khem,

Quoted 18 lines · Khem Raj
Quoted 8 lines

On Mar 9, 2015, at 12:22 PM, Nikolay Dimitrov <[email protected]> wrote:

Hi guys,

I need an advice for the following Yocto use case.

Quoted 8 lines

My system has to boot via minimal initramfs and then must use the full rootfs. I can use 2 separate recipes to generate the 2 images (minimal initramfs, complete rootfs), but I prefer to create all my build- products via single bitbake command.

So, is it possible to build these 2 images with 1 recipe, and if "yes" then how?

Quoted 4 lines

Look at how initramfs
http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#ref-tasks-bundle_initramfs

and also meta/conf/local.conf.sample.extended

Thanks for answering. INITRAMFS_IMAGE_BUNDLE doesn't achieve what I need, instead it merges the kernel image and initramfs in a single file. What I need is, instead of invoking:

bitbake myproduct-image
bitbake myproduct-initrams-image

to invoke:

bitbake myproduct-combined-image

Quoted 8 lines
Quoted 1 line

...which should create 2 separate images.

Just list them both on one command:
bitbake myproduct-image myproduct-initrams-image

If you really want, you could write a recipe myproduct-combined-image which includes
DEPENDS = "myproduct-image myproduct-initrams-image"

Thanks. I'll try that and will share what worked for me.

Regards,
Nikolay