aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAri Hausman-Cohen <arihc@google.com>2016-04-19 14:06:56 -0700
committerAri Hausman-Cohen <arihc@google.com>2016-04-19 22:27:49 +0000
commit632538b57420881af0206c1402e892a49ee5fff9 (patch)
treebb971cb8427d377a9cdb1aac5c5460a9119aff16
parent868d93486cf3d558132b2d08f76d9ffb1f1cfbbb (diff)
downloadbdk-632538b57420881af0206c1402e892a49ee5fff9.tar.gz
Linking bsp for BDKv1 provision.
The provision-device scripts assume the BSP is linked. Longer term a better solution might exist, but this will do for now. BUG: 288271372 TEST: unit tests pass Change-Id: I0056885eb44d1a32652f02cdd9edbea9f95d80c7
-rw-r--r--cli/lib/commands/product/provision.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/cli/lib/commands/product/provision.py b/cli/lib/commands/product/provision.py
index 50bc965..c6a29e5 100644
--- a/cli/lib/commands/product/provision.py
+++ b/cli/lib/commands/product/provision.py
@@ -19,6 +19,7 @@
import argparse
import os
+from bsp import manifest
from cli import clicommand
from commands.product import constants
from core import config
@@ -47,6 +48,14 @@ class Provision(clicommand.Command):
store = config.ProductFileStore(args.product_path)
+ # Get the device so the BSP can be linked.
+ manifest_ = manifest.Manifest.from_json()
+ if not manifest_.is_bsp_available(store.device):
+ print ('BSP for "{0}" is not downloaded. '
+ 'Please run `bdk bsp download {0}`.'.format(store.device))
+ return 1
+ device = manifest_.devices[store.device]
+
t = tool.BrunchTargetToolWrapper(store, args.product_path,
'provision-device')
if not t.exists():
@@ -68,5 +77,6 @@ class Provision(clicommand.Command):
return 1
if args.s is not None:
args.args += ['-s', args.s]
- t.run(args.args)
+ with device.linked(util.GetOSVersion()):
+ t.run(args.args)
return 0