It should work out of the box with the patch. It will (should) set the erase size to the right value.
2010/5/26 Matthias Buecher / Germany <[email protected]>: > So I can mark the partition with MTD_ERASE_PARTIAL, but I can not see > how I can limit erase size to 0x1000 so that only mtd offsets 0x3c000 to > 0x3dfff gets erased. > The last 128 bytes (0x3ff80 - 3ffff) of the mtd partition on WRT350N v2 > are very important and shouldn't be touched. > Or should this work out of the box with uboot-envtools? > > Maddes > > On 25.05.2010 23:14, Bernhard Loos wrote: >> https://dev.openwrt.org/browser/trunk/target/linux/generic-2.6/patches-2.6.32/222-partial_eraseblock_write.patch >> >> 2010/5/25 Matthias Buecher / Germany <[email protected]>: >>> Both, backfire and latest trunk. >>> Can you hint me where this patch is? >>> >>> Maddes >>> >>> On 25.05.2010 21:59, Bernhard Loos wrote: >>>> There is already a patch for this in openwrt, so it should work (in >>>> theory). >>>> Do you use trunk or backfire or something older? >>>> >>>> 2010/5/25 Matthias Buecher / Germany <[email protected]>: >>>>> Today I checked out how to access the U-Boot variables of my WRT350N v2 >>>>> (Orion) from Linux. >>>>> >>>>> Installed uboot-envtools and created a fitting /etc/fw_env.config: >>>>> # WRT350N v2 >>>>> # MTD device name Device offset Env. size Flash sector size >>>>> /dev/mtd5 0x0003c000 0x00002000 0x00001000 >>>>> >>>>> I can read all U-Boot env vars, but not change any. >>>>> This seems to be a problem of the huge erase site 0x00010000 of mtd. >>>>> Can I specify a separate erase size for the U-Boot partition? >>>>> >>>>> >>>>> static struct mtd_partition wrt350n_v2_nor_flash_partitions[] = { >>>>> { >>>>> ... >>>>> }, { >>>>> .name = "u-boot", >>>>> .offset = 0x007c0000, >>>>> .size = 0x00040000, >>>>> }, { >>>>> ... >>>>> }, >>>>> }; >>>>> >>>>> linux: arch/arm/mach-orion5x/wrt350n-v2-setup.c >>>>> >>>>> OpenWrt: target/linux/orion/patches/100-openwrt_partition_map.patch >>>>> >>>>> Maddes >>>>> >>>>> -- >>>>> http://www.maddes.net/ >>>>> Home: Earth / Germany / Ruhr-Area >>>>> _______________________________________________ >>>>> openwrt-devel mailing list >>>>> [email protected] >>>>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel >>>>> >>>> _______________________________________________ >>>> openwrt-devel mailing list >>>> [email protected] >>>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel >>> _______________________________________________ >>> openwrt-devel mailing list >>> [email protected] >>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel >>> >> _______________________________________________ >> openwrt-devel mailing list >> [email protected] >> https://lists.openwrt.org/mailman/listinfo/openwrt-devel > _______________________________________________ > openwrt-devel mailing list > [email protected] > https://lists.openwrt.org/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
