I am using AM335x-EVM and trying to use fw_printenv under tools/env directory. I compiled the code, change fw_env.config to point to /dev/mtd5 (for u-boot env), correct offset and size. When I try to run fw_printenv, I have an error:
Cannot read bad block mark: Invalid argument
Looking at the code, it is failing at this call and I verified that the blockstart is 0x260000.
int badblock = ioctl (fd, MEMGETBADBLOCK, blockstart);
If you have any idea, I really appreciate the help