wic/bootimg-pcbios.py: checking the existance of syslinux
cover wic/bootimg-pcbios.py: checking the existance of syslinux
Test Steps:
1. build core-image-minimal
$ bitbake core-image-minimal
2. run wic failed
$ wic create directdisk -e core-image-minimal ... Creating image(s)...
Error: Please build syslinux first
...
3. build syslinux
$ bitbake syslinux
4. run wic success
$ wic create directdisk -e core-image-minimal ... Creating image(s)... .. The image(s) were created using OE kickstart file: /home/jiahongxu/yocto/poky/scripts/lib/image/canned-wks/directdisk.wks ...
//Hongxu
The following changes since commit ccf5a4d2342c4fd40e4e0b332ea7e34e0bf175d4:
build-appliance-image: Update to dizzy head revision (2014-10-11 08:11:17 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib hongxu/fix-wic-syslinux
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-wic-syslinux
Hongxu Jia (1):
wic/bootimg-pcbios.py: checking the existance of syslinux
scripts/lib/wic/plugins/source/bootimg-pcbios.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.1
PATCH 1/1 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]
--- scripts/lib/wic/plugins/source/bootimg-pcbios.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
scripts/lib/wic/plugins/source/bootimg-pcbios.py +10 -1
@@ -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)
Signature · 1 line
1.9.1