Skip to contentSkip to conversation

image.bbclass vs core-image.bbclass

DISCUSSION Gary Thomas 2 participants 4 messages Jul 17, 2015

lore
Share & tools
lore
#0 lore raw

Why are some ROOTFS_POSTPROCESS_COMMANDs being set in image.bbclass and others in core-image.bbclass? If I build an image using only image.bbclass, I miss the settings from core-image.bbclass (which is somewhat misnamed IMO since it's heavier than image.bbclass)?

Is there some reason not to have all of the ROOTFS_POSTPROCESS_COMMANDs just in image.bbclass alone?

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#1 lore raw

Hi Gary,

Quoted 7 lines · On Friday 17 July 2015 04:56:43 Gary Thomas wrote:

Why are some ROOTFS_POSTPROCESS_COMMANDs being set in image.bbclass and others in core-image.bbclass? If I build an image using only image.bbclass, I miss the settings from core-image.bbclass (which is somewhat misnamed IMO since it's heavier than image.bbclass)?

Is there some reason not to have all of the ROOTFS_POSTPROCESS_COMMANDs just in image.bbclass alone?

The existence of this class is kind of a legacy from when parts of Poky became OE-Core - originally core-image.bbclass was called poky-image.bbclass, and what was in it was specific to Poky. We had to bring it over though because all of our example images, which we need to have for verification (if nothing else), inherited from it and still do. We've made minor adjustments to core- image.bbclass since then but there are still things in there that are clearly "distro" type definitions that don't make sense for everyone; so far nobody has really stepped up to find any better common items or reasonable defaults (perhaps there aren't any, though I doubt that).

There is a bug open assigned to me to try to sort this out, but to be honest I've been struggling with how to best to do it:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=5424

I'm open to any suggestions, because I do think the dichotomy between these classes ought to be resolved if it can be done practically.

Specifically on the ROOTFS_POSTPROCESS_COMMANDs, those do look like they ought to somehow be in image.bbclass if they can be added in a manner that doesn't interfere with people's ability to create images that aren't rootfses.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#2 lore raw
Quoted 24 lines · Paul Eggleton

Hi Gary,

Quoted 7 lines · On Friday 17 July 2015 04:56:43 Gary Thomas wrote:

Why are some ROOTFS_POSTPROCESS_COMMANDs being set in image.bbclass and others in core-image.bbclass? If I build an image using only image.bbclass, I miss the settings from core-image.bbclass (which is somewhat misnamed IMO since it's heavier than image.bbclass)?

Is there some reason not to have all of the ROOTFS_POSTPROCESS_COMMANDs just in image.bbclass alone?

The existence of this class is kind of a legacy from when parts of Poky became OE-Core - originally core-image.bbclass was called poky-image.bbclass, and what was in it was specific to Poky. We had to bring it over though because all of our example images, which we need to have for verification (if nothing else), inherited from it and still do. We've made minor adjustments to core- image.bbclass since then but there are still things in there that are clearly "distro" type definitions that don't make sense for everyone; so far nobody has really stepped up to find any better common items or reasonable defaults (perhaps there aren't any, though I doubt that).

There is a bug open assigned to me to try to sort this out, but to be honest I've been struggling with how to best to do it:

Quoted 8 lines
   https://bugzilla.yoctoproject.org/show_bug.cgi?id=5424

I'm open to any suggestions, because I do think the dichotomy between these classes ought to be resolved if it can be done practically.

Specifically on the ROOTFS_POSTPROCESS_COMMANDs, those do look like they ought to somehow be in image.bbclass if they can be added in a manner that doesn't interfere with people's ability to create images that aren't rootfses.

It seems that many of the ROOTFS_POSTPROCESS_COMMANDs in image.bbclass already assume that a rootfs is being built.

To me the ROOTFS_POSTPROCESS_COMMANDs that are in core-image.bbclass don't seem any more invasive than the ones in image.bbclass. For starters, I'd like to see them moved to image.bbclass. It's also quite strange that the read-only-rootfs hook is defined in image.bbclass but only invoked from core-image.bbclass?? [That's the one that lead me down this road]

Any objections to a patch that does that?

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#3 lore raw
Quoted 32 lines · On Friday 17 July 2015 05:30:12 Gary Thomas wrote:
Quoted 31 lines · Paul Eggleton

Hi Gary,

Quoted 7 lines · On Friday 17 July 2015 04:56:43 Gary Thomas wrote:

Why are some ROOTFS_POSTPROCESS_COMMANDs being set in image.bbclass and others in core-image.bbclass? If I build an image using only image.bbclass, I miss the settings from core-image.bbclass (which is somewhat misnamed IMO since it's heavier than image.bbclass)?

Is there some reason not to have all of the ROOTFS_POSTPROCESS_COMMANDs just in image.bbclass alone?

The existence of this class is kind of a legacy from when parts of Poky became OE-Core - originally core-image.bbclass was called poky-image.bbclass, and what was in it was specific to Poky. We had to bring it over though because all of our example images, which we need to have for verification (if nothing else), inherited from it and still do. We've made minor adjustments to core- image.bbclass since then but there are still things in there that are clearly "distro" type definitions that don't make sense for everyone; so far nobody has really stepped up to find any better common items or reasonable defaults (perhaps there aren't any, though I doubt that).

There is a bug open assigned to me to try to sort this out, but to be honest>
I've been struggling with how to best to do it:

   https://bugzilla.yoctoproject.org/show_bug.cgi?id=5424

I'm open to any suggestions, because I do think the dichotomy between these
classes ought to be resolved if it can be done practically.

Quoted 7 lines
Quoted 4 lines

Specifically on the ROOTFS_POSTPROCESS_COMMANDs, those do look like they ought to somehow be in image.bbclass if they can be added in a manner that doesn't interfere with people's ability to create images that aren't rootfses.

It seems that many of the ROOTFS_POSTPROCESS_COMMANDs in image.bbclass already assume that a rootfs is being built.

You could well be right yes.

Quoted 7 lines

To me the ROOTFS_POSTPROCESS_COMMANDs that are in core-image.bbclass don't seem any more invasive than the ones in image.bbclass. For starters, I'd like to see them moved to image.bbclass. It's also quite strange that the read-only-rootfs hook is defined in image.bbclass but only invoked from core-image.bbclass?? [That's the one that lead me down this road]

Any objections to a patch that does that?

None on my end, certainly...

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre