<div dir="ltr"><div><div><div><div><div><div><div><div><div>Hi Chris, thanks for your feedback.<br><br>On Fri, Jan 18, 2013 at 4:57 PM, Chris Larson &lt;<a href="mailto:clarson@kergoth.com">clarson@kergoth.com</a>&gt; wrote:<br>
&gt; Just override do_rootfs in your &#39;myimg&#39; recipe and call it done.<br><br>I was afraid that&#39;s what you&#39;d say. I&#39;m obviously doing something wrong<br><span class=""></span><span class=""></span>somewhere because I can&#39;t seem to get the results I would like.<br>
<br>&gt; Beyond that, a directory isn&#39;t a layer. You have to have conf/layer.conf and<br>&gt; add the layer to bblayers.conf for bitbake to see it as a layer.<br><br>:-) I cut it down to only show the relevant parts :-)<br>
<br>My goal is to write my own methods and procedures for creating file system<br>images. I would like to do this in a layer so as to not disturb the existing<br>image-creation routines which are provided. My understanding is that the<br>
image creation work takes place in the &quot;do_rootfs&quot; task.<br><br>As a start, in order to prove to myself that my routines were completely<br>replacing the base ones, I thought that if I wrote an empty do_rootfs routine in<br>
my layer, I could run a build and essentially end up with nothing (or next to<br>nothing) in the tmp/deploy/images directory. But this isn&#39;t the results I&#39;m seeing.<br><br>Here is my code:<br><br>meta-trevor/<br>|-- README<br>
|-- classes<br>|   `-- twrootfs.bbclass<br>|           addtask rootfs<br>|           twrootfs_do_rootfs() {<br>|                   echo &quot;rootfs from meta-trevor!&quot;<br>|           }<br>|           EXPORT_FUNCTIONS do_rootfs<br>
|-- conf<br>|   `-- layer.conf<br>|           BBPATH := &quot;${BBPATH}:${LAYERDIR}&quot;<br>|<br>|           BBFILES := &quot;${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \<br>|                  ${LAYERDIR}/recipes-*/*/*.bbappend&quot;<br>
|<br>|           BBFILE_COLLECTIONS += &quot;trevor&quot;<br>|           BBFILE_PATTERN_trevor := &quot;^${LAYERDIR}/&quot;<br>|           BBFILE_PRIORITY_trevor = &quot;6&quot;<br>`-- recipes-core<br>    `-- images<br>        `-- <a href="http://bboverride.bb">bboverride.bb</a><br>
                DESCRIPTION = &quot;A small-ish image that starts with busybox, but then adds as many of the &#39;real&#39; programs as possible&quot;<br><br>                IMAGE_INSTALL = &quot;packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL} \<br>
                        trace-cmd bash util-linux coreutils vim-tiny openssh procps grep iputils gzip bzip2 sed \<br>                        tar net-tools gawk findutils ncurses tzdata less bc wget psmisc file&quot;<br><br>
                IMAGE_LINGUAS = &quot; &quot;<br><br>                LICENSE = &quot;MIT&quot;<br><br>                inherit core-image<br>                inherit twrootfs<br><br>                ROOTFS_POSTPROCESS_COMMAND += &quot;remove_packaging_data_files ; &quot;<br>
<br><br><br></div>Then, in my build area:<br><br>conf/<br>|-- bblayers.conf<br>|       # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf<br>|       # changes incompatibly<br>|       LCONF_VERSION = &quot;6&quot;<br>
|<br>|       BBPATH = &quot;${TOPDIR}&quot;<br>|       BBFILES ?= &quot;&quot;<br>|<br>|       BBLAYERS ?= &quot; \<br>|         /home/trevor/devel/yocto/git-method/poky/meta \<br>|         /home/trevor/devel/yocto/git-method/poky/meta-yocto \<br>
|         /home/trevor/devel/yocto/git-method/poky/meta-yocto-bsp \<br>|         /home/trevor/devel/yocto/git-method/poky/meta-openembedded/meta-oe \<br>|         /home/trevor/devel/yocto/meta-trevor \<br>|         &quot;<br>
|       BBLAYERS_NON_REMOVABLE ?= &quot; \<br>|         /home/trevor/devel/yocto/git-method/poky/meta \<br>|         /home/trevor/devel/yocto/git-method/poky/meta-yocto \<br>|         &quot;<br>`-- local.conf<br>        BB_NUMBER_THREADS = &quot;1&quot;<br>
        PARALLEL_MAKE = &quot;-j 1&quot;<br>        MACHINE = &quot;qemux86&quot;<br>        DL_DIR = &quot;/home/trevor/devel/Downloads&quot;<br>        DISTRO = &quot;poky&quot;<br>        PACKAGE_CLASSES = &quot;package_ipk&quot;<br>
        EXTRA_IMAGE_FEATURES = &quot;debug-tweaks ssh-server-openssh&quot;<br>        USER_CLASSES = &quot;buildstats image-mklibs image-prelink&quot;<br>        PATCHRESOLVE = &quot;noop&quot;<br><br>        BB_DISKMON_DIRS = &quot;\<br>
                STOPTASKS,${TMPDIR},1G,100K \<br>                STOPTASKS,${DL_DIR},1G,100K \<br>                STOPTASKS,${SSTATE_DIR},1G,100K \<br>                ABORT,${TMPDIR},100M,1K \<br>                ABORT,${DL_DIR},100M,1K \<br>
                ABORT,${SSTATE_DIR},100M,1K&quot;<br><br>        CONF_VERSION = &quot;1&quot;<br><br>        BB_DANGLINGAPPENDS_WARNONLY = &quot;yes&quot;<br>        IMAGE_FSTYPES = &quot;vmdk&quot;<br>        IMAGE_ROOTFS_SIZE = &quot;100000&quot;<br>
<br></div>You might think my setting BB_NUMBER_THREADS and PARALLEL_MAKE to 1<br></div>is strange, but it makes it _so_ much easier to read the output logs when running<br>bitbake with &quot;-vvvD&quot;.<br><br></div>After performing a &quot;bitbake -vvvD bboverride 2&gt;&amp;1 | tee build.log&quot; I find all the<br>
regular suspects in my tmp/deploy/images directory. When I look through the<br></div>log file I see all the regular image-building commands taking place (e.g.<br>rootfs_ipk_do_rootfs etc.), and I don&#39;t find the &quot;rootfs from meta-trevor&quot; that<br>
I was expecting.<br><br>I realize that my inclusion of &#39;IMAGE_FSTYPES = &quot;vmdk&quot;&#39; in my local.conf<br></div>might be suspect, but I assume the routines to build the vmdk are &quot;underneath&quot;<br></div>
the do_rootfs task. As such, if I really am replacing the base do_rootfs with<br>my own (which does nothing) having this line in the configuration file shouldn&#39;t<br></div>be kicking off any image-creation procedures (I would think).<br>
<br></div>Any and all help is much appreciated, thanks :-)<br></div>