Root/package/uboot-envtools/patches/003-nor-eraselen.patch

1--- a/fw_env.c
2+++ b/fw_env.c
3@@ -779,7 +779,10 @@ static int flash_write_buf (int dev, int
4     erase_offset = (offset / blocklen) * blocklen;
5 
6     /* Maximum area we may use */
7- erase_len = top_of_range - erase_offset;
8+ if (mtd_type == MTD_NANDFLASH)
9+ erase_len = top_of_range - erase_offset;
10+ else
11+ erase_len = blocklen;
12 
13     blockstart = erase_offset;
14     /* Offset inside a block */
15

Archive Download this file



interactive