Dear Brian Hutchinson, In message <y2o3d1967ab1004071745y111d704oda973290a7a4a...@mail.gmail.com> you wrote: > > > #if CFG_ENV_SECT_SIZE > CFG_ENV_SIZE > > up_data = (end_addr_new + 1 - ((long)flash_addr_new + CFG_ENV_SIZE)); > > debug ("Data to save 0x%x\n", up_data); > > if (up_data) { > > if ((saved_data = malloc(up_data)) => = NULL) { > > printf("Unable to save the> rest of sector (%ld)\n", > > up_data); > > goto Done; > > } > > memcpy(saved_data, > > (void *)((long)flash_addr_> new + CFG_ENV_SIZE), > > up_data); > > debug ("Data (start 0x%x, len 0x%x) saved > at 0x%x\n", > > (long)flash_addr_new > + CFG_ENV_SIZE, > > up_data, s> aved_data); > > } > > #endif > > > > ... which to my understanding is intended to allow you to save RAM by > > using a env. smaller than your sector size which is my case.
This has nothing to do with saving RAM. The thing is that with CFG_ENV_SECT_SIZE > CFG_ENV_SIZE, there might be important data in the part of the sector that is not occupied by the environment, so we must save and restore this content. > > I've also tried to set CFG_ENV_SIZE to be the flash sector size which > > gets me over the above "Unable to save the rest of sector" problem but > > I suspect that I'm having RAM issues as I only have 128M RAM and am 128 MB of RAM is an awful lot. > > trying to use two environments of 256k each and the problem I'm having > > then becomes when I try to nfs boot my board .... it just hangs. Two copies of 256 kB each gives just a 0.4% of the available RAM - I don't understand why you think this might be a critical amount. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "There are things that are so serious that you can only joke about them" - Heisenberg _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot