Skip to contentSkip to conversation

env tools & dataflash

U-Boot-Users Sergei Sharonov 1 participant 1 message Sep 12, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

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.

Sergei