
4 Apr
2012
4 Apr
'12
7:15 p.m.
On Wednesday 04 April 2012 12:00:42 Bishop, Mark wrote:
root:/> cat /etc/fw_env.config /dev/mtd0 0x60000 0x20000 0x20000 1
ioctl(3, MEMGETINFO, {type=MTD_NANDFLASH, flags=MTD_WRITEABLE, size=0x80000, erasesize=0x20000, writesize=0x800, oobsize=0x40, padding=0xffffffff}) = 0 ioctl(3, MEMGETBADBLOCK, [0x60000]) = 1 ioctl(3, MEMGETBADBLOCK, [0x80000]) = -1 EINVAL (Invalid argument)
to summarize further: the flash is 0x80000 bytes long, and he's using the last sector in flash to hold his env, and fw_printenv seems to have an off-by-one in the badblock check. there's no reason it should be checking 0x80000. -mike