-# Partition the device.
-parted ${DEVICE} mklabel msdos
-parted ${DEVICE} mkpart primary fat32 2MB $(( BOOTPART_MB + 2 ))MB
-parted ${DEVICE} set 1 boot on
-parted ${DEVICE} mkpart primary ext2 $(( BOOTPART_MB + 2))MB 100%
-
-# Figure out if the partitions are of type ${DEVICE}1 or ${DEVICE}p1.
-if [ -b "${DEVICE}1" ]; then
- DEVICE_STEM=${DEVICE}
-elif [ -b "${DEVICE}p1" ]; then
- DEVICE_STEM=${DEVICE}p
-else
- echo "Could not find device files for partitions of ${DEVICE}. Exiting."
- exit 1
+if [ "$TYPE" != "mmcbootonly" ]; then
+ # Partition the device.
+ parted ${DEVICE} mklabel msdos
+ parted ${DEVICE} mkpart primary fat32 2MB $(( BOOTPART_MB + 2 ))MB
+ parted ${DEVICE} set 1 boot on
+ parted ${DEVICE} mkpart primary ext2 $(( BOOTPART_MB + 2))MB 100%
+
+ # Figure out if the partitions are of type ${DEVICE}1 or ${DEVICE}p1.
+ if [ -b "${DEVICE}1" ]; then
+ DEVICE_STEM=${DEVICE}
+ elif [ -b "${DEVICE}p1" ]; then
+ DEVICE_STEM=${DEVICE}p
+ else
+ echo "Could not find device files for partitions of ${DEVICE}. Exiting."
+ exit 1
+ fi