]> code.ossystems Code Review - openembedded-core.git/commitdiff
bootimg-pcbios: make boot image file unique
authorEd Bartosh <ed.bartosh@linux.intel.com>
Tue, 13 Jun 2017 11:21:52 +0000 (14:21 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 14 Jun 2017 09:18:19 +0000 (10:18 +0100)
Plugin code uses boot.img file name for an image file. If there are
two partitions that use bootimg-pcbios wic breaks with an error
"file already exists: boot.img"

Made image file name unique by adding wks like number to it to fix
the issue.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/wic/plugins/source/bootimg-pcbios.py

index 5890c1267bc50f83b473c0cd91c67740c062d57d..98ad88b03e0631fbc049cfd2492e60a33d18cf29 100644 (file)
@@ -186,7 +186,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
                      extra_blocks, part.mountpoint, blocks)
 
         # dosfs image, created by mkdosfs
-        bootimg = "%s/boot.img" % cr_workdir
+        bootimg = "%s/boot%s.img" % (cr_workdir, part.lineno)
 
         dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (bootimg, blocks)
         exec_native_cmd(dosfs_cmd, native_sysroot)