diff options
Diffstat (limited to 'scripts/lib/wic')
| -rw-r--r-- | scripts/lib/wic/imager/direct.py | 5 | ||||
| -rw-r--r-- | scripts/lib/wic/plugins/imager/direct_plugin.py | 20 | ||||
| -rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-efi.py | 5 | ||||
| -rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-pcbios.py | 3 |
4 files changed, 12 insertions, 21 deletions
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 5b12856289..6b2ab3368e 100644 --- a/scripts/lib/wic/imager/direct.py +++ b/scripts/lib/wic/imager/direct.py | |||
| @@ -52,8 +52,7 @@ class DirectImageCreator(BaseImageCreator): | |||
| 52 | """ | 52 | """ |
| 53 | 53 | ||
| 54 | def __init__(self, oe_builddir, image_output_dir, rootfs_dir, bootimg_dir, | 54 | def __init__(self, oe_builddir, image_output_dir, rootfs_dir, bootimg_dir, |
| 55 | kernel_dir, native_sysroot, hdddir, staging_data_dir, | 55 | kernel_dir, native_sysroot, creatoropts=None): |
| 56 | creatoropts=None): | ||
| 57 | """ | 56 | """ |
| 58 | Initialize a DirectImageCreator instance. | 57 | Initialize a DirectImageCreator instance. |
| 59 | 58 | ||
| @@ -74,8 +73,6 @@ class DirectImageCreator(BaseImageCreator): | |||
| 74 | self.bootimg_dir = bootimg_dir | 73 | self.bootimg_dir = bootimg_dir |
| 75 | self.kernel_dir = kernel_dir | 74 | self.kernel_dir = kernel_dir |
| 76 | self.native_sysroot = native_sysroot | 75 | self.native_sysroot = native_sysroot |
| 77 | self.hdddir = hdddir | ||
| 78 | self.staging_data_dir = staging_data_dir | ||
| 79 | 76 | ||
| 80 | def __write_fstab(self, image_rootfs): | 77 | def __write_fstab(self, image_rootfs): |
| 81 | """overriden to generate fstab (temporarily) in rootfs. This is called | 78 | """overriden to generate fstab (temporarily) in rootfs. This is called |
diff --git a/scripts/lib/wic/plugins/imager/direct_plugin.py b/scripts/lib/wic/plugins/imager/direct_plugin.py index dabd6fc3e0..5601c3f1c9 100644 --- a/scripts/lib/wic/plugins/imager/direct_plugin.py +++ b/scripts/lib/wic/plugins/imager/direct_plugin.py | |||
| @@ -58,21 +58,19 @@ class DirectPlugin(ImagerPlugin): | |||
| 58 | """ | 58 | """ |
| 59 | Create direct image, called from creator as 'direct' cmd | 59 | Create direct image, called from creator as 'direct' cmd |
| 60 | """ | 60 | """ |
| 61 | if len(args) != 9: | 61 | if len(args) != 7: |
| 62 | raise errors.Usage("Extra arguments given") | 62 | raise errors.Usage("Extra arguments given") |
| 63 | 63 | ||
| 64 | staging_data_dir = args[0] | 64 | native_sysroot = args[0] |
| 65 | hdddir = args[1] | 65 | kernel_dir = args[1] |
| 66 | native_sysroot = args[2] | 66 | bootimg_dir = args[2] |
| 67 | kernel_dir = args[3] | 67 | rootfs_dir = args[3] |
| 68 | bootimg_dir = args[4] | ||
| 69 | rootfs_dir = args[5] | ||
| 70 | 68 | ||
| 71 | creatoropts = configmgr.create | 69 | creatoropts = configmgr.create |
| 72 | ksconf = args[6] | 70 | ksconf = args[4] |
| 73 | 71 | ||
| 74 | image_output_dir = args[7] | 72 | image_output_dir = args[5] |
| 75 | oe_builddir = args[8] | 73 | oe_builddir = args[6] |
| 76 | 74 | ||
| 77 | krootfs_dir = self.__rootfs_dir_to_dict(rootfs_dir) | 75 | krootfs_dir = self.__rootfs_dir_to_dict(rootfs_dir) |
| 78 | 76 | ||
| @@ -84,8 +82,6 @@ class DirectPlugin(ImagerPlugin): | |||
| 84 | bootimg_dir, | 82 | bootimg_dir, |
| 85 | kernel_dir, | 83 | kernel_dir, |
| 86 | native_sysroot, | 84 | native_sysroot, |
| 87 | hdddir, | ||
| 88 | staging_data_dir, | ||
| 89 | creatoropts) | 85 | creatoropts) |
| 90 | 86 | ||
| 91 | try: | 87 | try: |
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index 855bbc2ce2..e4067b6dbf 100644 --- a/scripts/lib/wic/plugins/source/bootimg-efi.py +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py | |||
| @@ -173,7 +173,6 @@ class BootimgEFIPlugin(SourcePlugin): | |||
| 173 | cr.set_bootimg_dir(bootimg_dir) | 173 | cr.set_bootimg_dir(bootimg_dir) |
| 174 | 174 | ||
| 175 | staging_kernel_dir = kernel_dir | 175 | staging_kernel_dir = kernel_dir |
| 176 | staging_data_dir = bootimg_dir | ||
| 177 | 176 | ||
| 178 | hdddir = "%s/hdd/boot" % cr_workdir | 177 | hdddir = "%s/hdd/boot" % cr_workdir |
| 179 | 178 | ||
| @@ -185,12 +184,12 @@ class BootimgEFIPlugin(SourcePlugin): | |||
| 185 | if source_params['loader'] == 'grub-efi': | 184 | if source_params['loader'] == 'grub-efi': |
| 186 | shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir, | 185 | shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir, |
| 187 | "%s/grub.cfg" % cr_workdir) | 186 | "%s/grub.cfg" % cr_workdir) |
| 188 | cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (staging_data_dir, hdddir) | 187 | cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (bootimg_dir, hdddir) |
| 189 | exec_cmd(cp_cmd, True) | 188 | exec_cmd(cp_cmd, True) |
| 190 | shutil.move("%s/grub.cfg" % cr_workdir, | 189 | shutil.move("%s/grub.cfg" % cr_workdir, |
| 191 | "%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir) | 190 | "%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir) |
| 192 | elif source_params['loader'] == 'gummiboot': | 191 | elif source_params['loader'] == 'gummiboot': |
| 193 | cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (staging_data_dir, hdddir) | 192 | cp_cmd = "cp %s/EFI/BOOT/* %s/EFI/BOOT" % (bootimg_dir, hdddir) |
| 194 | exec_cmd(cp_cmd, True) | 193 | exec_cmd(cp_cmd, True) |
| 195 | else: | 194 | else: |
| 196 | msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader']) | 195 | msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader']) |
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py index 6057bab42d..8a1aca1ad1 100644 --- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py | |||
| @@ -144,7 +144,6 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
| 144 | cr.set_bootimg_dir(bootimg_dir) | 144 | cr.set_bootimg_dir(bootimg_dir) |
| 145 | 145 | ||
| 146 | staging_kernel_dir = kernel_dir | 146 | staging_kernel_dir = kernel_dir |
| 147 | staging_data_dir = bootimg_dir | ||
| 148 | 147 | ||
| 149 | hdddir = "%s/hdd/boot" % cr_workdir | 148 | hdddir = "%s/hdd/boot" % cr_workdir |
| 150 | 149 | ||
| @@ -153,7 +152,7 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
| 153 | exec_cmd(install_cmd) | 152 | exec_cmd(install_cmd) |
| 154 | 153 | ||
| 155 | install_cmd = "install -m 444 %s/syslinux/ldlinux.sys %s/ldlinux.sys" \ | 154 | install_cmd = "install -m 444 %s/syslinux/ldlinux.sys %s/ldlinux.sys" \ |
| 156 | % (staging_data_dir, hdddir) | 155 | % (bootimg_dir, hdddir) |
| 157 | exec_cmd(install_cmd) | 156 | exec_cmd(install_cmd) |
| 158 | 157 | ||
| 159 | du_cmd = "du -bks %s" % hdddir | 158 | du_cmd = "du -bks %s" % hdddir |
