summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/source/isoimage-isohybrid.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-18 11:47:06 +0000
commit4d5d5dd428e8d8fa0e155988286f3b45f47e1544 (patch)
tree7870f309f56ca9cc804640416c86d8dc880ff7db /scripts/lib/wic/plugins/source/isoimage-isohybrid.py
parent26fb2a1a45049fd5731ae83efb962a84afb14568 (diff)
downloadpoky-4d5d5dd428e8d8fa0e155988286f3b45f47e1544.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. (From OE-Core rev: 8088caeff5bf4ee9279b47a69c9f1e5537909601) 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/isoimage-isohybrid.py')
-rw-r--r--scripts/lib/wic/plugins/source/isoimage-isohybrid.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index 9472d8abb9..9ad0bc7c9b 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -64,13 +64,11 @@ class IsoImagePlugin(SourcePlugin):
64 else: 64 else:
65 splashline = "" 65 splashline = ""
66 66
67 options = creator.ks.handler.bootloader.appendLine 67 bootloader = creator.ks.bootloader
68
69 timeout = kickstart.get_timeout(creator.ks, 10)
70 68
71 syslinux_conf = "" 69 syslinux_conf = ""
72 syslinux_conf += "PROMPT 0\n" 70 syslinux_conf += "PROMPT 0\n"
73 syslinux_conf += "TIMEOUT %s \n" % timeout 71 syslinux_conf += "TIMEOUT %s \n" % (bootloader.timeout or 10)
74 syslinux_conf += "\n" 72 syslinux_conf += "\n"
75 syslinux_conf += "ALLOWOPTIONS 1\n" 73 syslinux_conf += "ALLOWOPTIONS 1\n"
76 syslinux_conf += "SERIAL 0 115200\n" 74 syslinux_conf += "SERIAL 0 115200\n"
@@ -82,7 +80,8 @@ class IsoImagePlugin(SourcePlugin):
82 80
83 kernel = "/bzImage" 81 kernel = "/bzImage"
84 syslinux_conf += "KERNEL " + kernel + "\n" 82 syslinux_conf += "KERNEL " + kernel + "\n"
85 syslinux_conf += "APPEND initrd=/initrd LABEL=boot %s\n" % options 83 syslinux_conf += "APPEND initrd=/initrd LABEL=boot %s\n" \
84 % bootloader.append
86 85
87 msger.debug("Writing syslinux config %s/ISO/isolinux/isolinux.cfg" \ 86 msger.debug("Writing syslinux config %s/ISO/isolinux/isolinux.cfg" \
88 % cr_workdir) 87 % cr_workdir)
@@ -100,14 +99,13 @@ class IsoImagePlugin(SourcePlugin):
100 else: 99 else:
101 splashline = "" 100 splashline = ""
102 101
103 options = creator.ks.handler.bootloader.appendLine 102 bootloader = creator.ks.bootloader
104 103
105 grubefi_conf = "" 104 grubefi_conf = ""
106 grubefi_conf += "serial --unit=0 --speed=115200 --word=8 " 105 grubefi_conf += "serial --unit=0 --speed=115200 --word=8 "
107 grubefi_conf += "--parity=no --stop=1\n" 106 grubefi_conf += "--parity=no --stop=1\n"
108 grubefi_conf += "default=boot\n" 107 grubefi_conf += "default=boot\n"
109 timeout = kickstart.get_timeout(creator.ks, 10) 108 grubefi_conf += "timeout=%s\n" % (bootloader.timeout or 10)
110 grubefi_conf += "timeout=%s\n" % timeout
111 grubefi_conf += "\n" 109 grubefi_conf += "\n"
112 grubefi_conf += "search --set=root --label %s " % part.label 110 grubefi_conf += "search --set=root --label %s " % part.label
113 grubefi_conf += "\n" 111 grubefi_conf += "\n"
@@ -116,7 +114,7 @@ class IsoImagePlugin(SourcePlugin):
116 kernel = "/bzImage" 114 kernel = "/bzImage"
117 115
118 grubefi_conf += "linux %s rootwait %s\n" \ 116 grubefi_conf += "linux %s rootwait %s\n" \
119 % (kernel, options) 117 % (kernel, bootloader.append)
120 grubefi_conf += "initrd /initrd \n" 118 grubefi_conf += "initrd /initrd \n"
121 grubefi_conf += "}\n" 119 grubefi_conf += "}\n"
122 120