diff options
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/bsp/engine.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/lib/bsp/engine.py b/scripts/lib/bsp/engine.py index 7431860547..aa26280796 100644 --- a/scripts/lib/bsp/engine.py +++ b/scripts/lib/bsp/engine.py | |||
@@ -1387,6 +1387,9 @@ def yocto_common_create(machine, target, scripts_path, layer_output_dir, codedum | |||
1387 | 1387 | ||
1388 | properties = json.load(infile) | 1388 | properties = json.load(infile) |
1389 | 1389 | ||
1390 | if properties_str and not properties: | ||
1391 | properties = json.loads(properties_str) | ||
1392 | |||
1390 | os.mkdir(layer_output_dir) | 1393 | os.mkdir(layer_output_dir) |
1391 | 1394 | ||
1392 | context = create_context(machine, target, scripts_path) | 1395 | context = create_context(machine, target, scripts_path) |
@@ -1413,7 +1416,7 @@ def yocto_common_create(machine, target, scripts_path, layer_output_dir, codedum | |||
1413 | run_program_lines(program_lines, codedump) | 1416 | run_program_lines(program_lines, codedump) |
1414 | 1417 | ||
1415 | 1418 | ||
1416 | def yocto_layer_create(layer_name, scripts_path, layer_output_dir, codedump, properties_file): | 1419 | def yocto_layer_create(layer_name, scripts_path, layer_output_dir, codedump, properties_file, properties=""): |
1417 | """ | 1420 | """ |
1418 | Create yocto layer | 1421 | Create yocto layer |
1419 | 1422 | ||
@@ -1424,13 +1427,13 @@ def yocto_layer_create(layer_name, scripts_path, layer_output_dir, codedump, pro | |||
1424 | properties_file - use values from this file if nonempty i.e no prompting | 1427 | properties_file - use values from this file if nonempty i.e no prompting |
1425 | properties - use values from this string if nonempty i.e no prompting | 1428 | properties - use values from this string if nonempty i.e no prompting |
1426 | """ | 1429 | """ |
1427 | yocto_common_create(layer_name, "layer", scripts_path, layer_output_dir, codedump, properties_file, False) | 1430 | yocto_common_create(layer_name, "layer", scripts_path, layer_output_dir, codedump, properties_file, properties, False) |
1428 | 1431 | ||
1429 | print "\nNew layer created in %s.\n" % (layer_output_dir) | 1432 | print "\nNew layer created in %s.\n" % (layer_output_dir) |
1430 | print "Don't forget to add it to your BBLAYERS (for details see %s\README)." % (layer_output_dir) | 1433 | print "Don't forget to add it to your BBLAYERS (for details see %s\README)." % (layer_output_dir) |
1431 | 1434 | ||
1432 | 1435 | ||
1433 | def yocto_bsp_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file): | 1436 | def yocto_bsp_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file, properties=None): |
1434 | """ | 1437 | """ |
1435 | Create bsp | 1438 | Create bsp |
1436 | 1439 | ||
@@ -1443,7 +1446,7 @@ def yocto_bsp_create(machine, arch, scripts_path, bsp_output_dir, codedump, prop | |||
1443 | properties_file - use values from this file if nonempty i.e no prompting | 1446 | properties_file - use values from this file if nonempty i.e no prompting |
1444 | properties - use values from this string if nonempty i.e no prompting | 1447 | properties - use values from this string if nonempty i.e no prompting |
1445 | """ | 1448 | """ |
1446 | yocto_common_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file) | 1449 | yocto_common_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file, properties) |
1447 | 1450 | ||
1448 | print "\nNew %s BSP created in %s" % (arch, bsp_output_dir) | 1451 | print "\nNew %s BSP created in %s" % (arch, bsp_output_dir) |
1449 | 1452 | ||