aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/source/bootimg-pcbios.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-09-02 13:58:16 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-02 23:46:52 +0100
commit872cb0d5d79b26f34e6b35d7be8870d245021be4 (patch)
tree37cc334e9769e40e1df60e777e934ee7a404282f /scripts/lib/wic/plugins/source/bootimg-pcbios.py
parentaf0a6d547a5a3efefdd4900f7079dfd10b85342d (diff)
downloadopenembedded-core-contrib-872cb0d5d79b26f34e6b35d7be8870d245021be4.tar.gz
wic: fix short variable names
Made short variable names longer and more readable. Fixed pylint warnings "Invalid variable name" and "Invalid argument name". Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/plugins/source/bootimg-pcbios.py')
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-pcbios.py28
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