On Wednesday 02 June 2010 21:05:46 Jo-Philipp Wich wrote: > Hi. > > I think this is a general mmap() issue in ar71xx, the "nvram" utility had > similar problems - the mmap call will always succeed but sometimes the > mapped memory just contains zeroes. > > You can try the patch below and check whether it improves the reliability. > In the case of the "nvram" uitility it cured the random mmap failures. > > --- package/mtd/src/fis.c (revision 21594) > +++ package/mtd/src/fis.c (working copy) > @@ -77,7 +77,7 @@ > goto error; > > fis_erasesize = erasesize; > - desc = mmap(NULL, erasesize, PROT_READ|PROT_WRITE, MAP_SHARED, fis_fd, > 0); + desc = mmap(NULL, erasesize, PROT_READ|PROT_WRITE, MAP_SHARED | > MAP_LOCKED, fis_fd, 0); if (desc == MAP_FAILED) > goto error;
yes, this helps :) i have flashed 10 times without a problem. thank you! bruno _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel