[U-Boot-Users] env tools & dataflash

Sergei Sharonov sergei.sharonov at halliburton.com
Mon Sep 12 18:02:36 CEST 2005


When using Linux tools to read/write u-boot environment in Dataflash there seems
to be a problem. In fw_env.c / flash_io():

  resid = DEVESIZE (otherdev) - CFG_ENV_SIZE;

If I understand correctly DEVESIZE (otherdev) is an erase block size which 0x210
for Dataflash and is smaller than CFG_ENV_SIZE. Then malloc in

  if ((data = malloc (resid)) == NULL) {

fails because of negative size.


More information about the U-Boot mailing list