summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2012-03-29 20:01:09 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-29 21:25:52 +0100
commitabcb2e0916090a6ad1f4ffe7434fd36cd57e7f05 (patch)
treee2906b77b3e3585822150f0bda9304d668a37aef
parent345a2dd01c07750509ca2dcc5851cfd912bbace8 (diff)
downloadpoky-abcb2e0916090a6ad1f4ffe7434fd36cd57e7f05.tar.gz
Hob: Define a variable to store the image name and toolchain
(Bitbake rev: d0b64d901b33c9e5247dbb2b05c89a1d65abbf8b) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py9
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py8
2 files changed, 12 insertions, 5 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 9e234f51f4..7deffdc145 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -221,6 +221,9 @@ class Builder(gtk.Window):
221 def __init__(self, hobHandler, recipe_model, package_model): 221 def __init__(self, hobHandler, recipe_model, package_model):
222 super(Builder, self).__init__() 222 super(Builder, self).__init__()
223 223
224 self.hob_image = "hob-image"
225 self.hob_toolchain = "hob-toolchain"
226
224 # handler 227 # handler
225 self.handler = hobHandler 228 self.handler = hobHandler
226 229
@@ -435,8 +438,10 @@ class Builder(gtk.Window):
435 self.set_user_config() 438 self.set_user_config()
436 all_packages = self.package_model.get_selected_packages() 439 all_packages = self.package_model.get_selected_packages()
437 self.handler.reset_build() 440 self.handler.reset_build()
438 self.handler.generate_image(all_packages, self.configuration.toolchain_build) 441 self.handler.generate_image(all_packages,
439 442 self.hob_image,
443 self.hob_toolchain,
444 self.configuration.toolchain_build)
440 445
441 # Callback Functions 446 # Callback Functions
442 def handler_config_updated_cb(self, handler, which, values): 447 def handler_config_updated_cb(self, handler, which, values):
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index 1cbb0274c6..e5e0b4243d 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -128,13 +128,13 @@ class HobHandler(gobject.GObject):
128 elif next_command == self.SUB_BUILD_IMAGE: 128 elif next_command == self.SUB_BUILD_IMAGE:
129 self.clear_busy() 129 self.clear_busy()
130 self.building = True 130 self.building = True
131 targets = ["hob-image"] 131 targets = [self.hob_image]
132 self.server.runCommand(["setVariable", "LINGUAS_INSTALL", ""]) 132 self.server.runCommand(["setVariable", "LINGUAS_INSTALL", ""])
133 self.server.runCommand(["setVariable", "PACKAGE_INSTALL", " ".join(self.package_queue)]) 133 self.server.runCommand(["setVariable", "PACKAGE_INSTALL", " ".join(self.package_queue)])
134 if self.toolchain_build: 134 if self.toolchain_build:
135 pkgs = self.package_queue + [i+'-dev' for i in self.package_queue] + [i+'-dbg' for i in self.package_queue] 135 pkgs = self.package_queue + [i+'-dev' for i in self.package_queue] + [i+'-dbg' for i in self.package_queue]
136 self.server.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(pkgs)]) 136 self.server.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(pkgs)])
137 targets.append("hob-toolchain") 137 targets.append(self.hob_toolchain)
138 self.server.runCommand(["buildTargets", targets, "build"]) 138 self.server.runCommand(["buildTargets", targets, "build"])
139 139
140 def handle_event(self, event): 140 def handle_event(self, event):
@@ -351,8 +351,10 @@ class HobHandler(gobject.GObject):
351 self.commands_async.append(self.SUB_BUILD_RECIPES) 351 self.commands_async.append(self.SUB_BUILD_RECIPES)
352 self.run_next_command(self.GENERATE_PACKAGES) 352 self.run_next_command(self.GENERATE_PACKAGES)
353 353
354 def generate_image(self, tgts, toolchain_build=False): 354 def generate_image(self, tgts, hob_image, hob_toolchain, toolchain_build=False):
355 self.package_queue = tgts 355 self.package_queue = tgts
356 self.hob_image = hob_image
357 self.hob_toolchain = hob_toolchain
356 self.toolchain_build = toolchain_build 358 self.toolchain_build = toolchain_build
357 self.commands_async.append(self.SUB_PARSE_CONFIG) 359 self.commands_async.append(self.SUB_PARSE_CONFIG)
358 self.commands_async.append(self.SUB_BUILD_IMAGE) 360 self.commands_async.append(self.SUB_BUILD_IMAGE)