How to change Androids img partition size to work with fastboot


I need a larger system img partition size. I have changed and created it correctly in devices file to 512M.

However during fastboot for writing it to MMC it fails:

sending ‘system’ (262144 KB)…

FAILED (remote: data too large)

Why it still “thinks” this image has 256M? How could I change it?