
Hi,
right, i can see that and that clarifies things for me. my *original* question was whether there was a way to set up /etc/fw_env.config to refer to the eMMC partition /dev/mmcblk1boot1 *directly*, treating it as a regular block partition and bypassing all the MTD-related processing. (perhaps stefano can weigh in and say whether that's how he understood what i was asking.)
if you instead refer to /dev/mmcblk1, as i understand it, you're just back to the standard MTD-based access, yes?
the /dev/mmcblk... devices are block devices and do not provide the MTD API of the kernel. I guess this is the cause for the error message you've seen. You could try strace to verify. And this is the problem why the patches Luka mentioned are required: they make fw_{printenv,setenv} aware of opening such block devices by-passing the MTD-specific stuff, that means simply open the file, write/read the data and close the file descriptor. Without these patches these tools assume that the file descriptor opened are MTD-based.
You can pass what ever you want via your config, so your file could look like: /dev/mmcblk1boot1 0x0 0x4000 Since the partition is somewhere placed on the eMMC device, you can also refer to the same location using /dev/mmcblk1. In the latter case you have to calculate the offset correctly to not overwrite other data (e.g. on other partitions). Using /dev/mmcblk1boot1 as "entry point" the kernel should reject write requests which go beyond the partition size.
BR, Michael