<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>7830</bug_id>
          
          <creation_ts>2015-06-01 08:11:20 +0000</creation_ts>
          <short_desc>Lack of clean way to generate images.</short_desc>
          <delta_ts>2015-06-04 11:22:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>configuration</component>
          <version>1.8.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Igor Stoppa">igor.stoppa</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>alexander.kanevskiy</cc>
    
    <cc>eduard.bartosh</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>51376</commentid>
    <comment_count>0</comment_count>
    <who name="Igor Stoppa">igor.stoppa</who>
    <bug_when>2015-06-01 08:11:20 +0000</bug_when>
    <thetext>Image creation is implemented in a way that is difficult to track, understand and modify.
Worse, it encourages proliferation of too many recipes trying to do almost the same, each in its own way.

In particular: there are a bunch of different recipes all related to image creation (image.bbclass, boot.bbclass, etc.) and they even rely on python modules from oe (image.py), which depends on various parameters set from the recipes.

What I would have expected:

1) build and install desired/required packages

2) create list or lists of packages to deploy, specifying the location (ex: root partition of efi dir, one or more rootfs - yes, some systems might have more than one) - such list cold be an enhanced the manifest or a collection of manifests

3) deploy files according to the manifest(s)

4) execution of wic, with .wks file describing, one for each line, the partitions, the content (directory from previous point), optionally the size.
It should work both with directories (wic creates the partition) and files (wic does a binary dump). The latter case would support special raw partitions (ex: devices requiring the kernel in own specific location.)

As user, I should not have to reverse engineer several layers of recipes and python libraries, writing own callbacks and setting a multitude of parameters.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51390</commentid>
    <comment_count>1</comment_count>
    <who name="Igor Stoppa">igor.stoppa</who>
    <bug_when>2015-06-01 15:23:11 +0000</bug_when>
    <thetext>The closest thing to what I described in point 3) is the tar image type, however that is still very bad, because it wastes processor time and disk space in creating a tarball that will not be used as such.

From the perspective of performing the task in the most frugal way, it is preferable to avoid unnecessary steps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51395</commentid>
    <comment_count>2</comment_count>
    <who name="Igor Stoppa">igor.stoppa</who>
    <bug_when>2015-06-01 16:02:13 +0000</bug_when>
    <thetext>This bug seems to be converging toward #7672, although it&apos;s not a duplicate.
They are rather complementary.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51500</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-06-04 11:14:57 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Image creation

Just to be clear, most people with experience of the system think of &quot;image creation&quot; as the construction of the rootfs with the package mamager (or whatever). There is then a packaging up of the rootfs phase (as a tarball or whatever) which is the part I believe you&apos;ve concerns with.

The bug title can therefore mislead people as to where the concern is.

 is implemented in a way that is difficult to track,
&gt; understand and modify.
&gt; Worse, it encourages proliferation of too many recipes trying to do almost
&gt; the same, each in its own way.
&gt; 
&gt; In particular: there are a bunch of different recipes all related to image
&gt; creation (image.bbclass, boot.bbclass, etc.) and they even rely on python
&gt; modules from oe (image.py), which depends on various parameters set from the
&gt; recipes.
&gt; 
&gt; What I would have expected:
&gt; 
&gt; 1) build and install desired/required packages
&gt; 
&gt; 2) create list or lists of packages to deploy, specifying the location (ex:
&gt; root partition of efi dir, one or more rootfs - yes, some systems might have
&gt; more than one) - such list cold be an enhanced the manifest or a collection
&gt; of manifests
&gt; 
&gt; 3) deploy files according to the manifest(s)

The way the system works, do_rootfs is a fairly monolithic task which does all of the above in steps, generating the rootfs directory and manifests and then packaging/deploying the result into a variety of forms. We do care about performance and where we can do things in parallel, we do.

The reasons for do_rootfs being monolithic are historical. We did refactor the code there in a recent previous release, moving lots of archaic shell over to python classes which are a lot more understandable. Our intention was to further split the code up into specific tasks but as yet, we&apos;ve not done this.

&gt; 4) execution of wic, with .wks file describing, one for each line, the
&gt; partitions, the content (directory from previous point), optionally the size.
&gt; It should work both with directories (wic creates the partition) and files
&gt; (wic does a binary dump). The latter case would support special raw
&gt; partitions (ex: devices requiring the kernel in own specific location.)
&gt; 
&gt; As user, I should not have to reverse engineer several layers of recipes and
&gt; python libraries, writing own callbacks and setting a multitude of
&gt; parameters.

I think #7672 is our best bet for moving this forwards. It gives a way forward to intetgrate wic into the system and doesn&apos;t break existing functionality.

Once we have that, we can see which of the existing classes we can replicate with wic and the remove the old classes as obsolete. What we likely need is a set of bugs which split the process into logical steps, even one per class we intend to replace with wic functionality. That does leave the question of the objective of this specific bug and which actions would mean we&apos;d resolved it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51501</commentid>
    <comment_count>4</comment_count>
    <who name="Igor Stoppa">igor.stoppa</who>
    <bug_when>2015-06-04 11:22:01 +0000</bug_when>
    <thetext>ok, let&apos;s proceed as you propose</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>