diff options
Diffstat (limited to 'scripts/lib/wic/plugins/source/bootimg-pcbios.py')
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-pcbios.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py index 3c2dbc9d1c..96ed54dbad 100644 --- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py @@ -41,36 +41,36 @@ class BootimgPcbiosPlugin(SourcePlugin): name = 'bootimg-pcbios' @classmethod - def do_install_disk(cls, disk, disk_name, cr, workdir, oe_builddir, + def do_install_disk(cls, disk, disk_name, creator, workdir, oe_builddir, bootimg_dir, kernel_dir, native_sysroot): """ Called after all partitions have been prepared and assembled into a disk image. In this case, we install the MBR. """ mbrfile = "%s/syslinux/" % bootimg_dir - if cr.ptable_format == 'msdos': + if creator.ptable_format == 'msdos': mbrfile += "mbr.bin" - elif cr.ptable_format == 'gpt': + elif creator.ptable_format == 'gpt': mbrfile += "gptmbr.bin" else: - msger.error("Unsupported partition table: %s" % cr.ptable_format) + msger.error("Unsupported partition table: %s" % creator.ptable_format) if not os.path.exists(mbrfile): msger.error("Couldn't find %s. If using the -e option, do you " "have the right MACHINE set in local.conf? If not, " "is the bootimg_dir path correct?" % mbrfile) - full_path = cr._full_path(workdir, disk_name, "direct") + full_path = creator._full_path(workdir, disk_name, "direct") msger.debug("Installing MBR on disk %s as %s with size %s bytes" \ % (disk_name, full_path, disk['min_size'])) - rc = runner.show(['dd', 'if=%s' % mbrfile, - 'of=%s' % full_path, 'conv=notrunc']) - if rc != 0: + rcode = runner.show(['dd', 'if=%s' % mbrfile, + 'of=%s' % full_path, 'conv=notrunc']) + if rcode != 0: raise ImageError("Unable to set MBR to %s" % full_path) @classmethod - def do_configure_partition(cls, part, source_params, cr, cr_workdir, + def do_configure_partition(cls, part, source_params, creator, cr_workdir, oe_builddir, bootimg_dir, kernel_dir, native_sysroot): """ @@ -89,11 +89,11 @@ class BootimgPcbiosPlugin(SourcePlugin): else: splashline = "" - options = cr.ks.handler.bootloader.appendLine + options = creator.ks.handler.bootloader.appendLine syslinux_conf = "" syslinux_conf += "PROMPT 0\n" - timeout = kickstart.get_timeout(cr.ks) + timeout = kickstart.get_timeout(creator.ks) if not timeout: timeout = 0 syslinux_conf += "TIMEOUT " + str(timeout) + "\n" @@ -110,7 +110,7 @@ class BootimgPcbiosPlugin(SourcePlugin): syslinux_conf += "KERNEL " + kernel + "\n" syslinux_conf += "APPEND label=boot root=%s %s\n" % \ - (cr.rootdev, options) + (creator.rootdev, options) msger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg" \ % cr_workdir) @@ -119,7 +119,7 @@ class BootimgPcbiosPlugin(SourcePlugin): cfg.close() @classmethod - def do_prepare_partition(cls, part, source_params, cr, cr_workdir, + def do_prepare_partition(cls, part, source_params, creator, cr_workdir, oe_builddir, bootimg_dir, kernel_dir, rootfs_dir, native_sysroot): """ @@ -141,7 +141,7 @@ class BootimgPcbiosPlugin(SourcePlugin): if not _has_syslinux(bootimg_dir): msger.error("Please build syslinux first\n") # just so the result notes display it - cr.set_bootimg_dir(bootimg_dir) + creator.set_bootimg_dir(bootimg_dir) staging_kernel_dir = kernel_dir |