bitbake: hob/bitbake: create a template (a .bb file) from hob through bitbake

Modified generateNewImage function from cooker, in order to be used to
save a template in Hob.
Created a command to ensure that some dirs are created. The templates
(recipes) will be saved in {TOPDIR}/recipes/images folder.
Called these methods from Hob.

[YOCTO #4193]
(Bitbake rev: 96ffa00945c7eb09a0132fa47159aef3ef20fb3e)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Cristiana Voicu
2013-07-29 09:55:06 +00:00
committed by Richard Purdie
parent ee4fe5a229
commit 140744c470
6 changed files with 45 additions and 10 deletions

View File

@@ -176,7 +176,7 @@ class HobHandler(gobject.GObject):
hobImage = self.runCommand(["matchFile", "hob-image.bb"])
if self.base_image != "Start with an empty image recipe":
baseImage = self.runCommand(["matchFile", self.base_image + ".bb"])
version = self.runCommand(["generateNewImage", hobImage, baseImage, self.package_queue])
version = self.runCommand(["generateNewImage", hobImage, baseImage, self.package_queue, True])
targets[0] += version
self.recipe_model.set_custom_image_version(version)
@@ -426,6 +426,13 @@ class HobHandler(gobject.GObject):
self.commands_async.append(self.SUB_BUILD_IMAGE)
self.run_next_command(self.GENERATE_IMAGE)
def generate_new_image(self, image, base_image, package_queue):
base_image = self.runCommand(["matchFile", self.base_image + ".bb"])
self.runCommand(["generateNewImage", image, base_image, package_queue, False])
def ensure_dir(self, directory):
self.runCommand(["ensureDir", directory])
def build_succeeded_async(self):
self.building = False