<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr">On Feb 21, 2019, at 13:28, Mark Hatle &lt;<a href="mailto:mark.hatle@windriver.com">mark.hatle@windriver.com</a>&gt; wrote:</div><div dir="ltr"><br></div><blockquote type="cite"><div dir="ltr"><span>On 2/21/19 9:44 AM, Burton, Ross wrote:</span><br><blockquote type="cite"><span>So I'd like to use multiconfig for a fairly typical host/container use</span><br></blockquote><blockquote type="cite"><span>case. &nbsp;I've a class which can be used to build packages from images in</span><br></blockquote><blockquote type="cite"><span>a fairly simple manner, essential just taking files from DEPLOY_DIR</span><br></blockquote><blockquote type="cite"><span>when creating a package:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>core-image-minimal-package.bb:</span><br></blockquote><blockquote type="cite"><span>do_install[depends] += "core-image-minimal:do_image_complete</span><br></blockquote><blockquote type="cite"><span>virtual/kernel:do_deploy"</span><br></blockquote><blockquote type="cite"><span>do_install () {</span><br></blockquote><blockquote type="cite"><span> &nbsp;&nbsp;&nbsp;install -d ${D}/var/lib/machines/</span><br></blockquote><blockquote type="cite"><span> &nbsp;&nbsp;&nbsp;install ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.ext4</span><br></blockquote><blockquote type="cite"><span>${D}/var/lib/machines/core-image-minimal.ext4</span><br></blockquote><blockquote type="cite"><span> &nbsp;&nbsp;&nbsp;install ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}</span><br></blockquote><blockquote type="cite"><span>${D}/var/lib/machines/${IMAGE_NAME}.${KERNEL_IMAGETYPE}</span><br></blockquote><blockquote type="cite"><span>}</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>This part works fine, but the problem is straddling multiconfig boundaries...</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>I can't just add "core-image-minimal-package" to IMAGE_INSTALL because</span><br></blockquote><blockquote type="cite"><span>it will build that for the current configuration. &nbsp;I can't just add</span><br></blockquote><blockquote type="cite"><span>"multiconfig:uos:core-image-minimal-package" because that will look</span><br></blockquote><blockquote type="cite"><span>for a recipe with that name. &nbsp;I've a rather ugly hack to call opkg</span><br></blockquote><blockquote type="cite"><span>directly in a post-rootfs hook which sort of works. &nbsp;Linking in bits</span><br></blockquote><blockquote type="cite"><span>of the other configuration's deploy directory in a pre-rootfs hook and</span><br></blockquote><blockquote type="cite"><span>extending IMAGE_INSTALL there almost works, apart from the rootfs code</span><br></blockquote><blockquote type="cite"><span>then looks at the task dependencies to generate a pruned deploy dir,</span><br></blockquote><blockquote type="cite"><span>which is missing the pieces I linked in.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>I suspect this is now breaking new ground: the multiconfiguration</span><br></blockquote><blockquote type="cite"><span>support lets you do builds but so far the artefact sharing hasn't</span><br></blockquote><blockquote type="cite"><span>really been explored. &nbsp;Has anyone dug further into this?</span><br></blockquote><span></span><br><span>I don't think anyone has. &nbsp;But as we continue moving toward containers/micro</span><br><span>services environments -- this exactly type of thing is going to be more and more</span><br><span>needed.</span><br><span></span><br><span>One 'build', with various configurations that end up constructing a single</span><br><span>device image with a container runtime (booting OS), and a number of container</span><br><span>micro services should be able to be created with a single call to bitbake and (a</span><br><span>potentially complex) config.</span><br></div></blockquote><div><br></div>That would be an elegant, dependency-aware alternative to this packaging script for OpenXT, with more than a dozen invocations of bitbake, to build virtual machines and package them for installer ISO, network bootable images and OTA update.<div><br></div><div>&nbsp;&nbsp;<a href="https://github.com/OpenXT/openxt/blob/master/do_build.sh">https://github.com/OpenXT/openxt/blob/master/do_build.sh</a></div><div>&nbsp;&nbsp;<a href="https://github.com/OpenXT/xenclient-oe">https://github.com/OpenXT/xenclient-oe</a></div><div><br></div><div>Rich</div></body></html>