summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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