summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorDrew Moseley <drew_moseley@mentor.com>2016-02-05 10:56:20 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-07 17:30:00 +0000
commitaacae25a3d7822555343225c7cb06154bd8f4f70 (patch)
tree93d5725d3f2d63475bbea853dda653cabe766b34 /meta
parent9c0d4ece40b9c08416339d3a10cabceb4f5c68c3 (diff)
downloadpoky-aacae25a3d7822555343225c7cb06154bd8f4f70.tar.gz
image_types.bbclass: Embed IMAGE_NAME in ubinize config file
When using the FSTYPE multiubi, make sure that each image build has a unique config file. Without this there is a race condition when building multiple images in a single bitbake command which results in errors similar to: ERROR: Error: The image creation script 'blah/tmp/work/blah/core-image-base/1.0-r0/temp/create_image.multiubi' returned 1: iniparser: cannot open ubinize_normal.cfg ubinize: error!: cannot load the input ini file "ubinize_normal.cfg" mv: cannot stat 'ubinize_normal.cfg': No such file or directory WARNING: blah/tmp/work/blah/core-image-base/1.0-r0/temp/create_image.multiubi:1 exit 1 from mv ubinize${vname}.cfg blahtmp/deploy/images/blah/ (From OE-Core rev: bc7643846f9fcef13a02f9299faa5454c843e8b1) Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/image_types.bbclass18
1 files changed, 9 insertions, 9 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index b9599d8bed..db8cb37abc 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -126,18 +126,18 @@ multiubi_mkfs() {
126 local vname="_$3" 126 local vname="_$3"
127 fi 127 fi
128 128
129 echo \[ubifs\] > ubinize${vname}.cfg 129 echo \[ubifs\] > ubinize${vname}-${IMAGE_NAME}.cfg
130 echo mode=ubi >> ubinize${vname}.cfg 130 echo mode=ubi >> ubinize${vname}-${IMAGE_NAME}.cfg
131 echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}.rootfs.ubifs >> ubinize${vname}.cfg 131 echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}.rootfs.ubifs >> ubinize${vname}-${IMAGE_NAME}.cfg
132 echo vol_id=0 >> ubinize${vname}.cfg 132 echo vol_id=0 >> ubinize${vname}-${IMAGE_NAME}.cfg
133 echo vol_type=dynamic >> ubinize${vname}.cfg 133 echo vol_type=dynamic >> ubinize${vname}-${IMAGE_NAME}.cfg
134 echo vol_name=${UBI_VOLNAME} >> ubinize${vname}.cfg 134 echo vol_name=${UBI_VOLNAME} >> ubinize${vname}-${IMAGE_NAME}.cfg
135 echo vol_flags=autoresize >> ubinize${vname}.cfg 135 echo vol_flags=autoresize >> ubinize${vname}-${IMAGE_NAME}.cfg
136 mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}.rootfs.ubifs ${mkubifs_args} 136 mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}.rootfs.ubifs ${mkubifs_args}
137 ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}.rootfs.ubi ${ubinize_args} ubinize${vname}.cfg 137 ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}.rootfs.ubi ${ubinize_args} ubinize${vname}-${IMAGE_NAME}.cfg
138 138
139 # Cleanup cfg file 139 # Cleanup cfg file
140 mv ubinize${vname}.cfg ${DEPLOY_DIR_IMAGE}/ 140 mv ubinize${vname}-${IMAGE_NAME}.cfg ${DEPLOY_DIR_IMAGE}/
141 141
142 # Create own symlinks for 'named' volumes 142 # Create own symlinks for 'named' volumes
143 if [ -n "$vname" ]; then 143 if [ -n "$vname" ]; then