+
+ # partition size map
+ printf "partitions:" >> ${IMG_NAME}
+ sed -ne 's/^mtd://p' configs/${CONFIG_TYPE}/fstab-jffs2 | \
+ while read name mntpt fstype extra; do
+ size=$(echo $extra | sed -ne 's/.*[[:space:]]\+#[[:space:]]\+//p')
+ if [ "${size}" = "" ]; then
+ size="-1"
+ else
+ # size in fstab is in MB; convert to 128KiB chunks (in hex)
+ # MB * (1024/128)
+ size=$((size * 8))
+ size=`printf "%x\n" $size`
+ fi
+ printf " $name $size" >> ${IMG_NAME}
+ done
+ printf "\n" >> ${IMG_NAME}
+
+ # individual partitions
+ sed -ne 's/^mtd://p' configs/${CONFIG_TYPE}/fstab-jffs2 | \
+ while read name mntpt fstype extra; do
+ cat >>${IMG_NAME}<<EOF
+set-partition: ${name}