summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Barker <pbarker@konsulko.com>2021-01-11 10:32:42 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-27 09:32:45 +0000
commitb3bb553816cfcd36cf3541c7fdc891fe8e8130fd (patch)
treed562d23cdd3f98bcdab1b734bab8410b262450ed /scripts
parentcbb1e7b3883646139c17b0febc5d1243f30fc7c4 (diff)
downloadpoky-b3bb553816cfcd36cf3541c7fdc891fe8e8130fd.tar.gz
wic: Add workdir argument
This allows the path for the temporary workdir used by wic to be set when running wic from bitbake or directly from the command line. (From OE-Core rev: 6136e1312fc69b1b6196aa2fb8986d99ad46e7a1) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2e7314ac3a3cab89de93c932e8efc75de0feb0a7) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/plugins/imager/direct.py2
-rwxr-xr-xscripts/wic2
2 files changed, 3 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 0ca67b77d5..b329568c7a 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -62,7 +62,7 @@ class DirectPlugin(ImagerPlugin):
62 62
63 self.name = "%s-%s" % (os.path.splitext(os.path.basename(wks_file))[0], 63 self.name = "%s-%s" % (os.path.splitext(os.path.basename(wks_file))[0],
64 strftime("%Y%m%d%H%M")) 64 strftime("%Y%m%d%H%M"))
65 self.workdir = tempfile.mkdtemp(dir=self.outdir, prefix='tmp.wic.') 65 self.workdir = options.workdir or tempfile.mkdtemp(dir=self.outdir, prefix='tmp.wic.')
66 self._image = None 66 self._image = None
67 self.ptable_format = self.ks.bootloader.ptable 67 self.ptable_format = self.ks.bootloader.ptable
68 self.parts = self.ks.partitions 68 self.parts = self.ks.partitions
diff --git a/scripts/wic b/scripts/wic
index 24700f380f..a741aed364 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -312,6 +312,8 @@ def wic_init_parser_create(subparser):
312 312
313 subparser.add_argument("-o", "--outdir", dest="outdir", default='.', 313 subparser.add_argument("-o", "--outdir", dest="outdir", default='.',
314 help="name of directory to create image in") 314 help="name of directory to create image in")
315 subparser.add_argument("-w", "--workdir",
316 help="temporary workdir to use for intermediate files")
315 subparser.add_argument("-e", "--image-name", dest="image_name", 317 subparser.add_argument("-e", "--image-name", dest="image_name",
316 help="name of the image to use the artifacts from " 318 help="name of the image to use the artifacts from "
317 "e.g. core-image-sato") 319 "e.g. core-image-sato")