<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 24, 2016 at 12:51 PM, Ed Bartosh <span dir="ltr">&lt;<a href="mailto:ed.bartosh@linux.intel.com" target="_blank">ed.bartosh@linux.intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, May 23, 2016 at 08:13:28AM -0400, Ian Geiser wrote:<br>
</span><span class="">&gt;  &gt; On Thu, May 19, 2016 at 05:52:45AM -0400, Ian Geiser wrote:<br>
&gt;  &gt; &gt; Greetings, I am trying to learn &quot;wic&quot; and have been confused as how to create a &quot;live&quot; style image.  I am following &quot;<a href="http://www.yoctoproject.org/docs/1.5.2/dev-manual/dev-manual.html#creating-partitioned-images" rel="noreferrer" target="_blank">http://www.yoctoproject.org/docs/1.5.2/dev-manual/dev-manual.html#creating-partitioned-images</a>&quot; but am getting confused on the target to use to create the a file system that has a single squashfs file containing my root file system.<br>
&gt;  &gt; &gt;<br>
&gt;  &gt; &gt; My desired partition layout is as follows:<br>
&gt;  &gt; &gt;       40MiB                 40MiB               300MiB<br>
&gt;  &gt; &gt; +--------------------+-----------------+-----------------------------+<br>
&gt;  &gt; &gt; |      BOOT (esp)    |    DATA (fat)   |          ROOT (live)        |<br>
&gt;  &gt; &gt; +--------------------+-----------------+-----------------------------+<br>
&gt;  &gt; &gt;<br>
&gt;  &gt; &gt; BOOT - efi boot partition with kernel and initramfs<br>
&gt;  &gt; &gt; DATA - generic fat filesystem to hold configuration files<br>
&gt;  &gt; &gt; ROOT - an ext4 filesystem that contains a single os.img, which is a squashfs file.<br>
&gt;  &gt; &gt;<br>
&gt;  &gt; &gt; I have ROOT and DATA figured out but I am at a loss as how to generate the os.img file and copy it into ROOT.  If I generate the os.img file with bitbake and then use the &quot;-r&quot; option to manually supply a directory structure it works, but I would rather have it done from a wks file for automation reasons.<br>
&gt;  &gt; &gt;<br>
&gt;  &gt; &gt; Any hints?<br>
&gt;  &gt; I&#39;d suggest to use wic image type and generate your image by bitbake.<br>
&gt;  &gt; You can find example <a href="http://wic-image-minimal.bb" rel="noreferrer" target="_blank">wic-image-minimal.bb</a> and wic-image-minimal.wks in ../meta-selftest/recipes-test/images/<br>
&gt;  &gt;<br>
&gt; This is where I started.  I was able to make it work but not with my configuration above.  It looks like I can use a type of &quot;fsimage&quot; for my &quot;ROOT&quot; partition, but I have not been able to figure out the syntax there yet.  For &quot;BOOT&quot; I am at a complete loss.  In theory &quot;bootimg-efi&quot; but there doesn&#39;t seem to be a way to provide an initramfs.<br>
<br>
</span>How about creating recipe to prepare content or your boot partition and then using --source rootfs --rootfs-dir=&lt;your recipe&gt; ?<br>
This is much more generic way of creating partitioned images from my<br>
point of view. Image recipes should take care of content and wic takes care of<br>
putting that content into partitions according to the partitioning<br>
scheme described in .wks<br>
<br>
Does it make sense for you?<br>
<span class=""><br>
&gt;<br>
&gt;  &gt; You can probably do the same by using wic plugins, but I&#39;d not suggest<br>
&gt;  &gt; to go this way. Using wic image type is simpler, more consistent, easier to do and provides higher level of automation.<br>
&gt;<br>
&gt; Is using the wic image type and a plugin mutually exclusive?<br>
</span>No, not at all. However, I personally found the way I described above<br>
more consistent, flexible and easy to implement and maintain.<br></blockquote></div><br>The thing is, it&#39;s likely the machine/bsp setting the WKS_FILE, yet in OE/yocto we prefer machine/distro/image to be orthogonal. If you&#39;re injecting machine specific logic into an image, that image isn&#39;t going to be generally useful for all machines, and so violates our philosophy.<br>-- <br><div class="gmail_signature">Christopher Larson<br>clarson at kergoth dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div>
</div></div>