summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/source
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2014-10-13 18:46:34 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-10-18 16:14:03 +0200
commit9c218a319e006b8edf2f1ef9eada9b5611b85e12 (patch)
tree351a1a9ca47096f4e68499a5d45b6ddc0563a40d /scripts/lib/wic/plugins/source
parentccf5a4d2342c4fd40e4e0b332ea7e34e0bf175d4 (diff)
downloadpoky-9c218a319e006b8edf2f1ef9eada9b5611b85e12.tar.gz
wic/bootimg-pcbios.py: checking the existance of syslinux
While syslinux not existed in $bootimg_dir, there was a error: $ wic create directdisk -e core-image-minimal ... |Creating image(s)... |Error: exec_cmd: install -m 444 /home/jiahongxu/yocto/ build-20141010-yocto/tmp/deploy/images/qemux86-64/syslinux/ ldlinux.sys /var/tmp/wic/build/hdd/boot/ldlinux.sys returned '1' instead of 0 ... Add checking for the existance of syslinux to fix this issue. If syslinux didn't exist in anywhere, prompt user to build it. [YOCTO #6826] (From OE-Core rev: c2d4364d9fbbda64598f0a3eb0b0890932bb7742) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/plugins/source')
-rw-r--r--scripts/lib/wic/plugins/source/bootimg-pcbios.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index aceed20428..6057bab42d 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -127,10 +127,19 @@ class BootimgPcbiosPlugin(SourcePlugin):
127 'prepares' the partition to be incorporated into the image. 127 'prepares' the partition to be incorporated into the image.
128 In this case, prepare content for legacy bios boot partition. 128 In this case, prepare content for legacy bios boot partition.
129 """ 129 """
130 if not bootimg_dir: 130 def _has_syslinux(dir):
131 if dir:
132 syslinux = "%s/syslinux" % dir
133 if os.path.exists(syslinux):
134 return True
135 return False
136
137 if not _has_syslinux(bootimg_dir):
131 bootimg_dir = get_bitbake_var("STAGING_DATADIR") 138 bootimg_dir = get_bitbake_var("STAGING_DATADIR")
132 if not bootimg_dir: 139 if not bootimg_dir:
133 msger.error("Couldn't find STAGING_DATADIR, exiting\n") 140 msger.error("Couldn't find STAGING_DATADIR, exiting\n")
141 if not _has_syslinux(bootimg_dir):
142 msger.error("Please build syslinux first\n")
134 # just so the result notes display it 143 # just so the result notes display it
135 cr.set_bootimg_dir(bootimg_dir) 144 cr.set_bootimg_dir(bootimg_dir)
136 145