aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/source/bootimg-efi.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-01-14 14:12:56 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-17 11:32:19 +0000
commit8088caeff5bf4ee9279b47a69c9f1e5537909601 (patch)
treed41b94e1982a4a97ffdaab8717c4ee26da3aca5d /scripts/lib/wic/plugins/source/bootimg-efi.py
parentb46da0731e3f7016d0ab2a67967f07c7e199f219 (diff)
downloadopenembedded-core-contrib-8088caeff5bf4ee9279b47a69c9f1e5537909601.tar.gz
wic: get rid of get_timeout getter
Used bootloader.timeout instead of kickstart.get_timeout getter. Accessing attributes instead of getting them with getters is more pythonic, shorter and readable. It also more consistent as most of partition and bootloader attributes are used this way. This change also takes care of appendLine bootloader attribute: it's renamed to bootloader.append attribute provided by new parser. 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-efi.py')
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-efi.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 556586f322..35afa30ea6 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -66,16 +66,13 @@ class BootimgEFIPlugin(SourcePlugin):
grubefi_conf = ""
grubefi_conf += "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\n"
grubefi_conf += "default=boot\n"
- timeout = kickstart.get_timeout(creator.ks)
- if not timeout:
- timeout = 0
- grubefi_conf += "timeout=%s\n" % timeout
+ grubefi_conf += "timeout=%s\n" % bootloader.timeout
grubefi_conf += "menuentry 'boot'{\n"
kernel = "/bzImage"
grubefi_conf += "linux %s root=%s rootwait %s\n" \
- % (kernel, creator.rootdev, options)
+ % (kernel, creator.rootdev, bootloader.append)
grubefi_conf += "}\n"
msger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg" \
@@ -95,15 +92,11 @@ class BootimgEFIPlugin(SourcePlugin):
install_cmd = "install -d %s/loader/entries" % hdddir
exec_cmd(install_cmd)
- options = creator.ks.handler.bootloader.appendLine
-
- timeout = kickstart.get_timeout(creator.ks)
- if not timeout:
- timeout = 0
+ bootloader = creator.ks.bootloader
loader_conf = ""
loader_conf += "default boot\n"
- loader_conf += "timeout %d\n" % timeout
+ loader_conf += "timeout %d\n" % bootloader.timeout
msger.debug("Writing gummiboot config %s/hdd/boot/loader/loader.conf" \
% cr_workdir)
@@ -131,7 +124,8 @@ class BootimgEFIPlugin(SourcePlugin):
boot_conf = ""
boot_conf += "title boot\n"
boot_conf += "linux %s\n" % kernel
- boot_conf += "options LABEL=Boot root=%s %s\n" % (creator.rootdev, options)
+ boot_conf += "options LABEL=Boot root=%s %s\n" % \
+ (creator.rootdev, bootloader.append)
msger.debug("Writing gummiboot config %s/hdd/boot/loader/entries/boot.conf" \
% cr_workdir)