diff options
Diffstat (limited to 'scripts/lib/wic/plugins/source/rawcopy.py')
| -rw-r--r-- | scripts/lib/wic/plugins/source/rawcopy.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py index 4e42e3edea..c5c3be3c2e 100644 --- a/scripts/lib/wic/plugins/source/rawcopy.py +++ b/scripts/lib/wic/plugins/source/rawcopy.py | |||
| @@ -15,13 +15,16 @@ | |||
| 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 16 | # | 16 | # |
| 17 | 17 | ||
| 18 | import logging | ||
| 18 | import os | 19 | import os |
| 20 | import sys | ||
| 19 | 21 | ||
| 20 | from wic import msger | ||
| 21 | from wic.pluginbase import SourcePlugin | 22 | from wic.pluginbase import SourcePlugin |
| 22 | from wic.utils.misc import exec_cmd, get_bitbake_var | 23 | from wic.utils.misc import exec_cmd, get_bitbake_var |
| 23 | from wic.filemap import sparse_copy | 24 | from wic.filemap import sparse_copy |
| 24 | 25 | ||
| 26 | logger = logging.getLogger('wic') | ||
| 27 | |||
| 25 | class RawCopyPlugin(SourcePlugin): | 28 | class RawCopyPlugin(SourcePlugin): |
| 26 | """ | 29 | """ |
| 27 | Populate partition content from raw image file. | 30 | Populate partition content from raw image file. |
| @@ -59,13 +62,14 @@ class RawCopyPlugin(SourcePlugin): | |||
| 59 | if not bootimg_dir: | 62 | if not bootimg_dir: |
| 60 | bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") | 63 | bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") |
| 61 | if not bootimg_dir: | 64 | if not bootimg_dir: |
| 62 | msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n") | 65 | logger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n") |
| 66 | sys.exit(1) | ||
| 63 | 67 | ||
| 64 | msger.debug('Bootimg dir: %s' % bootimg_dir) | 68 | logger.debug('Bootimg dir: %s', bootimg_dir) |
| 65 | 69 | ||
| 66 | if 'file' not in source_params: | 70 | if 'file' not in source_params: |
| 67 | msger.error("No file specified\n") | 71 | logger.error("No file specified\n") |
| 68 | return | 72 | sys.exit(1) |
| 69 | 73 | ||
| 70 | src = os.path.join(bootimg_dir, source_params['file']) | 74 | src = os.path.join(bootimg_dir, source_params['file']) |
| 71 | dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno)) | 75 | dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno)) |
