i am trying to use the rpmb partition on the R2 (/dev/mmcblk1rpmb) using mmc-tools. I am using Debian image 4.14.120.
I followed the example from the mmc-tools man page. Step 1, writing the key using the “mmc rpmb write-key” command works aparently ok, there is no error and exit code is 0.
Step 2, writing data to the rpmb with " mmc rpmb write-block" fails with error “RPMB read counter operation failed, retcode 0xe000” and exit code 1. The read-counter command fails with “RPMB operation failed, retcode 0xc4c2” and exit code 1. A “mmc rpmb read-block” returns a string of 0 bytes and exit code 0. I have tried the operations with both stdin/out as in the samples as well as using files for the key and data. Results are the same.
Do i need to perform some sort of initialisation other than wrting the key with “mmc rpmb write-key” to use the rpmb partition? What else may i do wrong?
Thanks a lot