aboutsummaryrefslogtreecommitdiff
path: root/linaro-media-create
diff options
context:
space:
mode:
authorMilo Casagrande <milo@ubuntu.com>2012-07-25 11:00:58 +0200
committerMilo Casagrande <milo@ubuntu.com>2012-07-25 11:00:58 +0200
commit4f5709860d236213c6c6ddd80b7c3548c138d890 (patch)
tree21b0a146536b035e5ea361a45a168b7dd96ac7e5 /linaro-media-create
parent14ced21e75fcf556b4c926add1e9e98d8c9ff107 (diff)
Added initial work for hwpack metadata probing.
Diffstat (limited to 'linaro-media-create')
-rwxr-xr-xlinaro-media-create21
1 files changed, 14 insertions, 7 deletions
diff --git a/linaro-media-create b/linaro-media-create
index 2440e78..55a9a3f 100755
--- a/linaro-media-create
+++ b/linaro-media-create
@@ -33,6 +33,7 @@ from linaro_image_tools.media_create.chroot_utils import (
install_hwpacks,
install_packages,
)
+from linaro_image_tools.hwpack.hwpack_reader import HwpackReader
from linaro_image_tools.media_create.partitions import (
Media,
setup_partitions,
@@ -44,13 +45,13 @@ from linaro_image_tools.media_create.unpack_binary_tarball import (
)
from linaro_image_tools.media_create import get_args_parser
from linaro_image_tools.utils import (
+ additional_option_checks,
+ check_file_integrity_and_log_errors,
ensure_command,
+ IncompatibleOptions,
is_arm_host,
- check_file_integrity_and_log_errors,
path_in_tarfile_exists,
- IncompatibleOptions,
prep_media_path,
- additional_option_checks,
)
# Just define the global variables
@@ -107,6 +108,11 @@ if __name__ == '__main__':
print >> sys.stderr, "\nError:", e.value
sys.exit(1)
+ if args.readhwpack:
+ reader = HwpackReader(args.hwpacks)
+ print reader.get_supported_boards()
+ sys.exit(0)
+
board_config = board_configs[args.board]
board_config.set_metadata(args.hwpacks)
board_config.set_board(args.board)
@@ -117,11 +123,12 @@ if __name__ == '__main__':
if media.is_block_device:
if not board_config.supports_writing_to_mmc:
- print "The board '%s' does not support the --mmc option. Please use "\
- "--image_file to create an image file for this board." % args.board
+ print ("The board '%s' does not support the --mmc option. "
+ "Please use --image_file to create an image file for this "
+ "board." % args.board)
sys.exit(1)
- if not confirm_device_selection_and_ensure_it_is_ready(args.device,
- args.nocheck_mmc):
+ if not confirm_device_selection_and_ensure_it_is_ready(
+ args.device, args.nocheck_mmc):
sys.exit(1)
elif not args.should_format_rootfs or not args.should_format_bootfs:
print ("Do not use --no-boot or --no-part in conjunction with "