[oe-commits] [openembedded-core] 11/19: image_types.bbclass: add optional size to ubi vols
git at git.openembedded.org
git at git.openembedded.org
Wed Jun 20 15:58:14 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 9b4a1c8031600f5c81198f3266fa7db986785602
Author: Tobias Olausson <tol at hms.se>
AuthorDate: Mon Jun 18 15:01:53 2018 +0200
image_types.bbclass: add optional size to ubi vols
Instead of hard coding the ubi volume to be just large enough to fit the
root file system, one can use a variable to set a preferred size.
Signed-off-by: Tobias Olausson <tol at hms.se>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/image_types.bbclass | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 00a00d3..99d49db 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -164,10 +164,22 @@ multiubi_mkfs() {
local vname="_$3"
fi
+ # Set UBI_VOL_SIZE (for regular ubi) or UBI_VOL_SIZE_vname for multiubi
+ if [ -n "${vname}" ]; then
+ local ubi_vol_size=${UBI_VOL_SIZE}
+ else
+ eval local ubi_vol_size=\"\$UBI_VOL_SIZE${vname}\"
+ fi
+
echo \[ubifs\] > ubinize${vname}-${IMAGE_NAME}.cfg
echo mode=ubi >> ubinize${vname}-${IMAGE_NAME}.cfg
echo image=${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs >> ubinize${vname}-${IMAGE_NAME}.cfg
echo vol_id=0 >> ubinize${vname}-${IMAGE_NAME}.cfg
+
+ if [ -n "${ubi_vol_size}" ]; then
+ echo "vol_size=${ubi_vol_size}" >> ubinize${vname}-${IMAGE_NAME}.cfg
+ fi
+
echo vol_type=dynamic >> ubinize${vname}-${IMAGE_NAME}.cfg
echo vol_name=${UBI_VOLNAME} >> ubinize${vname}-${IMAGE_NAME}.cfg
echo vol_flags=autoresize >> ubinize${vname}-${IMAGE_NAME}.cfg
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list