aboutsummaryrefslogtreecommitdiffstats
path: root/classes/swupdimage.bbclass
AgeCommit message (Collapse)Author
2017-01-13meta-swupd: support rm_work.bbclassPatrick Ohly
Sharing data between virtual images only worked when rm_work.bbclass was not active. To support rm_work.bbclass, the new do_swupd_list_bundle generates the necessary information about the rootfs before do_rm_work removes the rootfs. The output files and the mega image rootfs.tar get excluded from the cleanup via the new RM_WORK_EXCLUDE_ITEMS. While at it, some inaccurate comments get removed. As a side effect of the more granular work split, it is now possible to make swupd images depend on exactly those bundle images that they contain. Now it is possible to build a swupd image without first having to build all swupd images, which might speed up a build (less work on the critical path). Fixes: [YOCTO #10799] Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2016-12-08meta-swupd: fix virtual image dependenciesPatrick Ohly
Sharing of pseudo databases was broken, leading to files with wrong attributes: ${IMAGE_BASENAME} is different among all virtual recipes and thus updating PSEUDO_LOCALSTATEDIR did not have the desired effect. Bundle recipes do not need to copy from anything (and thus they do not depend on the mega image do_image) and also do not need to share the pseudo database, because all that matters is the list of entries in their rootfs. Being very specific about the task dependencies allows more long-running image creation tasks to run in parallel. Distinguishing between the various virtual image recipes and the base image is a bit tricky. Therefore the "(virtual) swupd image recipes" (called so because they get created by swupdimage.bbclass) now unsets BUNDLE_NAME (thus removing the default "os-core" which is set in the base recipe) and the usage of PN, PN_BASE, and BUNDLE_NAME is explained in a comment. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2016-10-03swupd-image: prevent buildhistory failureJoshua Lock
When buildstats detects TaskSucceeded for a do_rootfs task it will try and determine the size of the rootfs using du, if the rootfs directory isn't present the call to du fails which triggers a bb.error. Since e587c50c2639989d02d282c7a91134d5934eb042 do_rootfs for swumpdimage based virtual images has been an empty function which simply returns as soon as it's invoked, as we populate the rootfs from the mega rootfs contents in do_image. Due to this the rootfs directory wasn't yet present at the time buildstats detects the TaskSucceeded and the subsequent call to du fails. Work around this by creating an empty rootfs directory during do_rootfs in swupdimage. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-09-12swupdimage.bbclass: ensure that do_rootfs gets executedPatrick Ohly
OE-core commit 6d969bacc718e changed do_rootfs so that it creates IMGDEPLOYDIR. That change broke the creation of additional swupd images, because setting do_rootfs to empty caused the entire task to be skipped, including the evaluation of the 'cleandirs' task attribute. It remains to be seen whether that's really the desired behavior (see https://bugzilla.yoctoproject.org/show_bug.cgi?id=10256), but as it is what it is right now, we need to avoid the situation by overwriting do_rootfs with non-empty code that doesn't do anything. That way, the directory gets created. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2016-06-02swupdimage: ensure an update stream is generated when appropriateJoshua Lock
do_swupd_update is skipped for non-core images, however as users may choose to only build a composed os-core + bundles image ensure that the do_swupd_update task for all such images depends on the core do_swupd_update task of the core image. This ensures that the swupd update stream is generated for a new OS release when suitable (i.e. when an update stream doesn't already exist for that OS_VERSION). Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-06-02swupdimage: fix since the switch to lib/swupd moduleJoshua Lock
swupdimage was not ported when we moved the various helper methods out of swupd-image into the lib/swupd module -- this change rectifies that. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-06-01swupdimage: change dependency to do_stage_swupd_inputsJoshua Lock
Rather than depend on the base image having been created, instead depend on the swupd inputs having been staged, as this allows us to know that processing of bundle contents has finished. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-03-23swupd images: support creating images that contain os-core + additional bundlesPatrick Ohly
To keep the "os-core" bundle small, the base image should be as minimal as possible. It might not even allow logging in. In such a setup, actual images have to have additional software installed, which in a swupd-based image implies installing additional bundles. The new SWUPD_IMAGES variable can be used to request the creation of additional virtual image recipes which, if building them gets explicitly requested, create a suitable rootfs by copying from the mega image rootfs and then applying the normal image creation. In contrast to the internal bundle-<baseimage>-<bundle> recipes, the SWUPD_IMAGES are user-visible, so they are named <baseimage>-<imageextension> where <imageextension> is the name given in SWUPD_IMAGES. To make this work, some changes are required in the code: - the special swupd methods need to ignore the virtual image recipes which produce images - MEGA_IMAGE_ROOTFS needs to be set for all image recipes - /usr/share/clear/bundles is populated consistently in all rootfs directories (including os-core and also for the mega rootfs) - manipulating the rootfs must be split into code which sets up the clear/bundles directory (can and should be in do_rootfs) and copying files (should better be in do_image, because it needs to replace work done there) and the latter must be available as an utility function because the new virtual image recipes replace the entire do_image with it - the shared pseudo database can no longer be removed, because the image creation also depends on it, and it is unknown when that is done (might even be in a separate, future bitbake invocation) The "swupdimage.bbclass" name is consistent with "swupdbundle.bbclass", but can easily be confused with "swupd-image.bbclass". The goal is to rename "swupd-image.bbclass" to just "swupd.bbclass". Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>