+# create partitions
+sed -ne 's/^mtd://p' configs/${CONFIG_TYPE}/fstab-jffs2 | \
+ while read name mntpt fstype extra; do
+ if [ "$mntpt" = "/" ]; then
+ create_jffs2 ${ROOT_DIR} "_${name}.img"
+
+ else
+ create_jffs2 "_${name}" "_${name}.img"
+ fi
+done
+
+# move separate partitions back into the chroot
+sed -ne 's/^mtd://p' configs/${CONFIG_TYPE}/fstab-jffs2 | \
+ while read name mntpt fstype extra; do
+ if [ "$mntpt" = "/" ]; then
+ continue
+ fi
+
+ rmdir ${ROOT_DIR}/${mntpt}
+ mv "_${name}" ${ROOT_DIR}/${mntpt}
+done
+
+# partition map is used by OFW for partition layout and sha256 checksums