This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

e-MMC General partition write protection issue

Other Parts Discussed in Thread: CSD

Hi All,

I'm using BBB and successfully partitioned e-MMC General user area into 6 partitions by using SFDISK <sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE> Linux utility

mmcblk0p1 ---> Boot Partition of size 8MB <MLO and u-boot.img>

mmcblk0p2 ---> Ext4  Partition of size 256MB

mmcblk0p3 ---> Ext4  Partition of size 256MB

mmcblk0p4 ---> Extended Partition

   -mmcblk0p5 ---> Ext4  Partition of size 256MB

   -mmcblk0p6 ---> Ext4  Partition of size 256MB

   -mmcblk0p7 ---> Ext4  Partition of size 256MB


The partitions created and able to access, but the issue is HOW TO WRITE PROTECT individual partitions ? i have to protect 3 partitions from writing not entire e-MMC.


I have tried to protect by using mmc-utility

Print extcsd data from <Device>

mmc extcsd read /dev/mmcblk0p1
    ioctl: Operation not permitted
   Could not read EXT_CSD from /dev/mmcblk0p1

mmc extcsd read /dev/mmcblk0p2
    ioctl: Operation not permitted
   Could not read EXT_CSD from /dev/mmcblk0p2

Determine the eMMC writeprotect status of <device>.

mmc writeprotect get /dev/mmcblk0p1
    ioctl: Operation not permitted
    Could not read EXT_CSD from /dev/mmcblk0p1

mmc writeprotect get /dev/mmcblk0p2
    ioctl: Operation not permitted
    Could not read EXT_CSD from /dev/mmcblk0p2

Set the eMMC writeprotect status of <device>.

mmc writeprotect set /dev/mmcblk0p1
      ioctl: Operation not permitted
      Could not read EXT_CSD from /dev/mmcblk0p1

mmc writeprotect set /dev/mmcblk0p2
      ioctl: Operation not permitted
      Could not read EXT_CSD from /dev/mmcblk0p2



Is there any way to write protect or lock  the individual e-MMC partition to safe guard from unwanted write and erase?


Any suggestions highly appreciable

Thanks

Thiru N