summaryrefslogtreecommitdiff
path: root/scripts
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
commita86ae2df44632fb8cae693ecdf7bba809a3637c9 (patch)
treeababcade1c11b331da498a050bea4c515ea25e34 /scripts
parent150380ae81d5a2d5ce0de82dbff7e15e1fe7f081 (diff)
downloadtizen-distro-a86ae2df44632fb8cae693ecdf7bba809a3637c9.tar.gz
tizen-distro-a86ae2df44632fb8cae693ecdf7bba809a3637c9.tar.bz2
tizen-distro-a86ae2df44632fb8cae693ecdf7bba809a3637c9.zip
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')
-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):
'prepares' the partition to be incorporated into the image.
In this case, prepare content for legacy bios boot partition.
"""
- if not bootimg_dir:
+ def _has_syslinux(dir):
+ if dir:
+ syslinux = "%s/syslinux" % dir
+ if os.path.exists(syslinux):
+ return True
+ return False
+
+ if not _has_syslinux(bootimg_dir):
bootimg_dir = get_bitbake_var("STAGING_DATADIR")
if not bootimg_dir:
msger.error("Couldn't find STAGING_DATADIR, exiting\n")
+ 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)