diff options
-rw-r--r-- | scripts/lib/image/engine.py | 5 | ||||
-rwxr-xr-x | scripts/wic | 11 |
2 files changed, 7 insertions, 9 deletions
diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index 2dd98b968c..6cf6169482 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib/image/engine.py | |||
@@ -175,7 +175,7 @@ def list_canned_image_help(scripts_path, fullpath): | |||
175 | 175 | ||
176 | def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, | 176 | def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, |
177 | native_sysroot, hdddir, staging_data_dir, scripts_path, | 177 | native_sysroot, hdddir, staging_data_dir, scripts_path, |
178 | image_output_dir, properties_file, properties=None): | 178 | image_output_dir, debug, properties_file, properties=None): |
179 | """ | 179 | """ |
180 | Create image | 180 | Create image |
181 | 181 | ||
@@ -235,6 +235,9 @@ def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, | |||
235 | direct_args.insert(0, staging_data_dir) | 235 | direct_args.insert(0, staging_data_dir) |
236 | direct_args.insert(0, "direct") | 236 | direct_args.insert(0, "direct") |
237 | 237 | ||
238 | if debug: | ||
239 | msger.set_loglevel('debug') | ||
240 | |||
238 | cr = creator.Creator() | 241 | cr = creator.Creator() |
239 | 242 | ||
240 | cr.main(direct_args) | 243 | cr.main(direct_args) |
diff --git a/scripts/wic b/scripts/wic index 4ea5569576..824acaebd3 100755 --- a/scripts/wic +++ b/scripts/wic | |||
@@ -69,6 +69,8 @@ def wic_create_subcommand(args, usage_str): | |||
69 | action = "store", help = "path to the native sysroot containing the tools to use to build the image") | 69 | action = "store", help = "path to the native sysroot containing the tools to use to build the image") |
70 | parser.add_option("-p", "--skip-build-check", dest = "build_check", | 70 | parser.add_option("-p", "--skip-build-check", dest = "build_check", |
71 | action = "store_false", default = True, help = "skip the build check") | 71 | action = "store_false", default = True, help = "skip the build check") |
72 | parser.add_option("-D", "--debug", dest = "debug", action = "store_true", | ||
73 | default = False, help = "output debug information") | ||
72 | 74 | ||
73 | (options, args) = parser.parse_args(args) | 75 | (options, args) = parser.parse_args(args) |
74 | 76 | ||
@@ -162,7 +164,7 @@ def wic_create_subcommand(args, usage_str): | |||
162 | 164 | ||
163 | wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, | 165 | wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, |
164 | native_sysroot, hdddir, staging_data_dir, scripts_path, | 166 | native_sysroot, hdddir, staging_data_dir, scripts_path, |
165 | image_output_dir, options.properties_file) | 167 | image_output_dir, options.debug, options.properties_file) |
166 | 168 | ||
167 | 169 | ||
168 | def wic_list_subcommand(args, usage_str): | 170 | def wic_list_subcommand(args, usage_str): |
@@ -203,16 +205,9 @@ def main(): | |||
203 | usage = wic_usage) | 205 | usage = wic_usage) |
204 | 206 | ||
205 | parser.disable_interspersed_args() | 207 | parser.disable_interspersed_args() |
206 | parser.add_option("-D", "--debug", dest = "debug", action = "store_true", | ||
207 | default = False, help = "output debug information") | ||
208 | 208 | ||
209 | (options, args) = parser.parse_args() | 209 | (options, args) = parser.parse_args() |
210 | 210 | ||
211 | loglevel = logging.INFO | ||
212 | if options.debug: | ||
213 | loglevel = logging.DEBUG | ||
214 | start_logging(loglevel) | ||
215 | |||
216 | if len(args): | 211 | if len(args): |
217 | if args[0] == "help": | 212 | if args[0] == "help": |
218 | if len(args) == 1: | 213 | if len(args) == 1: |