summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/imager/direct.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic/imager/direct.py')
-rw-r--r--scripts/lib/wic/imager/direct.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index 52828c10cd..825c9d7f6e 100644
--- a/scripts/lib/wic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -32,7 +32,6 @@ from wic import msger
32from wic.utils.oe.misc import get_bitbake_var 32from wic.utils.oe.misc import get_bitbake_var
33from wic.utils.partitionedfs import Image 33from wic.utils.partitionedfs import Image
34from wic.utils.errors import CreatorError, ImageError 34from wic.utils.errors import CreatorError, ImageError
35from wic.imager.baseimager import BaseImageCreator
36from wic.plugin import pluginmgr 35from wic.plugin import pluginmgr
37from wic.utils.oe.misc import exec_cmd, exec_native_cmd 36from wic.utils.oe.misc import exec_cmd, exec_native_cmd
38 37
@@ -61,7 +60,7 @@ class DiskImage():
61 60
62 self.created = True 61 self.created = True
63 62
64class DirectImageCreator(BaseImageCreator): 63class DirectImageCreator:
65 """ 64 """
66 Installs a system into a file containing a partitioned disk image. 65 Installs a system into a file containing a partitioned disk image.
67 66
@@ -72,15 +71,23 @@ class DirectImageCreator(BaseImageCreator):
72 media and used on actual hardware. 71 media and used on actual hardware.
73 """ 72 """
74 73
75 def __init__(self, oe_builddir, image_output_dir, rootfs_dir, bootimg_dir, 74 def __init__(self, oe_builddir, image_output_dir, rootfs_dir,
76 kernel_dir, native_sysroot, compressor, creatoropts=None, 75 bootimg_dir, kernel_dir, native_sysroot, compressor,
77 bmap=False): 76 creatoropts, bmap=False):
78 """ 77 """
79 Initialize a DirectImageCreator instance. 78 Initialize a DirectImageCreator instance.
80 79
81 This method takes the same arguments as ImageCreator.__init__() 80 This method takes the same arguments as ImageCreator.__init__()
82 """ 81 """
83 BaseImageCreator.__init__(self, creatoropts) 82
83 self.name = creatoropts['name']
84 self.ks = creatoropts['ks']
85
86 self.tmpdir = "/var/tmp/wic"
87 self.workdir = "/var/tmp/wic/build"
88
89 if not os.path.exists(self.tmpdir):
90 os.makedirs(self.tmpdir)
84 91
85 self.__image = None 92 self.__image = None
86 self.__disks = {} 93 self.__disks = {}