summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/mic/imager/direct.py15
-rw-r--r--scripts/lib/mic/plugins/imager/direct_plugin.py1
-rw-r--r--scripts/lib/mic/plugins/source/bootimg-efi.py1
-rw-r--r--scripts/lib/mic/plugins/source/bootimg-pcbios.py1
-rw-r--r--scripts/lib/mic/plugins/source/rootfs.py1
-rw-r--r--scripts/lib/mic/utils/partitionedfs.py8
6 files changed, 14 insertions, 13 deletions
diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/mic/imager/direct.py
index 17bfd01566..a4f5691f79 100644
--- a/scripts/lib/mic/imager/direct.py
+++ b/scripts/lib/mic/imager/direct.py
@@ -31,7 +31,7 @@ import shutil
31 31
32from mic import kickstart, msger 32from mic import kickstart, msger
33from mic.utils import fs_related, runner, misc 33from mic.utils import fs_related, runner, misc
34from mic.utils.partitionedfs import PartitionedMount 34from mic.utils.partitionedfs import Image
35from mic.utils.errors import CreatorError, MountError 35from mic.utils.errors import CreatorError, MountError
36from mic.imager.baseimager import BaseImageCreator 36from mic.imager.baseimager import BaseImageCreator
37from mic.utils.oe.misc import * 37from mic.utils.oe.misc import *
@@ -226,7 +226,7 @@ class DirectImageCreator(BaseImageCreator):
226 """ 226 """
227 parts = self._get_parts() 227 parts = self._get_parts()
228 228
229 self.__image = PartitionedMount() 229 self.__image = Image()
230 230
231 for p in parts: 231 for p in parts:
232 # as a convenience, set source to the boot partition source 232 # as a convenience, set source to the boot partition source
@@ -237,12 +237,11 @@ class DirectImageCreator(BaseImageCreator):
237 for p in parts: 237 for p in parts:
238 # need to create the filesystems in order to get their 238 # need to create the filesystems in order to get their
239 # sizes before we can add them and do the layout. 239 # sizes before we can add them and do the layout.
240 # PartitionedMount.create() actually calls __format_disks() 240 # Image.create() actually calls __format_disks() to create
241 # to create the disk images and carve out the partitions, 241 # the disk images and carve out the partitions, then
242 # then self.install() calls PartitionedMount.install() 242 # self.assemble() calls Image.assemble() which calls
243 # which calls __install_partitition() for each partition 243 # __write_partitition() for each partition to dd the fs
244 # to dd the fs into the partitions. 244 # into the partitions.
245
246 fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) 245 fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
247 246
248 p.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir, 247 p.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir,
diff --git a/scripts/lib/mic/plugins/imager/direct_plugin.py b/scripts/lib/mic/plugins/imager/direct_plugin.py
index ff30f09c3b..c05a400768 100644
--- a/scripts/lib/mic/plugins/imager/direct_plugin.py
+++ b/scripts/lib/mic/plugins/imager/direct_plugin.py
@@ -34,7 +34,6 @@ from mic import msger
34from mic.utils import misc, fs_related, errors, runner, cmdln 34from mic.utils import misc, fs_related, errors, runner, cmdln
35from mic.conf import configmgr 35from mic.conf import configmgr
36from mic.plugin import pluginmgr 36from mic.plugin import pluginmgr
37from mic.utils.partitionedfs import PartitionedMount
38 37
39import mic.imager.direct as direct 38import mic.imager.direct as direct
40from mic.pluginbase import ImagerPlugin 39from mic.pluginbase import ImagerPlugin
diff --git a/scripts/lib/mic/plugins/source/bootimg-efi.py b/scripts/lib/mic/plugins/source/bootimg-efi.py
index d4a777198f..e880358103 100644
--- a/scripts/lib/mic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/mic/plugins/source/bootimg-efi.py
@@ -33,7 +33,6 @@ from mic import kickstart, msger
33from mic.utils import misc, fs_related, errors, runner, cmdln 33from mic.utils import misc, fs_related, errors, runner, cmdln
34from mic.conf import configmgr 34from mic.conf import configmgr
35from mic.plugin import pluginmgr 35from mic.plugin import pluginmgr
36from mic.utils.partitionedfs import PartitionedMount
37import mic.imager.direct as direct 36import mic.imager.direct as direct
38from mic.pluginbase import SourcePlugin 37from mic.pluginbase import SourcePlugin
39from mic.utils.oe.misc import * 38from mic.utils.oe.misc import *
diff --git a/scripts/lib/mic/plugins/source/bootimg-pcbios.py b/scripts/lib/mic/plugins/source/bootimg-pcbios.py
index 34343205ac..53ed7c3195 100644
--- a/scripts/lib/mic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/mic/plugins/source/bootimg-pcbios.py
@@ -33,7 +33,6 @@ from mic import kickstart, msger
33from mic.utils import misc, fs_related, errors, runner, cmdln 33from mic.utils import misc, fs_related, errors, runner, cmdln
34from mic.conf import configmgr 34from mic.conf import configmgr
35from mic.plugin import pluginmgr 35from mic.plugin import pluginmgr
36from mic.utils.partitionedfs import PartitionedMount
37import mic.imager.direct as direct 36import mic.imager.direct as direct
38from mic.pluginbase import SourcePlugin 37from mic.pluginbase import SourcePlugin
39from mic.utils.oe.misc import * 38from mic.utils.oe.misc import *
diff --git a/scripts/lib/mic/plugins/source/rootfs.py b/scripts/lib/mic/plugins/source/rootfs.py
index 8cb576d5b9..8ebf62c10b 100644
--- a/scripts/lib/mic/plugins/source/rootfs.py
+++ b/scripts/lib/mic/plugins/source/rootfs.py
@@ -34,7 +34,6 @@ from mic import kickstart, msger
34from mic.utils import misc, fs_related, errors, runner, cmdln 34from mic.utils import misc, fs_related, errors, runner, cmdln
35from mic.conf import configmgr 35from mic.conf import configmgr
36from mic.plugin import pluginmgr 36from mic.plugin import pluginmgr
37from mic.utils.partitionedfs import PartitionedMount
38import mic.imager.direct as direct 37import mic.imager.direct as direct
39from mic.pluginbase import SourcePlugin 38from mic.pluginbase import SourcePlugin
40from mic.utils.oe.misc import * 39from mic.utils.oe.misc import *
diff --git a/scripts/lib/mic/utils/partitionedfs.py b/scripts/lib/mic/utils/partitionedfs.py
index 2f950a69d4..f4ce4a9dee 100644
--- a/scripts/lib/mic/utils/partitionedfs.py
+++ b/scripts/lib/mic/utils/partitionedfs.py
@@ -32,7 +32,13 @@ MBR_OVERHEAD = 1
32# Size of a sector in bytes 32# Size of a sector in bytes
33SECTOR_SIZE = 512 33SECTOR_SIZE = 512
34 34
35class PartitionedMount: 35class Image:
36 """
37 Generic base object for an image.
38
39 An Image is a container for a set of DiskImages and associated
40 partitions.
41 """
36 def __init__(self): 42 def __init__(self):
37 self.disks = {} 43 self.disks = {}
38 self.partitions = [] 44 self.partitions = []