Hello Everyone,
If there is an 8GB eMMC flash device on the MiniZed, why when I use the df command in PetaLinux does it only show 123M available?
Thanks,
Josh
Hello Everyone,
If there is an 8GB eMMC flash device on the MiniZed, why when I use the df command in PetaLinux does it only show 123M available?
Thanks,
Josh
Yes, the reason is that during production only 128M of the 8GB device is formatted to save time. You can format additional partitions (or delete the current one) with
fdisk /dev/mmcblk1
Note: One can create one huge extended partition, but that it will always be 7GB in size and you cannot format that as FAT32. And the largest primary partition size that you can create is 2048M (2GB).
Important note: After doing the fdisk, you should not do the formatting immediately, because the partition will not be available to format yet. You have to shut down and power cycle first! So after running fdisk (look at cat /usr/local/bin/format_emmc.sh to see how to do this in a script) you should shut down (shutdown -h now) and then power cycle by removing the power cable(s). Hitting the reset button is not enough. After reset you can run your format and then go through the reset again. Then you will see your formatted partition with df.
After making a 512MB partition:
root@plnx_arm:~# df
Filesystem Size Used Available Use% Mounted on
devtmpfs 64.0K 4.0K 60.0K 6% /dev
tmpfs 249.0M 28.0K 248.9M 0% /run
tmpfs 249.0M 44.0K 248.9M 0% /var/volatile
tmpfs 64.0K 4.0K 60.0K 6% /dev
/dev/mmcblk1p1 487.3M 4.0K 487.3M 0% /run/media/mmcblk1p1
Yes, the reason is that during production only 128M of the 8GB device is formatted to save time. You can format additional partitions (or delete the current one) with
fdisk /dev/mmcblk1
Note: One can create one huge extended partition, but that it will always be 7GB in size and you cannot format that as FAT32. And the largest primary partition size that you can create is 2048M (2GB).
Important note: After doing the fdisk, you should not do the formatting immediately, because the partition will not be available to format yet. You have to shut down and power cycle first! So after running fdisk (look at cat /usr/local/bin/format_emmc.sh to see how to do this in a script) you should shut down (shutdown -h now) and then power cycle by removing the power cable(s). Hitting the reset button is not enough. After reset you can run your format and then go through the reset again. Then you will see your formatted partition with df.
After making a 512MB partition:
root@plnx_arm:~# df
Filesystem Size Used Available Use% Mounted on
devtmpfs 64.0K 4.0K 60.0K 6% /dev
tmpfs 249.0M 28.0K 248.9M 0% /run
tmpfs 249.0M 44.0K 248.9M 0% /var/volatile
tmpfs 64.0K 4.0K 60.0K 6% /dev
/dev/mmcblk1p1 487.3M 4.0K 487.3M 0% /run/media/mmcblk1p1