mirror of
https://git.yoctoproject.org/poky
synced 2026-07-27 07:27:12 +00:00
wic: fix short variable names
Made short variable names longer and more readable. Fixed pylint warnings "Invalid variable name" and "Invalid argument name". (From OE-Core rev: 872cb0d5d79b26f34e6b35d7be8870d245021be4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
14b47e22f9
commit
791a3912d9
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user