[elbe-devel] [PATCH] hdimg/mtd: fix handling of ubi static volumes
John Ogness
john.ogness at linutronix.de
Fri Feb 12 11:10:54 CET 2016
This patch fixes several problems related to ubi static volumes.
. use buildenv as root for copying ubi static volumes specified with an
aboslution path (this allows the files to be removed in finetuning)
. copy ubi static volumes to the project directory as "<label>.ubibin" so
they can be included in the image archives
. call ubinize using the ubi static volumes copied to the project directory
Signed-off-by: John Ogness <john.ogness at linutronix.de>
---
This patch applies to both elbe-1.0 and elbe-2.0 branches.
elbepack/hdimg.py | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
index a9a5147..c6f7047 100644
--- a/elbepack/hdimg.py
+++ b/elbepack/hdimg.py
@@ -42,10 +42,6 @@ def mkfs_mtd( outf, mtd, fslabel, rfs, target ):
continue
if v.has("binary"):
- # allow_fail is set that the generation of other images is done,
- # even if this step fails
- outf.do( "cp %s %s" % ( rfs.fname( v.text("binary") ), target ),
- allow_fail=True)
continue
label = v.text("label")
@@ -87,17 +83,15 @@ def build_image_mtd( outf, mtd, target ):
if not vol.has("empty"):
if vol.has("binary"):
tmp = ""
- # copy from target if path starts with /
+ # copy from buildenv if path starts with /
if vol.text("binary")[0] == '/':
- tmp = "target" + vol.text("binary")
- img_files.append (tmp)
- # img_files needs path relative to project dir
- # ubinize cfg file needs absolute path
- tmp = target + "/" + tmp
+ tmp = target + "/" + "chroot" + vol.text("binary")
# copy from project directory
else:
tmp = target + "/" + vol.text("binary")
- fp.write( "image=%s\n" % tmp )
+ outf.do( "cp %s %s/%s.ubibin" % ( tmp, target, vol.text("label") ) )
+ img_files.append( vol.text("label") + ".ubibin" )
+ fp.write( "image=%s.ubibin\n" % os.path.join( target, vol.text("label") ) )
else:
fp.write( "image=%s.ubifs\n" % os.path.join(target,
vol.text("label")) )
--
1.7.10.4
More information about the elbe-devel
mailing list