diff options
Diffstat (limited to 'scripts/lib/wic/plugins/source')
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-efi.py | 14 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-partition.py | 4 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-pcbios.py | 4 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 11 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/rawcopy.py | 1 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/source/rootfs.py | 4 |
6 files changed, 17 insertions, 21 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index 2b66a58d6e..dd6c920267 100644 --- a/scripts/lib/wic/plugins/source/bootimg-efi.py +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py | |||
@@ -42,7 +42,7 @@ class BootimgEFIPlugin(SourcePlugin): | |||
42 | name = 'bootimg-efi' | 42 | name = 'bootimg-efi' |
43 | 43 | ||
44 | @classmethod | 44 | @classmethod |
45 | def do_configure_grubefi(cls, hdddir, creator, cr_workdir, source_params): | 45 | def do_configure_grubefi(cls, creator, cr_workdir): |
46 | """ | 46 | """ |
47 | Create loader-specific (grub-efi) config | 47 | Create loader-specific (grub-efi) config |
48 | """ | 48 | """ |
@@ -54,10 +54,10 @@ class BootimgEFIPlugin(SourcePlugin): | |||
54 | # Use a custom configuration for grub | 54 | # Use a custom configuration for grub |
55 | grubefi_conf = custom_cfg | 55 | grubefi_conf = custom_cfg |
56 | msger.debug("Using custom configuration file " | 56 | msger.debug("Using custom configuration file " |
57 | "%s for grub.cfg" % configfile) | 57 | "%s for grub.cfg" % configfile) |
58 | else: | 58 | else: |
59 | msger.error("configfile is specified but failed to " | 59 | msger.error("configfile is specified but failed to " |
60 | "get it from %s." % configfile) | 60 | "get it from %s." % configfile) |
61 | 61 | ||
62 | if not custom_cfg: | 62 | if not custom_cfg: |
63 | # Create grub configuration using parameters from wks file | 63 | # Create grub configuration using parameters from wks file |
@@ -125,10 +125,10 @@ class BootimgEFIPlugin(SourcePlugin): | |||
125 | # Use a custom configuration for systemd-boot | 125 | # Use a custom configuration for systemd-boot |
126 | boot_conf = custom_cfg | 126 | boot_conf = custom_cfg |
127 | msger.debug("Using custom configuration file " | 127 | msger.debug("Using custom configuration file " |
128 | "%s for systemd-boots's boot.conf" % configfile) | 128 | "%s for systemd-boots's boot.conf" % configfile) |
129 | else: | 129 | else: |
130 | msger.error("configfile is specified but failed to " | 130 | msger.error("configfile is specified but failed to " |
131 | "get it from %s." % configfile) | 131 | "get it from %s." % configfile) |
132 | 132 | ||
133 | if not custom_cfg: | 133 | if not custom_cfg: |
134 | # Create systemd-boot configuration using parameters from wks file | 134 | # Create systemd-boot configuration using parameters from wks file |
@@ -164,7 +164,7 @@ class BootimgEFIPlugin(SourcePlugin): | |||
164 | 164 | ||
165 | try: | 165 | try: |
166 | if source_params['loader'] == 'grub-efi': | 166 | if source_params['loader'] == 'grub-efi': |
167 | cls.do_configure_grubefi(hdddir, creator, cr_workdir, source_params) | 167 | cls.do_configure_grubefi(creator, cr_workdir) |
168 | elif source_params['loader'] == 'systemd-boot': | 168 | elif source_params['loader'] == 'systemd-boot': |
169 | cls.do_configure_systemdboot(hdddir, creator, cr_workdir, source_params) | 169 | cls.do_configure_systemdboot(hdddir, creator, cr_workdir, source_params) |
170 | else: | 170 | else: |
@@ -185,7 +185,7 @@ class BootimgEFIPlugin(SourcePlugin): | |||
185 | if not bootimg_dir: | 185 | if not bootimg_dir: |
186 | bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") | 186 | bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") |
187 | if not bootimg_dir: | 187 | if not bootimg_dir: |
188 | msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n") | 188 | msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n") |
189 | # just so the result notes display it | 189 | # just so the result notes display it |
190 | creator.set_bootimg_dir(bootimg_dir) | 190 | creator.set_bootimg_dir(bootimg_dir) |
191 | 191 | ||
diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py index f94dfabb6a..e0d9a50585 100644 --- a/scripts/lib/wic/plugins/source/bootimg-partition.py +++ b/scripts/lib/wic/plugins/source/bootimg-partition.py | |||
@@ -26,10 +26,11 @@ | |||
26 | import os | 26 | import os |
27 | import re | 27 | import re |
28 | 28 | ||
29 | from glob import glob | ||
30 | |||
29 | from wic import msger | 31 | from wic import msger |
30 | from wic.pluginbase import SourcePlugin | 32 | from wic.pluginbase import SourcePlugin |
31 | from wic.utils.misc import exec_cmd, get_bitbake_var | 33 | from wic.utils.misc import exec_cmd, get_bitbake_var |
32 | from glob import glob | ||
33 | 34 | ||
34 | class BootimgPartitionPlugin(SourcePlugin): | 35 | class BootimgPartitionPlugin(SourcePlugin): |
35 | """ | 36 | """ |
@@ -137,4 +138,3 @@ class BootimgPartitionPlugin(SourcePlugin): | |||
137 | msger.debug('Prepare boot partition using rootfs in %s' % (hdddir)) | 138 | msger.debug('Prepare boot partition using rootfs in %s' % (hdddir)) |
138 | part.prepare_rootfs(cr_workdir, oe_builddir, hdddir, | 139 | part.prepare_rootfs(cr_workdir, oe_builddir, hdddir, |
139 | native_sysroot) | 140 | native_sysroot) |
140 | |||
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py index d796433d1d..4b9b26552a 100644 --- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py | |||
@@ -198,7 +198,5 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
198 | out = exec_cmd(du_cmd) | 198 | out = exec_cmd(du_cmd) |
199 | bootimg_size = out.split()[0] | 199 | bootimg_size = out.split()[0] |
200 | 200 | ||
201 | part.size = int(out.split()[0]) | 201 | part.size = int(bootimg_size) |
202 | part.source_file = bootimg | 202 | part.source_file = bootimg |
203 | |||
204 | |||
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py index 6df375655c..56bb62d786 100644 --- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py +++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py | |||
@@ -100,10 +100,10 @@ class IsoImagePlugin(SourcePlugin): | |||
100 | grubefi_conf = get_custom_config(configfile) | 100 | grubefi_conf = get_custom_config(configfile) |
101 | if grubefi_conf: | 101 | if grubefi_conf: |
102 | msger.debug("Using custom configuration file " | 102 | msger.debug("Using custom configuration file " |
103 | "%s for grub.cfg" % configfile) | 103 | "%s for grub.cfg" % configfile) |
104 | else: | 104 | else: |
105 | msger.error("configfile is specified but failed to " | 105 | msger.error("configfile is specified but failed to " |
106 | "get it from %s." % configfile) | 106 | "get it from %s." % configfile) |
107 | else: | 107 | else: |
108 | splash = os.path.join(cr_workdir, "EFI/boot/splash.jpg") | 108 | splash = os.path.join(cr_workdir, "EFI/boot/splash.jpg") |
109 | if os.path.exists(splash): | 109 | if os.path.exists(splash): |
@@ -285,6 +285,7 @@ class IsoImagePlugin(SourcePlugin): | |||
285 | if not deploy_dir: | 285 | if not deploy_dir: |
286 | msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n") | 286 | msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n") |
287 | cp_cmd = "cp %s/%s %s" % (deploy_dir, initrd, cr_workdir) | 287 | cp_cmd = "cp %s/%s %s" % (deploy_dir, initrd, cr_workdir) |
288 | exec_cmd(cp_cmd) | ||
288 | else: | 289 | else: |
289 | # Prepare initial ramdisk | 290 | # Prepare initial ramdisk |
290 | initrd = "%s/initrd" % deploy_dir | 291 | initrd = "%s/initrd" % deploy_dir |
@@ -293,8 +294,7 @@ class IsoImagePlugin(SourcePlugin): | |||
293 | if not os.path.isfile(initrd): | 294 | if not os.path.isfile(initrd): |
294 | initrd = cls._build_initramfs_path(rootfs_dir, cr_workdir) | 295 | initrd = cls._build_initramfs_path(rootfs_dir, cr_workdir) |
295 | 296 | ||
296 | install_cmd = "install -m 0644 %s %s/initrd" \ | 297 | install_cmd = "install -m 0644 %s %s/initrd" % (initrd, isodir) |
297 | % (initrd, isodir) | ||
298 | exec_cmd(install_cmd) | 298 | exec_cmd(install_cmd) |
299 | 299 | ||
300 | # Remove the temporary file created by _build_initramfs_path function | 300 | # Remove the temporary file created by _build_initramfs_path function |
@@ -303,7 +303,7 @@ class IsoImagePlugin(SourcePlugin): | |||
303 | 303 | ||
304 | # Install bzImage | 304 | # Install bzImage |
305 | install_cmd = "install -m 0644 %s/bzImage %s/bzImage" % \ | 305 | install_cmd = "install -m 0644 %s/bzImage %s/bzImage" % \ |
306 | (kernel_dir, isodir) | 306 | (kernel_dir, isodir) |
307 | exec_cmd(install_cmd) | 307 | exec_cmd(install_cmd) |
308 | 308 | ||
309 | #Create bootloader for efi boot | 309 | #Create bootloader for efi boot |
@@ -362,7 +362,6 @@ class IsoImagePlugin(SourcePlugin): | |||
362 | exec_native_cmd(grub_cmd, native_sysroot) | 362 | exec_native_cmd(grub_cmd, native_sysroot) |
363 | 363 | ||
364 | else: | 364 | else: |
365 | # TODO: insert gummiboot stuff | ||
366 | msger.error("unrecognized bootimg-efi loader: %s" \ | 365 | msger.error("unrecognized bootimg-efi loader: %s" \ |
367 | % source_params['loader']) | 366 | % source_params['loader']) |
368 | except KeyError: | 367 | except KeyError: |
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py index 79e41cad27..4e42e3edea 100644 --- a/scripts/lib/wic/plugins/source/rawcopy.py +++ b/scripts/lib/wic/plugins/source/rawcopy.py | |||
@@ -84,4 +84,3 @@ class RawCopyPlugin(SourcePlugin): | |||
84 | part.size = filesize | 84 | part.size = filesize |
85 | 85 | ||
86 | part.source_file = dst | 86 | part.source_file = dst |
87 | |||
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py index 891f095564..9d959fa7d7 100644 --- a/scripts/lib/wic/plugins/source/rootfs.py +++ b/scripts/lib/wic/plugins/source/rootfs.py | |||
@@ -79,5 +79,5 @@ class RootfsPlugin(SourcePlugin): | |||
79 | real_rootfs_dir = cls.__get_rootfs_dir(rootfs_dir) | 79 | real_rootfs_dir = cls.__get_rootfs_dir(rootfs_dir) |
80 | 80 | ||
81 | part.rootfs_dir = real_rootfs_dir | 81 | part.rootfs_dir = real_rootfs_dir |
82 | part.prepare_rootfs(cr_workdir, oe_builddir, real_rootfs_dir, native_sysroot) | 82 | part.prepare_rootfs(cr_workdir, oe_builddir, |
83 | 83 | real_rootfs_dir, native_sysroot) | |