<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 <<a href="mailto:clarson@kergoth.com">clarson@kergoth.com</a>> wrote:<br>
> Just override do_rootfs in your 'myimg' recipe and call it done.<br><br>I was afraid that's what you'd say. I'm obviously doing something wrong<br><span class=""></span><span class=""></span>somewhere because I can't seem to get the results I would like.<br>
<br>> Beyond that, a directory isn't a layer. You have to have conf/layer.conf and<br>> 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 "do_rootfs" 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't the results I'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 "rootfs from meta-trevor!"<br>| }<br>| EXPORT_FUNCTIONS do_rootfs<br>
|-- conf<br>| `-- layer.conf<br>| BBPATH := "${BBPATH}:${LAYERDIR}"<br>|<br>| BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \<br>| ${LAYERDIR}/recipes-*/*/*.bbappend"<br>
|<br>| BBFILE_COLLECTIONS += "trevor"<br>| BBFILE_PATTERN_trevor := "^${LAYERDIR}/"<br>| BBFILE_PRIORITY_trevor = "6"<br>`-- recipes-core<br> `-- images<br> `-- <a href="http://bboverride.bb">bboverride.bb</a><br>
DESCRIPTION = "A small-ish image that starts with busybox, but then adds as many of the 'real' programs as possible"<br><br> IMAGE_INSTALL = "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"<br><br>
IMAGE_LINGUAS = " "<br><br> LICENSE = "MIT"<br><br> inherit core-image<br> inherit twrootfs<br><br> ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; "<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 = "6"<br>
|<br>| BBPATH = "${TOPDIR}"<br>| BBFILES ?= ""<br>|<br>| BBLAYERS ?= " \<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>| "<br>
| BBLAYERS_NON_REMOVABLE ?= " \<br>| /home/trevor/devel/yocto/git-method/poky/meta \<br>| /home/trevor/devel/yocto/git-method/poky/meta-yocto \<br>| "<br>`-- local.conf<br> BB_NUMBER_THREADS = "1"<br>
PARALLEL_MAKE = "-j 1"<br> MACHINE = "qemux86"<br> DL_DIR = "/home/trevor/devel/Downloads"<br> DISTRO = "poky"<br> PACKAGE_CLASSES = "package_ipk"<br>
EXTRA_IMAGE_FEATURES = "debug-tweaks ssh-server-openssh"<br> USER_CLASSES = "buildstats image-mklibs image-prelink"<br> PATCHRESOLVE = "noop"<br><br> BB_DISKMON_DIRS = "\<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"<br><br> CONF_VERSION = "1"<br><br> BB_DANGLINGAPPENDS_WARNONLY = "yes"<br> IMAGE_FSTYPES = "vmdk"<br> IMAGE_ROOTFS_SIZE = "100000"<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 "-vvvD".<br><br></div>After performing a "bitbake -vvvD bboverride 2>&1 | tee build.log" 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't find the "rootfs from meta-trevor" that<br>
I was expecting.<br><br>I realize that my inclusion of 'IMAGE_FSTYPES = "vmdk"' in my local.conf<br></div>might be suspect, but I assume the routines to build the vmdk are "underneath"<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'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>