diff options
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg_pcbios.py | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg_pcbios.py b/scripts/lib/wic/plugins/source/bootimg_pcbios.py index 47fd4b9415..887a548cde 100644 --- a/scripts/lib/wic/plugins/source/bootimg_pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg_pcbios.py | |||
@@ -59,9 +59,7 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
59 | oe_builddir, bootimg_dir, kernel_dir, | 59 | oe_builddir, bootimg_dir, kernel_dir, |
60 | native_sysroot): | 60 | native_sysroot): |
61 | 61 | ||
62 | cls._do_configure_syslinux(part, source_params, creator, cr_workdir, | 62 | cls._do_configure_syslinux(part, creator, cr_workdir) |
63 | oe_builddir, bootimg_dir, kernel_dir, | ||
64 | native_sysroot) | ||
65 | 63 | ||
66 | @classmethod | 64 | @classmethod |
67 | def do_prepare_partition(cls, part, source_params, creator, cr_workdir, | 65 | def do_prepare_partition(cls, part, source_params, creator, cr_workdir, |
@@ -89,9 +87,7 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
89 | return custom_cfg | 87 | return custom_cfg |
90 | 88 | ||
91 | @classmethod | 89 | @classmethod |
92 | def _do_configure_syslinux(cls, part, source_params, creator, cr_workdir, | 90 | def _do_configure_syslinux(cls, part, creator, cr_workdir): |
93 | oe_builddir, bootimg_dir, kernel_dir, | ||
94 | native_sysroot): | ||
95 | """ | 91 | """ |
96 | Called before do_prepare_partition(), creates syslinux config | 92 | Called before do_prepare_partition(), creates syslinux config |
97 | """ | 93 | """ |
@@ -106,12 +102,24 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
106 | 102 | ||
107 | if not syslinux_conf: | 103 | if not syslinux_conf: |
108 | # Create syslinux configuration using parameters from wks file | 104 | # Create syslinux configuration using parameters from wks file |
109 | splash = os.path.join(cr_workdir, "/hdd/boot/splash.jpg") | 105 | splash = os.path.join(hdddir, "/splash.jpg") |
110 | if os.path.exists(splash): | 106 | if os.path.exists(splash): |
111 | splashline = "menu background splash.jpg" | 107 | splashline = "menu background splash.jpg" |
112 | else: | 108 | else: |
113 | splashline = "" | 109 | splashline = "" |
114 | 110 | ||
111 | # Set a default timeout if none specified to avoid | ||
112 | # 'None' being the value placed within the configuration | ||
113 | # file. | ||
114 | if not bootloader.timeout: | ||
115 | bootloader.timeout = 500 | ||
116 | |||
117 | # Set a default kernel params string if none specified | ||
118 | # to avoid 'None' being the value placed within the | ||
119 | # configuration file. | ||
120 | if not bootloader.append: | ||
121 | bootloader.append = "rootwait console=ttyS0,115200 console=tty0" | ||
122 | |||
115 | syslinux_conf = "" | 123 | syslinux_conf = "" |
116 | syslinux_conf += "PROMPT 0\n" | 124 | syslinux_conf += "PROMPT 0\n" |
117 | syslinux_conf += "TIMEOUT " + str(bootloader.timeout) + "\n" | 125 | syslinux_conf += "TIMEOUT " + str(bootloader.timeout) + "\n" |
@@ -130,8 +138,7 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
130 | syslinux_conf += "APPEND label=boot root=%s %s\n" % \ | 138 | syslinux_conf += "APPEND label=boot root=%s %s\n" % \ |
131 | (creator.rootdev, bootloader.append) | 139 | (creator.rootdev, bootloader.append) |
132 | 140 | ||
133 | logger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg", | 141 | logger.debug("Writing syslinux config %s/syslinux.cfg", hdddir) |
134 | cr_workdir) | ||
135 | cfg = open("%s/hdd/boot/syslinux.cfg" % cr_workdir, "w") | 142 | cfg = open("%s/hdd/boot/syslinux.cfg" % cr_workdir, "w") |
136 | cfg.write(syslinux_conf) | 143 | cfg.write(syslinux_conf) |
137 | cfg.close() | 144 | cfg.close() |