Hello, you can read the partion size with:
root@freescale-evk /home/user$ cat /proc/mtd
dev: size erasesize name
mtd0: 01400000 00020000 "gpmi-nfc-0-boot"
mtd1: 3ec00000 00020000 "gpmi-nfc-general-use"
The boot area size on mtd0 will be defined inside: linux/arch/arm/mach-mx28/device.c
static struct gpmi_nfc_platform_data gpmi_nfc_platform_data = {
.nfc_version = 1,
.boot_rom_version = 1,
.clock_name = "gpmi",
.platform_init = gpmi_nfc_platform_init,
.platform_exit = gpmi_nfc_platform_exit,
.min_prop_delay_in_ns = 5,
.max_prop_delay_in_ns = 9,
.max_chip_count = 2,
.boot_area_size_in_bytes = 20 * SZ_1M,
.partition_source_types = gpmi_nfc_partition_source_types,
.partitions = 0,
.partition_count = 0,
};
On my side the partition on mtd1 will be devided later in more logical ubifs partitions using flash utilities.
echo "*** Erasing MTD Device 1 ***"
#flash_erase /dev/mtd1 0 0
ubiformat /dev/mtd1 -y
echo "*** Attaching UBI partition ***"
ubiattach /dev/ubi_ctrl -m 1
echo "*** Creating UBI volumes ***"
ubimkvol /dev/ubi0 -n 0 -N rootfs0 -s 40MiB
ubimkvol /dev/ubi0 -n 1 -N firmware -s 40MiB
ubimkvol /dev/ubi0 -n 2 -N data -m
echo "*** Mounting ***"
mkdir /mnt/ubifs
mount -t ubifs ubi0:rootfs0 /mnt/ubifs
mkdir /mnt/firmware
mount -t ubifs ubi0:firmware /mnt/firmware
mkdir /mnt/data
mount -t ubifs ubi0:data /mnt/data
...
Regards,
BBa